简体   繁体   English

如何仅在netstream加载完成后播放视频

[英]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.

相关问题 netstream在视频中间播放 - netstream play in the middle of a video 加载NetStream视频时出现问题 - Problems loading a NetStream Video NetStream.appendBytes()或内存不足怎么播放大型视频? - Out of memory with NetStream.appendBytes() or How to Play Large Video? 如何通过netConnection和netStream播放RTMP视频 - How can I play a RTMP video through netConnection and netStream 如何在ActionScript中以NetStream的“传入帧速度”(不是视频内部)播放FLV视频 - How to play FLV video at “incoming frames speed” (not video-internal) coming from NetStream in ActionScript 通过HTTP播放视频时,Netstream暂停/取消暂停通知将永远不会触发 - Netstream Pause/Unpause Notify will never fire when play video through HTTP 如何播放单个NetStream,但如何在不同的视频对象上显示它的不同部分? - How do you play a single NetStream but show different parts of it on different video objects? 如何使基于Netstream的Actionscript视频播放器自动调整大小以匹配父大小? - How to make a Netstream based Actionscript video player resize automatically to match the parent size? 如何在iOS包中使用视频打开NetStream? - How open a NetStream using video in iOS package? as3 - 如何停止视频和分离NetStream - as3 - How to stop video and detach NetStream
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM