Christophe A. Guilmart created CB-941:
-----------------------------------------
Summary: WP7 : Cannot play MP3 using MEDIA
Key: CB-941
URL: https://issues.apache.org/jira/browse/CB-941
Project: Apache Cordova
Issue Type: Bug
Components: WP7
Affects Versions: 1.8.0
Environment: Nokia Lumia 800 with WP 7.5 (7.10.7740.16). 1.8.0rc1
Reporter: Christophe A. Guilmart
Assignee: Jesse MacFadyen
The MP3 file is only played once (the first time).
* If I create a new instance of MEDIA each time, the MP3 file is only played
once (the first time).
* If I keep alive the instance (create it in onDeviceReady), I can play
multiple time the first mp3 I play. BUT, I cannot play the other mp3.
note:
* with version 1.6.1, turn OFF then ON the screen allow you to play one more
time the mp3. Not with 1.8.0.
* same issue with 1.6.1, but the error message are IOException &
IsolatedStorageException with various "MEDIA on status" information.
var playCounter = 0;
var my_media = null;
function playMP3(){
console.log("playMP3()counter " + playCounter);
if (!(my_media == null)){
my_media.release(); //Cordova 1.8.0
}
my_media = new Media("app/www/test.mp3");//ressource buildAction ==
content
my_media.play();
playCounter++;
}
var my_media2 = null;
function playMP32(){
console.log("playMP32() counter " + playCounter);
if (!(my_media2 == null)){
my_media2.release(); //Cordova 1.8.0
}
my_media2 = new Media("app/www/test2.mp3");//ressource buildAction ==
content
my_media2.play();
playCounter++;
}
[...]
<p onclick="playMP3();">Click to Play MP3</p>
<p onclick="playMP32();">Click to Play MP3 2</p>
Log:
Log:"onDeviceReady. You should see this message in Visual Studio's output
window."
'UI Task' (Managed): Loaded 'Microsoft.Xna.Framework.dll'
Log:"playMP3() counter 0"
'UI Task' (Managed): Loaded 'System.SR.dll'
A first chance exception of type 'System.ArgumentException' occurred in
mscorlib.dll
Log:"playMP3() counter 1"
A first chance exception of type 'System.ArgumentException' occurred in
mscorlib.dll
Dispose :: app/www/test.mp3
A first chance exception of type 'System.NullReferenceException' occurred in
WP7CordovaClassLib.dll
A first chance exception of type 'System.ArgumentException' occurred in
System.Windows.dll
Error: El parĂ¡metro es incorrecto.
Log:"playMP32() counter 2"
INFO: startPlayingAudio could not find mediaPlayer for
b5e8e480-de8b-ab2c-82a6-c60270f590f2
A first chance exception of type 'System.ArgumentException' occurred in
System.Windows.dll
Error: El parĂ¡metro es incorrecto.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira