mingxinstar / react-hls

simple react component for playing hls/rtmp live stream
44 stars 75 forks source link

How to automatically start playing a freshly transmuxed/transcoded live stream in an already loaded React component? #12

Open CodeBradley opened 4 years ago

CodeBradley commented 4 years ago

Say if a user has my React website open and started streaming to an ingest URL via RTMP (through OBS, for instance) and then then RTMP ingest server uses FFMPEG to transmux/transcode the video into HLS or DASH, how could I go about automatically displaying this stream in the browser without them having to reload the page; preferably using this library?

I'm trying to wrap my head around this concept. In other words, the component is already loaded but it would need to refresh once a stream is received from the server. I don't know how I would make React listen for something like that.

I feel like WebSocket onMessage is the way to go, but when I'm looking at another app that does something similar they appear to be using a blog object/url as the video source. Anyways, wondering if anyone more familiar with streaming could offer some advice?

devcshort commented 4 years ago

@CodeBradley Hey there! Are you still trying to figure this out? Would love to tackle this together with you. I'm not super familiar with streaming, however I did create an updated version of this module and have worked with OBS streaming and this module in the past.