Frage

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.

War es hilfreich?

Lösung

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()

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top