开发者

HTML5 Video - Suspend Loading / Partial Load

Is there a way to preload a portion of a video, but not the entire thing? I noticed that there is a "suspend" event that indicates the video is expectedly not downloading until further instructio开发者_Python百科n, but I'm unsure of how to trigger this event?

My goal is to preload a portion of a video without taking up all the users' bandwidth.

Thanks!


You can pre-fetch any URL with XHR, but you can't control how much it pre-fetch from the client-side. I think you can try this: set a header in the XHR request indicating how much you want to pre-fetch, read this header on the server-side and only feed that much data to this request.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜