Forcing to view the video in fullscreen mode Events and Cuepoints - Demo 6 / 7
Introduction
This demo is highly experimental and possibly unusable. However it will show you how Flash security settings work when we attempt to go to fullscreen mode by scripting. The fact is that you cannot enter fullscreen mode in any way outside the Flash object. This has been prohibited by the Flash technology and it cannot be changed. Flash requirest that there must be mouse click over the Flash object prior the fullscreen mode is entered.
Since 3.1.1 Flowplayer API introduced a method toggleFullscreen which can be used to enter and exit from fullscreen mode. In following demo we call that method inside onResume event listener. You can see that it works when pause is hit from the player but it wont work when you press the HTML button.
Flowplayer configuration
Simple configuration with onPause event.
flowplayer("player", "http://releases.flowplayer.org/swf/flowplayer-3.2.7.swf", {
clip: {
autoPlay: false,
autoBuffering: true,
onResume: function() {
if (!this.isFullscreen()) {
this.toggleFullscreen();
}
}
}
});
HTML button
The HTML/JavaScript code for the button.
<button type="button" onClick="$f().toggle()">Play/Pause</button>
<small>(fullscreen mode won't be entered with this button)</small>