Search code examples
javascriptenyo

Play a list of videos(playlist) with enyo.Video


Anyone know how to play a playlist using the enyo video kind? Or how to play a playlist using enyo in general.

enyo.kind({
    name: "app.Videoplayer",
    kind : "Video",
    classes: "video-player",
    poster : null,
    src : null
});

Do I just pass a list as a published property and watch for a video complete event then just queue up the next video based on the current index or is there an easier way?


Solution

  • That's probably the easiest way right there. I know that someone put together a video playlist kind based on the new data bindings in the latest version of Enyo. I'm pretty sure that was done by listening for the events and queueing up the next video as appropriate.

    To expand on that, you can use the onended event to detect when the video has stopped playing.