This is a message.

Mandatory preroll video clips

Force the user to watch the first video

standalone demo

This demo illustrates the following scenario:

  • The first video will be "forced" so that the user needs to view it completely before he can proceed to the second video clip. It cannot be paused and the control bar is hidden.
  • The second video is played normally. Pausing is enabled and the control bar is visible.
  • At the end of the playlist we rewind back to the original state with the HTML splash image.

Configuration

// set up player
$f("player", "http://releases.flowplayer.org/swf/flowplayer-3.2.18.swf", {
 
// controlbar is initially hidden
plugins: {
controls: {display: 'none' }
},
 
// properties that are common to both clips in the playlist
clip: {
baseUrl: 'http://edge.flowplayer.org'
},
 
// playlist with two entries
playlist: [
 
// user is forced to see this entry. pause action is disabled
{
url: 'KimAronson-TwentySeconds58192.flv',
 
// make duration a little shorter for this demo
duration: 7,
 
// when this event returns false - player's default behaviour is disabled
onBeforePause: function() {
return false;
}
},
 
// this is the actual video. controlbar is shown
{
url: 'KimAronson-TwentySeconds59483.flv',
onStart: function() {
this.getControls().show();
},
 
// when playback finishes player is resumed back to its original state
onFinish: function() {
this.unload();
}
}
]
 
});

JavaScript