incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jesse MacFadyen (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (CB-941) WP7 : Cannot play MP3/wav using MEDIA
Date Fri, 31 Aug 2012 10:05:08 GMT

     [ https://issues.apache.org/jira/browse/CB-941?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jesse MacFadyen resolved CB-941.
--------------------------------

    Resolution: Fixed

https://github.com/purplecabbage/incubator-cordova-wp7/commit/86611cd1e07f72f19e01396f0ea067ae363b2467

Note that WP7+Silverlight only supports 1 MediaElement at a time, so there cannot be overlapping
sounds in the current implementation.
                
> WP7 : Cannot play MP3/wav 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, 2.0.0
>         Environment: Nokia Lumia 800 with WP 7.5 (7.10.8773.98). Cordova 2.0.0
>            Reporter: Christophe A. Guilmart
>            Assignee: Jesse MacFadyen
>            Priority: Critical
>         Attachments: chord.wav, index.html, index.js, test.mp3
>
>
> UPDATED with 2.0 and lastest WP7 OS version information (2012-08-09)
> h1. 2.0
> * This is worst on Cordova 2.0.0 : the file is never played.
> * same result with VS configuration Debug and Release. 
> * same result while the terminal is connected to Zune and while the terminal is not connected.
(I tried this becasue of http://blogs.msdn.com/b/jaimer/archive/2010/11/03/tips-for-debugging-wp7-media-apps-with-wpconnect.aspx)
> * I also tried with a wav file. same result.
> h3. index.html
> {noformat}
> [...]
>         <title>Hello Cordova</title>
> <script>
>   function MyInit()
>   {
>   document.getElementById("welcomeMsg").innerHTML += "Cordova is ready! version=" + window.device.cordova;
>   console.log("onDeviceReady. You should see this message in Visual Studio's output window.");
>   //  my_media = new Media("app/www/test.mp3");//ressource buildAction == content
>   my_media = new Media("app/www/chord.wav");//ressource buildAction == content; copied
from C:\Windows\Media
>   my_media2 = new Media("app/www/test2.mp3");//ressource buildAction == content
>   }
>   var playCounter = 0;
>   var my_media = null;
>   function playMP3(){
>   console.log("playMP3() counter " + playCounter);
>   my_media.play();
>   playCounter++;
>   }
>   var my_media2 = null;
>   function playMP32(){
>   console.log("playMP32() counter " + playCounter);
>   my_media2.play();
>   playCounter++;
>   }
> </script>
>     </head>
>     <body>
>         <div id="welcomeMsg"></div>
>         <div class="app">
>             <h1>Apache Cordova</h1>
>             <div id="deviceready">
>                 <p class="status pending blink">Connecting to Device</p>
>                 <p class="status complete blink hide">Device is Ready</p>
>             </div>
>         </div>
>         <script type="text/javascript" src="cordova-2.0.0.js"></script>
>         <script type="text/javascript" src="js/index.js"></script>
>         <script type="text/javascript">
>             app.initialize();
> 			</script>
>     <p onclick="playMP3();">Click to Play MP3</p>
>     <p onclick="playMP32();">Click to Play MP3 2</p>
> 			</body>
> </html>
> [EOF]
> {noformat}
> h3. index.js
> {noformat}
> [...]
>     deviceready: function() {
>         // note that this is an event handler so the scope is that of the event
>         // so we need to call app.report(), and not this.report()
>         app.report('deviceready');
> 		MyInit();
>     },
> [...]
> {noformat}
> h3. output (debug config, terminal connected to Zune):
> {noformat}
> 'UI Task' (Managed): Loaded 'System.SR.dll'
> A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll
> A first chance exception of type 'System.IO.IsolatedStorage.IsolatedStorageException'
occurred in mscorlib.dll
> Updating IsolatedStorage for APP:DeviceID :: [edited]
> INFO: Creating Directory :: /app/www
> INFO: Writing data for /app/www\chord.wav and length = 113964
> INFO: Creating Directory :: /app/www\js
> INFO: Writing data for /app/www\js\index.js and length = 792
> INFO: Writing data for /app/www\test.mp3 and length = 34396
> INFO: Writing data for /app/www\test2.mp3 and length = 34396
> INFO: Writing data for /app/www\cordova-2.0.0.js and length = 188657
> INFO: Creating Directory :: /app/www\css
> INFO: Writing data for /app/www\css\index.css and length = 2239
> INFO: Creating Directory :: /app/www\img
> INFO: Writing data for /app/www\img\cordova.png and length = 19932
> INFO: Writing data for /app/www\index.html and length = 1990
> GapBrowser_Navigated :: /app/www/index.html
> 'UI Task' (Managed): Loaded 'System.ServiceModel.Web.dll'
> 'UI Task' (Managed): Loaded 'System.ServiceModel.dll'
> The thread '<No Name>' (0x16490a2e) has exited with code 0 (0x0).
> The thread '<No Name>' (0x17630a6a) has exited with code 0 (0x0).
> Log:"report:deviceready"
> The thread '<No Name>' (0x16a507aa) has exited with code 0 (0x0).
> 'UI Task' (Managed): Loaded 'Microsoft.Xna.Framework.dll'
> Log:"onDeviceReady. You should see this message in Visual Studio's output window."
> The thread '<No Name>' (0x173d0dbe) has exited with code 0 (0x0).
> The thread '<No Name>' (0x1731027e) has exited with code 0 (0x0).
> The thread '<No Name>' (0x162a0a4e) has exited with code 0 (0x0).
> Log:"playMP3() counter 0"
> A first chance exception of type 'System.ArgumentNullException' occurred in mscorlib.dll
> The thread '<No Name>' (0x16cd082e) has exited with code 0 (0x0).
> The thread '<No Name>' (0x176d0d3a) has exited with code 0 (0x0).
> Log:"playMP32() counter 1"
> The thread '<No Name>' (0x16a808e6) has exited with code 0 (0x0).
> A first chance exception of type 'System.ArgumentNullException' occurred in mscorlib.dll
> The thread '<No Name>' (0x179e0852) has exited with code 0 (0x0).
> {noformat}
> h3. My Config:
> * cordova : 2.0.0
> * Nokia Lumia 800
> * Version OS : 7.10.8773.98 (commercial : 7.5)
> * Microsoft Visual Studio 2010
> Version WPDTRTMRel - 40219.209
> Microsoft .NET Framework
> Version 4.0.30319 SP1Rel
> Installed Version: PD Express
> h1. 1.8 / (7.10.7740.16)
> 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.
> h3. 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. 
> {noformat}
>       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>
> {noformat}
> h3. Log:
> {noformat}
> 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. 
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message