vendredi 20 novembre 2015

Firefox "Exited full-screen because windowed plugin was focused"

Firefox exits full-screen mode after clicking on Flash. You can test it on our Facebook game: http://ift.tt/1O808I7

Firefox log:

Exited full-screen because windowed plugin was focused.

Javascript code for fullscreen:

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();
    }
}

Embed code:

<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>

Aucun commentaire:

Enregistrer un commentaire