How can stop youtube video sound after closing webview opened by inappbrowser(Android Phonegap 2.4.0 plugin)
I used two week to fix that problem and tired out..............
When I click 'Done' button to close webview(youtube page), the video still play in the background.
Even after shutting down app, can't stop video sound. To stop video I had to turn off phone.
This is my code
<script type="text/javascript" charset="utf-8">
function OpenWin(juso) {
window.open(juso, '_blank', 'location=yes');
}
</script>
<body>
...................
<a href="#" onclick="OpenWin('http://m.youtube.com')">
...................
</body>
Is there any wrong in my code? May I get some help?
I am using Sencha Touch and using the following trick to stop the Youtube Video sound. You may take it as reference.
var ref = window.open(url,'_blank',options);
ref.addEventListener('exit',function(){
Ext.defer(function(){
ref.removeEventListener('exit',function(){
console.log('Closed');
});
var ref2 = window.open('about:blank','_blank','hidden=yes');
Ext.defer(function(){
ref2.close();
},350);
},350);
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With