You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by sh...@apache.org on 2014/12/11 23:14:17 UTC
cordova-plugin-media git commit: CB-8152 - Remove deprecated methods
in Media plugin (deprecated since 2.5)
Repository: cordova-plugin-media
Updated Branches:
refs/heads/master e752d54e4 -> ab6563aa2
CB-8152 - Remove deprecated methods in Media plugin (deprecated since 2.5)
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/commit/ab6563aa
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/tree/ab6563aa
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/diff/ab6563aa
Branch: refs/heads/master
Commit: ab6563aa2bc5b988fc0c3ff7f7c401c987a0d184
Parents: e752d54
Author: Shazron Abdullah <sh...@apache.org>
Authored: Thu Dec 11 14:14:15 2014 -0800
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Thu Dec 11 14:14:15 2014 -0800
----------------------------------------------------------------------
src/ios/CDVSound.h | 3 ---
src/ios/CDVSound.m | 46 ----------------------------------------------
2 files changed, 49 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/blob/ab6563aa/src/ios/CDVSound.h
----------------------------------------------------------------------
diff --git a/src/ios/CDVSound.h b/src/ios/CDVSound.h
index 849ca82..984924d 100644
--- a/src/ios/CDVSound.h
+++ b/src/ios/CDVSound.h
@@ -100,9 +100,6 @@ typedef NSUInteger CDVMediaMsg;
// helper methods
- (NSURL*)urlForRecording:(NSString*)resourcePath;
- (NSURL*)urlForPlaying:(NSString*)resourcePath;
-- (NSURL*)urlForResource:(NSString*)resourcePath CDV_DEPRECATED(2.5, "Use specific api for playing or recording");
-
-- (CDVAudioFile*)audioFileForResource:(NSString*)resourcePath withId:(NSString*)mediaId CDV_DEPRECATED(2.5, "Use updated audioFileForResource api");
- (CDVAudioFile*)audioFileForResource:(NSString*)resourcePath withId:(NSString*)mediaId doValidation:(BOOL)bValidate forRecording:(BOOL)bRecord;
- (BOOL)prepareToPlay:(CDVAudioFile*)audioFile withId:(NSString*)mediaId;
http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/blob/ab6563aa/src/ios/CDVSound.m
----------------------------------------------------------------------
diff --git a/src/ios/CDVSound.m b/src/ios/CDVSound.m
index 7370026..8ceaf5b 100644
--- a/src/ios/CDVSound.m
+++ b/src/ios/CDVSound.m
@@ -32,46 +32,6 @@
@synthesize soundCache, avSession;
-- (NSURL*)urlForResource:(NSString*)resourcePath
-{
- NSURL* resourceURL = nil;
- NSString* filePath = nil;
-
- // first try to find HTTP:// or Documents:// resources
-
- if ([resourcePath hasPrefix:HTTP_SCHEME_PREFIX] || [resourcePath hasPrefix:HTTPS_SCHEME_PREFIX]) {
- // if it is a http url, use it
- NSLog(@"Will use resource '%@' from the Internet.", resourcePath);
- resourceURL = [NSURL URLWithString:resourcePath];
- } else if ([resourcePath hasPrefix:DOCUMENTS_SCHEME_PREFIX]) {
- NSString* docsPath = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES)[0];
- filePath = [resourcePath stringByReplacingOccurrencesOfString:DOCUMENTS_SCHEME_PREFIX withString:[NSString stringWithFormat:@"%@/", docsPath]];
- NSLog(@"Will use resource '%@' from the documents folder with path = %@", resourcePath, filePath);
- } else {
- // attempt to find file path in www directory
- filePath = [self.commandDelegate pathForResource:resourcePath];
- if (filePath != nil) {
- NSLog(@"Found resource '%@' in the web folder.", filePath);
- } else {
- filePath = resourcePath;
- NSLog(@"Will attempt to use file resource '%@'", filePath);
- }
- }
- // check that file exists for all but HTTP_SHEME_PREFIX
- if (filePath != nil) {
- // try to access file
- NSFileManager* fMgr = [[NSFileManager alloc] init];
- if (![fMgr fileExistsAtPath:filePath]) {
- resourceURL = nil;
- NSLog(@"Unknown resource '%@'", resourcePath);
- } else {
- // it's a valid file url, use it
- resourceURL = [NSURL fileURLWithPath:filePath];
- }
- }
- return resourceURL;
-}
-
// Maps a url for a resource path for recording
- (NSURL*)urlForRecording:(NSString*)resourcePath
{
@@ -172,12 +132,6 @@
return resourceURL;
}
-- (CDVAudioFile*)audioFileForResource:(NSString*)resourcePath withId:(NSString*)mediaId
-{
- // will maintain backwards compatibility with original implementation
- return [self audioFileForResource:resourcePath withId:mediaId doValidation:YES forRecording:NO];
-}
-
// Creates or gets the cached audio file resource object
- (CDVAudioFile*)audioFileForResource:(NSString*)resourcePath withId:(NSString*)mediaId doValidation:(BOOL)bValidate forRecording:(BOOL)bRecord
{
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org