[jira] [Commented] (CB-5890) Media won't play local file on iOS

2015-02-23 Thread Chris Emerson (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-5890?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14333797#comment-14333797
 ] 

Chris Emerson commented on CB-5890:
---

FWIW I also got this once (error very similar) when the file (URL) path was 
pointing to a non-existent mp3.

> Media won't play local file on iOS
> --
>
> Key: CB-5890
> URL: https://issues.apache.org/jira/browse/CB-5890
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin Media
>Affects Versions: 3.3.0
> Environment: iOS
>Reporter: John M. Wargo
>
> I have an application that will play a media file on Android, but not on iOS. 
> When I try to play the file, the console indicates that it can find the file, 
> but fails on opening it:
> Failed to initialize AVAudioPlayer
> Here's some console entries:
> 2014-01-24 08:49:51.374 Ex141[386:60b] Entering doPlay
> 2014-01-24 08:49:51.376 Ex141[386:60b] Found resource 
> '/var/mobile/Applications/C557863E-BB8C-4384-8188-9C36B5B603C4/Ex141.app/www/sample.mp3'
>  in the web folder.
> 2014-01-24 08:49:51.391 Ex141[386:60b] Failed to initialize AVAudioPlayer: 
> The operation couldn’t be completed. (OSStatus error 1685348671.)
> 2014-01-24 08:49:51.394 Ex141[386:60b] THREAD WARNING: ['Media'] took 
> '18.647949' ms. Plugin should use a background thread.
> 2014-01-24 08:49:51.396 Ex141[386:60b] Leaving doPlay
> 2014-01-24 08:49:51.397 Ex141[386:60b] ERROR: Entering mediaError
> 2014-01-24 08:49:51.398 Ex141[386:60b] ERROR: {"message":"","code":4}
> Notice that the message string is blank. 
> This is my code:
> theFile = 'sample.mp3';
> theMedia = new Media(theFile, mediaSuccess, mediaError, mediaStatus);
> theMedia.play();



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-5890) Media won't play local file on iOS

2014-01-27 Thread Shazron Abdullah (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-5890?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13883466#comment-13883466
 ] 

Shazron Abdullah commented on CB-5890:
--

Culprit: 
https://github.com/apache/cordova-plugin-media/blob/e88e3e43d2382f3c5a325f65d89e023cf9ff7c38/src/ios/CDVSound.m#L358
MEDIA_ERR_NONE_SUPPORTED is the code 4.

> Media won't play local file on iOS
> --
>
> Key: CB-5890
> URL: https://issues.apache.org/jira/browse/CB-5890
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: iOS, Plugin Media
>Affects Versions: 3.3.0
> Environment: Mac OSX
>Reporter: John M. Wargo
>
> I have an application that will play a media file on Android, but not on iOS. 
> When I try to play the file, the console indicates that it can find the file, 
> but fails on opening it:
> Failed to initialize AVAudioPlayer
> Here's some console entries:
> 2014-01-24 08:49:51.374 Ex141[386:60b] Entering doPlay
> 2014-01-24 08:49:51.376 Ex141[386:60b] Found resource 
> '/var/mobile/Applications/C557863E-BB8C-4384-8188-9C36B5B603C4/Ex141.app/www/sample.mp3'
>  in the web folder.
> 2014-01-24 08:49:51.391 Ex141[386:60b] Failed to initialize AVAudioPlayer: 
> The operation couldn’t be completed. (OSStatus error 1685348671.)
> 2014-01-24 08:49:51.394 Ex141[386:60b] THREAD WARNING: ['Media'] took 
> '18.647949' ms. Plugin should use a background thread.
> 2014-01-24 08:49:51.396 Ex141[386:60b] Leaving doPlay
> 2014-01-24 08:49:51.397 Ex141[386:60b] ERROR: Entering mediaError
> 2014-01-24 08:49:51.398 Ex141[386:60b] ERROR: {"message":"","code":4}
> Notice that the message string is blank. 
> This is my code:
> theFile = 'sample.mp3';
> theMedia = new Media(theFile, mediaSuccess, mediaError, mediaStatus);
> theMedia.play();



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)


[jira] [Commented] (CB-5890) Media won't play local file on iOS

2014-01-26 Thread John M. Wargo (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-5890?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13882345#comment-13882345
 ] 

John M. Wargo commented on CB-5890:
---

I did a search on the OSStatus error message and found out that the issue is 
with the file format. Somehow my file, although it will play on Android, won't 
play on iOS.
I rerecorded my sample media file on the iOS voice recorder and the file will 
play on both devices. 

There's still a bug here that the error message is blank, but there seems to 
also be a problem with the interface to the media player as I know the file 
was...good.

> Media won't play local file on iOS
> --
>
> Key: CB-5890
> URL: https://issues.apache.org/jira/browse/CB-5890
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: iOS, Plugin Media
>Affects Versions: 3.3.0
> Environment: Mac OSX
>Reporter: John M. Wargo
>
> I have an application that will play a media file on Android, but not on iOS. 
> When I try to play the file, the console indicates that it can find the file, 
> but fails on opening it:
> Failed to initialize AVAudioPlayer
> Here's some console entries:
> 2014-01-24 08:49:51.374 Ex141[386:60b] Entering doPlay
> 2014-01-24 08:49:51.376 Ex141[386:60b] Found resource 
> '/var/mobile/Applications/C557863E-BB8C-4384-8188-9C36B5B603C4/Ex141.app/www/sample.mp3'
>  in the web folder.
> 2014-01-24 08:49:51.391 Ex141[386:60b] Failed to initialize AVAudioPlayer: 
> The operation couldn’t be completed. (OSStatus error 1685348671.)
> 2014-01-24 08:49:51.394 Ex141[386:60b] THREAD WARNING: ['Media'] took 
> '18.647949' ms. Plugin should use a background thread.
> 2014-01-24 08:49:51.396 Ex141[386:60b] Leaving doPlay
> 2014-01-24 08:49:51.397 Ex141[386:60b] ERROR: Entering mediaError
> 2014-01-24 08:49:51.398 Ex141[386:60b] ERROR: {"message":"","code":4}
> Notice that the message string is blank. 
> This is my code:
> theFile = 'sample.mp3';
> theMedia = new Media(theFile, mediaSuccess, mediaError, mediaStatus);
> theMedia.play();



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)