开发者

Javascript player for managing playlist of vimeo *and* youtube videos?

开发者 https://www.devze.com 2023-03-19 20:56 出处:网络
I\'m a little curious. I have a list of vimeo videos which I play through an API, and I also have a list of youtube videos which I play via an API.

I'm a little curious. I have a list of vimeo videos which I play through an API, and I also have a list of youtube videos which I play via an API.

They are on my website.

What I'm trying to do is create a universal player which will combine vimeo and youtube videos into a single loop. Say when all vimeo videos have finished, continue and play the youtube videos.

I have liter开发者_如何学Cally no idea where to start other than it will require javascript.

Any ideas? Appreciate the help.


Your course of action should be:

  1. Have a movie container positioned on your page
  2. Look at first movie in your combined list
  3. Instantiate the relevant player (YT or vimeo) using their javascript API (Youtube, Vimeo ) inside the container.
  4. Add an event listener for movie ended on the created instance (both APIs support it)
  5. On movie ended event, clear the container
  6. Move list itarator to next movie
  7. Go to 2
0

精彩评论

暂无评论...
验证码 换一张
取 消