incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christophe A. Guilmart (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CB-941) WP7 : Cannot play MP3/wav using MEDIA
Date Thu, 09 Aug 2012 13:18:19 GMT

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

Christophe A. Guilmart updated CB-941:
--------------------------------------

             Priority: Critical  (was: Major)
          Description: 
UPDATED with 2.0 and lastest WP7 OS version information (2012-08-09)

== 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.

index.html

[...]
        <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]


index.js

[...]
    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();
    },
[...]


output debugconfig, terminal connected to Zune):

'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).




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



=== 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.

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. 


  was:
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. 


          Environment: Nokia Lumia 800 with WP 7.5 (7.10.8773.98). Cordova 2.0.0  (was: Nokia
Lumia 800 with WP 7.5 (7.10.7740.16). 1.8.0rc1)
    Affects Version/s: 2.0.0
              Summary: WP7 : Cannot play MP3/wav using MEDIA  (was: WP7 : Cannot play MP3
using MEDIA)
    
> 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
>
> UPDATED with 2.0 and lastest WP7 OS version information (2012-08-09)
> == 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.
> index.html
> [...]
>         <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]
> index.js
> [...]
>     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();
>     },
> [...]
> output debugconfig, terminal connected to Zune):
> '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).
> 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
> === 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.
> 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

       

Mime
View raw message