[英]How to make the video play only when netstream is done loading
I noticed that the play() function of netstream is a mix of loading and playing. 我注意到netstream的play()函数是加载和播放的混合体。 But I just want to load it,not to play it.What can I do? 但是我只想加载它,而不是播放它。我该怎么办?
I have tried setting the buffertime same as the duration of the video. 我尝试将缓冲时间设置为与视频时长相同。 It didn't work out well... 效果不好...
Check whether the bytes loaded equals bytes total repeatedly. 反复检查加载的字节数是否等于总字节数。 If they equal, remove the listener/stop the interval and play the video. 如果它们相等,请删除听众/停止播放间隔并播放视频。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.