Forcing user to see first video Events and Cuepoints - Demo 5 / 7
Example
This example shows how you can combine a playlist with events in a creative way. The setup is as follows:
- The first video will be forced for the user to view it completely. It cannot be paused and the controlbar is hidden.
- The second video is played normally. Pausing is enabled and the controlbar is visible.
- At the end of the playlist we rewind back to the original state with the HTML splash image
// setup player
$f("player", "http://releases.flowplayer.org/swf/flowplayer-3.2.7.swf", {
// controlbar is initially hidden
plugins: {
controls: {display: 'none' }
},
// properties that are common to both clips in the playlist
clip: {
baseUrl: 'http://blip.tv/file/get'
},
// 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 it's original state
onFinish: function() {
this.unload();
}
}
]
});
View this demo as a standalone version