[
https://issues.apache.org/jira/browse/CB-10476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15123460#comment-15123460
]
ASF GitHub Bot commented on CB-10476:
-------------------------------------
GitHub user jclalala opened a pull request:
https://github.com/apache/cordova-plugin-media/pull/78
CB-10476 - fix problem where callbacks were not invoked on android du…
seems like the faulty code was added back in this commit:
https://github.com/apache/cordova-plugin-media/commit/c4547c94c5850c619b0936551ec1180f4465a95b#diff-ea1d1dcd03fa62ee9f2774edbf524977
line 121.
problem happens when messageChannel is reset with callbackContext every
call... removing this will fix the problem.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/jclalala/cordova-plugin-media master
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/cordova-plugin-media/pull/78.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #78
----
commit 8801f3943c557a82747781696f1e20978b8184e0
Author: Jeffrey Chang <[email protected]>
Date: 2016-01-29T13:13:59Z
CB-10476 - fix problem where callbacks were not invoked on android due to
messageChannel being overridden by callbackContext in every execut() call
----
> cordova-plugin-media 2.1.0 dos not fire mediaSuccess
> ----------------------------------------------------
>
> Key: CB-10476
> URL: https://issues.apache.org/jira/browse/CB-10476
> Project: Apache Cordova
> Issue Type: Bug
> Components: Plugin Media
> Environment: cordova-plugin-file 4.1.0 "File"
> cordova-plugin-media 2.1.0 "Media"
> Installed platforms: android 5.1.0
> Reporter: jose nuno neto
>
> I am runnig a simple test from the code on github, the sound file plays okbut
> the success function does not get fired.
> Code below:
> var my_media = new Media("file:///android_asset/www/hello2.wav",
> // success callback
> function () {
> console.log("playAudio():Audio Success");
> },
> // error callback
> function (err) {
> console.log("playAudio():Audio Error: " + err);
> },
> function () {
> console.log("playAudio():Audio Status");
> }
>
> );
> // Play audio
> my_media.play();
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]