Domanda

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?

È stato utile?

Soluzione

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.

Altri suggerimenti

To expand on this a bit more, here is some info from the Enyo forum:

Check out moon.VideoPlayer in the moonstone library. It's just a more featured wrapper around the tag that handles setting multiple sources, provides controls, and other things. You can listen for all of the tag's events and then play the next video as one ends.

Enyo thread

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