I am wondering if anyone can provide me a javascript / jquery sample code on how to use the new full-screen (full-window only) Firefox API (see link below). Basically, I would like to click on something that will cause the video to go full screen.
Based on the API, it looks like I can do something like what I know works in Safari (and Chrome's Chrome Dev builds):
$(function(){ $('#full').click(function(){ var video_player = document.getElementById("video"); video_player.onwebkitfullscreenchange = function (){}; video_player.webkitRequestFullScreen(); }); });
UPDATE As Alexander suggested, tonight (11/10/11) I installed the "Nightly" build of Firefox 10, and now the following code works:
$(function(){ $('#full').click(function(){ var video_player = document.getElementById("video"); void video_player.mozRequestFullScreen();
http://blog.pearce.org.nz/2011/11/firefoxs-html-full-screen-api-enabled.html
https://wiki.mozilla.org/index.php?title=Gecko:FullScreenAPI#requestFullScreen_method
source share