문제

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?

도움이 되었습니까?

해결책

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top