cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benn Mapes (JIRA)" <j...@apache.org>
Subject [jira] [Assigned] (CB-1593) WP7 : Media callback called multiple times
Date Sat, 19 Jan 2013 01:03:12 GMT

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

Benn Mapes reassigned CB-1593:
------------------------------

    Assignee: Benn Mapes  (was: Jesse MacFadyen)
    
> WP7 : Media callback called multiple times
> ------------------------------------------
>
>                 Key: CB-1593
>                 URL: https://issues.apache.org/jira/browse/CB-1593
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: WP7
>    Affects Versions: 2.1.0
>         Environment: Nokia Lumia 800 with WP 7.5 (7.10.8773.98).
>            Reporter: Christophe A. Guilmart
>            Assignee: Benn Mapes
>            Priority: Critical
>
> When using this code
>           function play(){
>             cordovaMedia = new Media("app/www/test.mp3", onSuccess, onError, onStatus);
>             cordovaMedia.play();
> 		  }
> 		  
> I encounter the following problems:
> * 1st call to play() does not work (ie: I don't hear the sound). nor are the callback
called.
> * following play work, but callback are called multiple times.
> * onError is called even when play sound is successful (ie: when I can hear the sound).
> * if onStatus callback is not provided, an error show up in the log.
> Expected behavior:
> * onError & onSuccess should be exclusive. One OR the other should be called. Not
both.
> * onError & onSuccess should be called only once per call to .play()
> h3. VS Output:
> Log:"Received Event: deviceready"
> Log:"----------------------------------"
> Log:"# media play 0"
> 'UI Task' (Managed): Loaded 'Microsoft.Xna.Framework.dll'
> 'UI Task' (Managed): Loaded 'System.SR.dll'
> Log:"----------------------------------"
> Log:"# media play 1"
> Log:"####### media On Error. error: Value does not fall within the expected range. code:
undefined message: undefined"
> Log:"# media OnStatus: 1"
> Log:"# media OnStatus: 1"
> Log:"# media OnStatus: 1"
> Log:"# media OnStatus: 1"
> Log:"# media OnStatus: 2"
> Log:"# media OnStatus: 2"
> Log:"# media OnStatus: 2"
> Log:"# media OnStatus: 2"
> Log:"# media On success. "
> Log:"# media OnStatus: 4"
> Log:"# media On success. "
> Log:"# media On success. "
> Log:"# media On success. "
> Log:"# media OnStatus: 4"
> Log:"# media OnStatus: 4"
> Log:"# media OnStatus: 4"
> Log:"----------------------------------"
> INFO: startPlayingAudio FOUND mediaPlayer for b43e2cd0-bafb-f6d3-add6-79428f19e324
> Log:"# media play 2"
> Log:"# media OnStatus: 1"
> Log:"# media OnStatus: 1"
> Log:"# media OnStatus: 1"
> Log:"# media OnStatus: 1"
> Log:"# media OnStatus: 1"
> Log:"# media OnStatus: 1"
> Log:"# media OnStatus: 2"
> Log:"# media OnStatus: 2"
> Log:"# media OnStatus: 2"
> Log:"# media OnStatus: 2"
> Log:"# media OnStatus: 2"
> Log:"# media OnStatus: 2"
> Log:"# media OnStatus: 2"
> Log:"# media OnStatus: 2"
> Log:"# media OnStatus: 2"
> Log:"# media OnStatus: 2"
> Log:"# media OnStatus: 2"
> Log:"# media OnStatus: 2"
> Log:"# media OnStatus: 4"
> Log:"# media On success. "
> Log:"# media OnStatus: 4"
> Log:"# media OnStatus: 4"
> Log:"# media On success. "
> Log:"# media On success. "
> Log:"# media OnStatus: 4"
> Log:"# media On success. "
> Log:"# media OnStatus: 4"
> Log:"# media OnStatus: 4"
> Log:"# media OnStatus: 4"
> Log:"# media OnStatus: 4"
> Log:"# media On success. "
> Log:"# media OnStatus: 4"
> Log:"# media OnStatus: 4"
> Log:"# media On success. "
> Log:"# media OnStatus: 4"
> Log:"# media OnStatus: 4"
> Log:"# media On success. "
> Log:"# media On success. "
> Log:"# media On success. "
> Log:"# media On success. "
> Log:"# media On success. "
> Log:"# media On success. "
> Log:"----------------------------------"
> Log:"# media play 3"
> Log:"####### media On Error. error: Value does not fall within the expected range. code:
undefined message: undefined"
> Log:"# media OnStatus: 1"
> Log:"# media OnStatus: 1"
> Log:"# media OnStatus: 1"
> Log:"# media OnStatus: 1"
> Log:"# media OnStatus: 1"
> Log:"# media OnStatus: 1"
> Log:"# media OnStatus: 1"
> Log:"# media OnStatus: 1"
> Log:"# media OnStatus: 2"
> Log:"# media OnStatus: 2"
> Log:"# media OnStatus: 2"
> Log:"# media OnStatus: 2"
> Log:"# media OnStatus: 2"
> Log:"# media OnStatus: 2"
> Log:"# media OnStatus: 2"
> Log:"# media OnStatus: 2"
> Log:"# media OnStatus: 2"
> Log:"# media OnStatus: 2"
> Log:"# media OnStatus: 2"
> Log:"# media OnStatus: 2"
> Log:"# media OnStatus: 2"
> Log:"# media OnStatus: 2"
> Log:"# media OnStatus: 2"
> Log:"# media OnStatus: 2"
> Log:"# media OnStatus: 2"
> Log:"# media OnStatus: 2"
> Log:"# media OnStatus: 2"
> Log:"# media OnStatus: 2"
> Log:"# media OnStatus: 2"
> Log:"# media OnStatus: 2"
> Log:"# media OnStatus: 2"
> Log:"# media OnStatus: 2"
> Log:"# media On success. "
> Log:"# media OnStatus: 4"
> Log:"# media On success. "
> Log:"# media On success. "
> Log:"# media OnStatus: 4"
> Log:"# media On success. "
> Log:"# media On success. "
> Log:"# media OnStatus: 4"
> Log:"# media On success. "
> Log:"# media OnStatus: 4"
> Log:"# media On success. "
> Log:"# media On success. "
> Log:"# media OnStatus: 4"
> Log:"# media On success. "
> Log:"# media On success. "
> Log:"# media On success. "
> Log:"# media OnStatus: 4"
> Log:"# media OnStatus: 4"
> Log:"# media On success. "
> Log:"# media On success. "
> Log:"# media OnStatus: 4"
> Log:"# media OnStatus: 4"
> Log:"# media On success. "
> Log:"# media OnStatus: 4"
> Log:"# media On success. "
> Log:"# media OnStatus: 4"
> Log:"# media OnStatus: 4"
> Log:"# media OnStatus: 4"
> Log:"# media On success. "
> Log:"# media On success. "
> Log:"# media OnStatus: 4"
> Log:"# media OnStatus: 4"
> Log:"# media OnStatus: 4"
> Log:"# media OnStatus: 4"
> Log:"# media OnStatus: 4"
> Log:"# media OnStatus: 4"
> Log:"# media OnStatus: 4"
> Log:"# media On success. "
> Log:"# media On success. "
> Log:"# media On success. "
> Log:"# media OnStatus: 4"
> Log:"# media On success. "
> Log:"# media OnStatus: 4"
> Log:"# media OnStatus: 4"
> Log:"# media On success. "
> Log:"# media On success. "
> Log:"# media On success. "
> Log:"# media OnStatus: 4"
> h3. index.html
> [...]
>         <script type="text/javascript">
>           app.initialize();
>           function onError (error){
>           var s = "####### media On Error. ";
>           if ((typeof error === "undefined") || (error==null)){
>           s = s + " no error info."
>           } else {
>           s = s +  "error: " + error +
>           ' code: '    + error.code    +
>           ' message: ' + error.message;
>           }
>           console.log(s);
>           }
>           function onSuccess (){
>           var s = "# media On success. ";
>           console.log(s);
>           }
>           function onStatus (status){
>           var s = "# media OnStatus: " + status;
>           console.log(s);
>           }
>           var playcounter = 0;
>           function play(){
>           console.log("----------------------------------");
>           var s = "# media play " + playcounter;
>           console.log(s);
>           cordovaMedia = new Media("app/www/test.mp3", onSuccess, onError, onStatus);
>           cordovaMedia.play();
>           playcounter++;
>           }
>         </script>
>       <p onclick="play();">Click to Play MP3</p>
>       
>     </body>
> </html>
> h3. My Config:
> * cordova : 2.1.0-0-g26d211b
> * template "full"
> * 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

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