bilibili / flv.js

HTML5 FLV Player
Apache License 2.0
22.97k stars 3.39k forks source link

Video getting stuck after onSourceBuffer ended but streaming is on. #193

Open avinlakhera opened 7 years ago

avinlakhera commented 7 years ago

I have a live streaming with is working fine but sometimes flv.js shows onSourceBuffer ended message in the console in the video gets stop even if the streaming is not ended. Its there any way to recconect to streaming on getting this message ?

rebelvg commented 7 years ago

Possible got the same issue. Here's more info. https://github.com/illuspas/Node-Media-Server/issues/4

Browser: Firefox 56 beta.

xqq commented 7 years ago

Provide more verbose logcat please "onSourceBuffer ended" message always means the network stream has been ended normally

avinlakhera commented 7 years ago

@xqq This is locat what I am getting [MSEController] > MediaSource onSourceOpen [FLVDemuxer] > Parsed onMetaData [FLVDemuxer] > Parsed AudioSpecificConfig [FLVDemuxer] > Parsed AVCDecoderConfigurationRecord [MSEController] > Received Initialization Segment, mimeType: audio/mp4;codecs=mp4a.40.5 [MSEController] > Received Initialization Segment, mimeType: video/mp4;codecs=avc1.640015 [MSEController] > MediaSource onSourceEnded

also sometimes I am getting [FlvPlayer] > MSE SourceBuffer is full, suspend transmuxing task message and the video's get stops in this scenario as well

avinlakhera commented 7 years ago

@rebelvg I am also getting the same issue likes your sometimes
[FlvPlayer] > MSE SourceBuffer is full, suspend transmuxing task
I keep the playing video for some times and after that video stops and in log I am getting SourceBuffer is full log

avinlakhera commented 7 years ago

@xqq anything on this issue ?

xqq commented 7 years ago

If you only got MediaSource onSourceEnded please check your network stream If you got MSE SourceBuffer is full for a live stream, reference https://github.com/illuspas/Node-Media-Server/issues/4#issuecomment-324065757

wujisui commented 5 months ago

添加一个监听 FlvPlayer.on(Mpegts.Events.LOADING_COMPLETE, listenerLoading); [MSEController] > MediaSource onSourceEnded 会触发 LOADING_COMPLETE 我们在这个监听事件里面处理播放器 const listenerLoading = () => { initPlayer(); // 重新创建播放器拉取流地址 }