在我的应用中,我的一个childbrowser链接指向一个带有Flash视频的网站,显示为flowplayer。关闭儿童浏览器后,视频的声音仍会播放约7-15秒。有没有立即停止声音的想法?
来自我的phonegap index.html头部的片段:
<script type="text/javascript" charset="utf-8">
var childBrowser;
function onBodyLoad()
{
document.addEventListener("deviceready",onDeviceReady,false);
}
/* PhoneGap has been initialized and is ready to roll */
function onDeviceReady()
{
phoneGapReady.innerHTML = "PhoneGap is Ready";
childBrowser = ChildBrowser.install();
}
function openChildBrowser(url)
{
try {
//both of these should work...
window.plugins.childBrowser.showWebPage(url);
//childBrowser.showWebPage(url);
}
catch (err)
{
alert(err);
}
}
function closeChildBrowser()
{
window.plugins.childBrowser.close();
}
</script>
以及后来的身体:
<a href="#" onclick="openChildBrowser('http://192.168.1.200/4/2/flowplayer/example/index.html');">click here for video</a>
提前致谢