JavaScript播放管理对Vimeo播放列表*和* YouTube视频? [英] Javascript player for managing playlist of vimeo *and* youtube videos?
本文介绍了JavaScript播放管理对Vimeo播放列表*和* YouTube视频?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有点好奇。我有我通过API发挥VIMEO视频的列表,而且我也有YouTube视频,我通过一个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.
他们在我的网站。
我想要做的就是创建一个万能播放器,这将VIMEO和YouTube视频合并成一个循环。说,当所有的VIMEO视频完成后,继续播放YouTube视频。
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.
我不字面上知道从哪里开始以外,将需要的JavaScript。
I have literally no idea where to start other than it will require javascript.
任何想法?鸭preciate的帮助。
Any ideas? Appreciate the help.
推荐答案
您的行动方针应该是:
- 有一个电影的容器放置在页面上
- 看的第一部电影在你的组合列表
- 使用他们的JavaScript API(的Youtube实例化相关的播放(YT或VIMEO) , Vimeo的)的容器内。
- 添加事件侦听器为电影上创建的实例结束(这两个API支持)
- 在电影结束时,清除容器
- 将列表itarator到下一部电影
- 转到2
- Have a movie container positioned on your page
- Look at first movie in your combined list
- Instantiate the relevant player (YT or vimeo) using their javascript API (Youtube, Vimeo ) inside the container.
- Add an event listener for movie ended on the created instance (both APIs support it)
- On movie ended event, clear the container
- Move list itarator to next movie
- Go to 2
这篇关于JavaScript播放管理对Vimeo播放列表*和* YouTube视频?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文