Hi,
I have been using react native video to play both mp3s and hls files for some time. It works very well. My app has just started to do actual "live streams" via hls, and I am running into issues with error recovery. Specifically, I see that when there is an error on the streamer's end ( lost connectivity to streaming server ), or an error on the client ( lost signal ), not only does the player not recover, but none of the callBacks passed to the player are triggered ( the one i'd expect would be onError. onError will get called if the lost signal occurs for a long enough time, but not if the interruption is brief ). The only workaround I have been able to find that allows the player to recover is to toggle the source. For example, if i do the following in a background thread once every 30s:
this.setState({source_uri:''});
this.setTimeout( () => {
this.setState({source_uri:this.props.track.hls_url});
}, 1 );
where:
I can recover from any error long or short. the problem is that even when the length of the toggle is 1ms, it is noticeable to the listener.
Questions:
1) Are there known issues regarding interruptions in hls not triggering onError? If so are there any other callbacks/events that they are known to trigger?
2) Are there known issues regarding hls error recovery? Does the scenario I outlined above sound like a known issue?
3) If so, are there known workarounds to this issue that do not degrade listener experience?
Thanks,
Josh
+1 , onError it's not triggering and leads to stoppage of play even if the stream connection it's back.
The only thing that is triggering it's the onProgress callback.
+1
Im having the same issue. When streaming hls the onError event doesnt trigger. This is an urgent issue to be solved.
I'm interested in fixing this. Does anyone happen to have a good test case (_e.g._ a stream with deliberate errors in it) for temporarily-interrupted HLS playback that ought to trigger an onError (bonus points for the test case being recoverable in the onError), or instructions for creating such a test case?
EDIT: I can, of course, just kill my streaming server, but that's a less-comprehensive test than I'd like to work with, ideally.
Most helpful comment
+1 , onError it's not triggering and leads to stoppage of play even if the stream connection it's back.
The only thing that is triggering it's the onProgress callback.