流畅的视频过渡 HTML5
希望使用 HTML5 视频标签和 JS。目的是使视频从一个视频切换到下一个视频非常顺利,就像电影中的剪辑一样。我查看了API http://www.w3.org/TR/html5/video.html#tracklist
如果有人有一个想法那就太好了。我当前的计划是熟悉 API 并弄清楚如何排队视频以实现平滑更改。当前选择一个 src,然后 play() 会在下一个视频进入之前导致丑陋的空白暂停。
非常感谢您的关注
looking to use HTML5 video tag and JS. the aim is to make a video swap from one video to the next very smoothly just like a cut in the movie. I have had a look at the API
http://www.w3.org/TR/html5/video.html#tracklist
if anyone has an idea that would be great. My current plan is to familiarise myself with the API and figuare out how to que up the video for a smooth change. currently sellect a src and then play() causes an ugly white space pause before the next video comes in.
many thanks for looking
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
使用 Firefox 并打开硬件加速。如果你有好的硬件,它应该可以工作。
你也可以尝试这个方法,想象一下,如果你有 5 个视频要播放,当你在第二个视频时,你可以将它们保留在当前正在播放的视频旁边,将它们保留在左侧和右侧并让它们暂停。当您转到第三个视频时,您可以获取相关视频并使其播放。此方法应该消除任何不必要的滞后。
Use firefox and make hardware acceleration on. if you have good hardware it should work.
and you can also try this method, imagine if you have 5 videos to play and when you are in the 2nd video you can keep them by the video currently you are playing ,keep them on left and right sides and make them pause. when you move on to the 3nd video you can just get that relevant video and make it play. this method should eliminate any unnecessary lags.
HTML5 视频使用的 CPU 量非常低,因此页面上没有理由不能同时拥有多个标签。我建议将它们全部放在页面上,然后使用 CSS 和 JavaScript 在它们之间进行转换。
HTML5 videos use a very low amount of CPU, so there's no reason you can't have multiple tags on the page at the same time. I would suggest having them all on the page and then using CSS and JavaScript to transition between them.
您将无法在 iOS 上执行此操作,因为它不允许在没有用户交互的情况下初始化播放。用户必须单击才能开始每个视频。
很烦人,但这就是苹果的运作方式。
You won't be able to make this work on iOS since it doesn't allow playback to initialize without user interaction. The user will have to click to start each video.
Annoying, but that's how Apple rolls.