jPlayer fullscreen while inside IFRAME?

fullscreen, html5-video, iframe, jplayer, jquery

Solution

put this in iframe

<iframe /* your iframe code */ webkitAllowFullScreen="true" mozallowfullscreen="true" allowFullScreen="true"></iframe>

and add this in js file

$("a.jp-full-screen").on('click', function() {
    var docm, rqst;

    docm = document.documentElement;
    rqst = docm.requestFullScreen || docm.webkitRequestFullScreen || docm.mozRequestFullScreen || docm.msRequestFullScreen;

    if(typeof rqst!="undefined" && rqst){
        rqst.call(docm);
    }
});
$("a.jp-restore-screen").on('click', function() {
    var docm, rqst;

    docm = document;
    rqst = docm.cancelFullScreen|| docm.webkitCancelFullScreen || docm.mozCancelFullScreen || docm.msCancelFullScreen || docm.exitFullscreen;
    if(typeof rqst!="undefined" && rqst){
        rqst.call(docm);
    }
});

i'm not sure if this works with the flash solution

Problem

Can jPlayer's fullscreen be made to work while inside an `IFRAME` tag? As is, the "full screen" is restricted by the size of the iframe. EDIT: Here's how I insert jPlayer in an `IFRAME`: ``` <div id="movieContainer" > <object id="videoTut" name="videoTut" type="text/html" data="/videotutorial/videotut.html"> </object> </div> ``` Where `videotut.html` contains a full HTML page that contains jPlayer and works if loaded independently. And the `object` tag is modified using code like `document.getElementById('movieContainer').innerHTML = '...`. Also see: https://groups.google.com/forum/#!topic/jplayer/IQxIIYhtAnE (P.S. If you'd like to help me out on a multiple video design for jPlayer, please do so here: jPlayer multi-video demo code?)

Original source