Closed kaihendry closed 11 years ago
I've figure a way of overriding the Fullscreen API!
<script>
function test() {
video = document.createElement('video');
video.setAttribute('src', 'movie.ogv');
video.setAttribute('loop', 'loop');
document.body.appendChild(video);
video.play();
// http://s.natalian.org/2013-10-11/1381485816_1366x768.png
video.mozRequestFullScreen();
}
</script>
<body onload=test()>
Demo running here:
homepage=http://attract.webconverger.com
prefs=http://ppd.webconverger.com/2013/attract.js
Source code is here: https://github.com/Webconverger/Screensaver
Just to add we are having trouble limiting the fullscreen request permissions to just the homepage.
Using
Components.utils.import("resource://gre/modules/Services.jsm");
Components.utils.import("resource://gre/modules/NetUtil.jsm");
Services.perms.add(NetUtil.newURI("http://attract.webconverger.com/"), "fullscreen", 1);
pref("full-screen-api.allow-trusted-requests-only", false);
Does not work because:
More documentation: http://webconverger.org/screensaver