android - Phonegap InAppBrowser doesnt stop YouTube video on closing -


am using inappbrowser play youtube videos. able embed videos , play it, while playing if click on "done" button goes was, still can hear audio. looks didnt kill childbrowser. tried clearing out player html in order stop video, didnt work.

var childbrowser = window.open(videourl, '_blank', 'location=yes'); // childbrowser inappbrowser object childbrowser.addeventlistener('exit', function(event) {         top.document.getelemenetbyid("player").innerhtml = "<p></p>"; }); 

any solution ?

i had similar problems and, adapted code, solution this:

 var childbrowser = window.open(videourl, '_blank', 'location=yes');   var closecb = function(event){   childbrowser.removeeventlistener('exit',closecb);   childbrowser.close();   childbrowser = null;    //for reusability purposes suggest use "display: none" here   top.document.getelemenetbyid("player").style.display = "none"; };  childbrowser.addeventlistener('exit', closecb); 

Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -