如何仅在视频下载完成后才播放?
我正在制作将在大屏幕上顺序播放服务器视频的网页。我为 video 标记的 preload 属性设置了“auto”值。我希望视频仅在视频完全下载后才开始播放。有什么办法可以做到这样的事情吗?
在 html5 标准的媒体元素的事件摘要中,我没有找到必要的事件。
I am making web page that will sequentially plays video from server on big screen. I set "auto" value for preload attribute of video tag. I want the video begins to play only when video had downloaded completely. Is there any ways to do such thing?
In the events summary of media elements from html5 standart I didn't find neccessary event.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据此 您可以使用
progress
事件。 此处和这里是一些如何使用它的示例。每次触发progress
事件时,检查视频是否已加载,如果已加载,则播放它。According to this you can use
progress
event. Here and here are some examples how to use it. Every time whenprogress
event is fired check if video is loaded and if so, play it.