문제

Does someone have an example, or can say if it is possible with Flowplayer to have a playlist with the following features:

  • No autoplay when thumbnails are clicked
  • Individual splashscreens

autoPlay: false" does not seem to work for this.

도움이 되었습니까?

해결책

There doesn't appear to be an easy way to do this in the Flowplayer api. I think the best approach would be to handle the click event on the thumbnails, change the splash image and unload the player.

Example

var api = flowplayer();

$('.thumbnails').click(function (e) {
    e.preventDefault();

    // Store the splash image url in a data attribute.
    var splashUrl = $(this).data('splash');

   //Replace the splash image.
   $('#player').css('background-image', 'url(' + splashUrl + ')');

   //Unload the player.
   api.unload();
});

When the user clicks on the player load the new video using api.load()

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