Return-Path: X-Original-To: apmail-cordova-commits-archive@www.apache.org Delivered-To: apmail-cordova-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9DDF4C1E5 for ; Thu, 11 Dec 2014 22:14:17 +0000 (UTC) Received: (qmail 45249 invoked by uid 500); 11 Dec 2014 22:14:17 -0000 Delivered-To: apmail-cordova-commits-archive@cordova.apache.org Received: (qmail 45229 invoked by uid 500); 11 Dec 2014 22:14:17 -0000 Mailing-List: contact commits-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list commits@cordova.apache.org Received: (qmail 45220 invoked by uid 99); 11 Dec 2014 22:14:17 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Dec 2014 22:14:17 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 1A330A2771C; Thu, 11 Dec 2014 22:14:17 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: shazron@apache.org To: commits@cordova.apache.org Message-Id: <79cf295ff540465f82e35439e90637b4@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: cordova-plugin-media git commit: CB-8152 - Remove deprecated methods in Media plugin (deprecated since 2.5) Date: Thu, 11 Dec 2014 22:14:17 +0000 (UTC) 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 Authored: Thu Dec 11 14:14:15 2014 -0800 Committer: Shazron Abdullah 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