2
Apparently for a video to stay on fullscreen there needs to be user interaction. Most players, including the native HTML5 has button 'fullscreen'.
I’m building an interactive platform offline, and I need to click a button (teaser), automatically open a player by playing a video on fullscreen and at the end remain in or return to the screen that was:
I thought of these two solutions, which are within my current programming capacity:
1) Create another HTML page with the following codes:
<body class="fadein">
<video id=video autobuffer autoplay="true">
<source src="media_v/video.mp4">
<object type="video/mp4" data="media_v/video.mp4" width="1366"
height="768">
</object>
</video>
<script>
document.getElementById('video').addEventListener('ended',myHandler,false);
function myHandler(e) {
window.location.href = "menu_option.html";
}
</script>
It turns out that in this mode it does not take the whole screen, even with the measurements having the native resolution of the screen 1366x768, it leaves a border and I can not put the whole object on screen without the user click the button fullscreen, not even using:
<script>
var elem = document.getElementById("video");
if (elem.requestFullscreen) {
elem.requestFullscreen();
} else if (elem.mozRequestFullScreen) {
elem.mozRequestFullScreen();
} else if (elem.webkitRequestFullscreen) {
elem.webkitRequestFullscreen();
}
</script>
or
video id=video autobuffer autoplay="true" fullscreen="true"
Exists "fullscreen='true'"?
2) The other way I thought was that by clicking the 'button' already open a video 'as overlay content' in mode fullscreen, like the Facebook player, but in this case I don’t think I even know where to start, so here I am.
Automatic fullscreen videos are impractical, since to open the mode fullscreen we always need the user’s authorization.
– Bsalvo
I’m aware of that imposition, but how do we get around it? For example I put the video size the same as the native screen resolution that will receive this interface, which will work in fullscreen in Chrome’s "Kiosk" mode. What to do? Since there is still an edge on the object?
– dib
100% open but controls do not appear. Vaja http://kithomepage.com/sos/Video.htm
– user60252
Thank you, I’ll check!
– dib