Androidphonegap childbrowser:关闭childbrowser后Flashvideo仍然播放声音
在我的应用程序中,我的子浏览器链接之一指向一个带有 Flash 视频的网站,用 flowplayer 显示。关闭子浏览器后,视频的声音仍会播放约 7-15 秒。有什么办法可以立即停止声音吗?
来自我的phonegap index.html head的片段:
<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>
提前致谢
In my app, one of my childbrowser links points to a site with a flash video, shown with flowplayer. After closing the childbrowser, the sound of the video still plays for about 7-15 seconds. Any ideas to stop the sound immediately?
snippet from my phonegap index.html head:
<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>
and later in the body:
<a href="#" onclick="openChildBrowser('http://192.168.1.200/4/2/flowplayer/example/index.html');">click here for video</a>
thanks in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论