HTML5 视频播放器,仅循环特定帧
我希望使用 html5 视频播放器播放和循环播放视频的某些部分。我希望音频播放器有类似 loopstart
和 loopend
属性,但尚未找到说明该属性可用于视频的文档。
我想做的一个例子:
- 当页面加载时,src 视频会播放视频的前 5 秒
- ,视频将循环播放视频的第 6、7 和 8 秒...
- 直到出现链接单击下方的播放器,此时将播放第 9-12 秒。
这是html5播放器可以做到的吗?我想尝试在不借助 Flash 播放器的情况下做到这一点。
如果 html5 视频无法做到这一点,是否可以使用画布解决方案?
I am looking to play and loop only certain parts of a video with the html5 video player. I am hoping for something like loopstart
and loopend
attributes for the audio player, but have not found documentation that states that this is available for video.
An example of what I would like to do:
- when the page loads, the src video plays for the first 5 seconds of the video
- at that point, the video will loop seconds 6, 7 and 8 of the video...
- until a link below the player is clicked, at which point seconds 9-12 will play.
Is this something that can be done with the html5 player? I would like to try to do this without resorting to a flash player.
If this is not possible with the html5 video, would a canvas solution be possible?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
对于任何关心的人,我已经找到了解决方案。 JME 播放器 是一个非常漂亮的播放器,有很多花里胡哨的功能,包括
.currentTime()
。For anyone who cares, I have found a solution. The JME player is quite a fancy player with many bells and whistles, including
.currentTime()
.