Domanda

For Youtube player I can set start and end time parameters which will crop video in this range. How can I do the same thing using Vimeo player?

È stato utile?

Soluzione

Altri suggerimenti

I was able to solve it using "setCurrentTime" for set the start of the video, and 'timeupdate' for set the end.

For the start of the video at a specific time:

Player.setCurrentTime(5);

The video will start after 5 seconds.

For the end of video:

video01Player.on('timeupdate', function(data) {
  if (data.seconds > '10') {

    video01Player.pause();
 
  }
});

In this case the video will pause after 10 seconds.

timeupdate This event fires when the playback position of the video changes, generally every 250 ms during playback, but the interval can vary depending on the browser.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top