我想知道是否可以仅下载 html5 视频的前 5 块 (5MB),从而防止在显示 >100MB 的视频时产生高流量费用
问问题
356 次
1 回答
0
对此进行一些控制的唯一方法是使用视频标签上的 preload 属性。遗憾的是,这在不同的浏览器中实现方式不同(例如auto
,可能会根据连接下载 2s、25s 或整个视频)。
FMS 或 IIS SmoothStreaming 等解决方案允许更多控制,但需要插件(Flash 或 Silverlight)来管理该体验
preload='none'
From the spec, “Hints to the UA that the user is not expected to need the video, or that minimizing unnecessary traffic is desirable.”
preload='metadata'
“Hints to the UA that the user is not expected to need the video, but that fetching its metadata (dimensions, first frame, track list, duration, and so on) is desirable.”
preload='auto'
“Hints to the UA that optimistically downloading the entire video is considered desirable.”
preload or preload=''
The preload attribute is specified but no value is given. Specifying the empty string is the same as specifying “auto”.
于 2013-08-06T21:23:46.143 回答