incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon MacDonald <>
Subject CB-321 - Media API: 'mediaSuccess' callback param to new Media() is called soon after new obj created
Date Fri, 30 Mar 2012 17:39:32 GMT
So I was looking at CB 321 and I know how to fix the issue. In earlier
Android releases we did not pass the success and failure callbacks to
the exec in the method. So the way things work now if you

media1 = new Media(src, win, fail);;

You will get the win callback called as soon as play is executed. Then
again when the audio file has completed playing.

If I change: = function(options) {
    exec(this.successCallback, this.errorCallback, "Media",
"startPlayingAudio", [, this.src, options]);

to: = function(options) {
    exec(null, null, "Media", "startPlayingAudio", [, this.src,

the original behaviour returns but I don't want to do that if it is
going to mess up the other platforms. Let me know what would happen
iOS and BB folks.

Simon Mac Donald

View raw message