是否有可能在HTML5中获得视频/图像的下载进度? [英] Is it possible to get download progress of video/image in HTML5?

查看:145
本文介绍了是否有可能在HTML5中获得视频/图像的下载进度?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

几乎每个闪存播放器都有一个选项可以显示下载到客户端的缓冲区(或总视频的百分比)。目前,我没有看到它在任何HTML5视频播放器的实现。



我想要解决的真正的问题是有一种方式知道下载%资产(图像/瑞士法郎/视频无论)。在Flash中使用MovieClipLoader和bytesLoaded属性很简单。



有没有在HTML / HTML5 / Javascript(不依赖于Flash)的情况下做到这一点的方法?



谢谢!

解决方案

请参阅缓冲属性,但请注意,有(据我所知)没有完整的实现HTML 5的视频API,并且它可能会改变,所以支持规范的其他部分的浏览器可能不支持 buffered

Almost every flash player has an option to display how much of buffer (or % of total video) is downloaded to the client. At the moment I don't see it in any implementation of html5 video player.

The real problem I am trying to solve is to have a way of knowing % of downloaded asset (image/swf/video whatever). In flash its easy by using MovieClipLoader and bytesLoaded property.

Is there any way of doing it in HTML/HTML5/Javascript (without relying on Flash) ?

Thanks!

解决方案

See the buffered property but be aware that there are (as far as I know) no complete implementations of the HTML 5 video API, and that it is subject to change anyway, so browsers which support other parts of the spec may not support buffered.

这篇关于是否有可能在HTML5中获得视频/图像的下载进度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆