gpt4 book ai didi

javascript - 火狐 "Exited full-screen because windowed plugin was focused"

转载 作者:行者123 更新时间:2023-11-30 00:19:06 27 4
gpt4 key购买 nike

Firefox 在点击 Flash 后退出全屏模式。您可以在我们的 Facebook 游戏上进行测试:https://apps.facebook.com/upogame/ffbug.html

Firefox 日志:

Exited full-screen because windowed plugin was focused.

全屏的 Javascript 代码:

if ((document.fullScreenElement && document.fullScreenElement !== null) ||    // alternative standard method
(!document.mozFullScreen && !document.webkitIsFullScreen)) {
if (document.documentElement.requestFullScreen) {
document.documentElement.requestFullScreen();
} else if (document.documentElement.mozRequestFullScreen) {
document.documentElement.mozRequestFullScreen();
} else if (document.documentElement.webkitRequestFullScreen) {
document.documentElement.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT);
}

} else {
if (document.cancelFullScreen) {
document.cancelFullScreen();
} else if (document.mozCancelFullScreen) {
document.mozCancelFullScreen();
} else if (document.webkitCancelFullScreen) {
document.webkitCancelFullScreen();
}
}

嵌入代码:

<script type="text/javascript">
var swfVersionStr = "18.0.0";
var xiSwfUrlStr = "playerProductInstall.swf";
var flashvars = {};
var params = {};
params.quality = "high";
params.bgcolor = "#B0E0FF";
params.allowscriptaccess = "sameDomain";
params.allowfullscreen = "true";
params.allowFullScreenInteractive = "true";
params.wmode = "direct";
var attributes = {};
attributes.id = "OOPPO";
attributes.name = "OOPPO";
attributes.align = "middle";
swfobject.embedSWF(
"secure_Ooppo.swf?"+"19", "flashContent",
"100%", "100%",
swfVersionStr, xiSwfUrlStr,
flashvars, params, attributes);
swfobject.createCSS("#flashContent", "display:block; text-align:left;");
</script>

最佳答案

在 Firefox 上禁用全屏窗口插件以防止网络钓鱼等安全问题。 This bug由于这个原因被报告并修复。

在您的情况下,我相信您需要在 swfobject 上设置 params.wmode = 'transparent' 或 params.wmode = 'opaque' 才能在 Firefox 上全屏工作。

关于javascript - 火狐 "Exited full-screen because windowed plugin was focused",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33835797/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com