Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
4.1k views
in Technique[技术] by (71.8m points)

H5和小程序对应的视频预加载方式?

项目需求,目前视频作为动画全屏使用,H5和小程序有什么办法实现视频预加载 当点击播放视频的时候不会卡


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

视频的 preload 之类的不行吗?那静音播放呢?

如果不行,那还有一个思路,ajax 请求视频,然后用拉回来的流播放。因为ajax是有进度的嘛。

如果是用户网卡,那其实什么场景都没办法。如果是你们带宽不够,其实资源放 cdn 上就不至于卡了。


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...