Reacting to Embedded Player Events

Our player allows you to react to player events, and use that functionality to do a lot of useful things, e.g.

  • Track user engagement
  • Change website appearance
  • Click to navigate
  • and so much more…

How to setup event handlers

There are eight different events you can listen to and five commands you can execute.

Listenable events

  • VideoReady – fires when the player is ready to play
  • PlayStart – fires when the video starts playing
  • PlayPause – fires when video pauses
  • PlayEnd – fires when the video ends – i.e. the video is played until the end
  • PlaySkipped – fires video has been skipped – e.g. if the user clicked the track, and skipped ahead
  • FullscreenStart – fires when the player goes to full screen
  • FullscreenEnd – fires when the player goes out of full screen
  • CallToAction – fires when a call to action button has been pressed

VideoReady event

Fliva.on('VideoReady', function(data) {
  console.log('Video was ready in ' + data.time + ' seconds');
});

PlayStart event

Fliva.on('PlayStart', function(data) {
  console.log('Play was started at time ' + data.from + ' seconds');
});

PlayPause event

Fliva.on('PlayPause', function(data) {
  console.log('Play was paused at time ' + data.location + ' seconds');
});

PlayEnd event

Fliva.on('PlayEnd', function(data) {
  console.log('Play ended at time ' + data.location + ' seconds');
});

PlaySkipped event

Fliva.on('PlaySkipped', function(data) {
  console.log('Play skipped from time ' + data.from + ' to ' + data.to + ' seconds');
});

FullscreenStart event

Fliva.on('FullscreenStart', function(data) {
  console.log('Video full screen at ' + data.time + ' seconds');
});

FullscreenEnd event

Fliva.on('FullscreenEnd', function(data) {
  console.log('Video out of full screen at ' + data.time + ' seconds');
});

CallToAction event

We will cover how to use this in a future post, all about call-to-action buttons.

Get more information.

Contact us now and learn more about how you can engage your customers through personalized and individual videos.