ScarletsFiction / SFMediaStream

HTML5 media streamer library for playing music, video, playlist, or even live streaming microphone & camera with node server
MIT License
102 stars 30 forks source link

p2p-video-stream bug on FireFox #23

Open Suchismit4 opened 3 years ago

Suchismit4 commented 3 years ago

It's not working on firefox, and there are a lot of errors.

Can you please tell me how to stream video via the nodejs server?

edit: how to use this lib to stream the video across

StefansArya commented 3 years ago

Hi! Thanks for your interest for trying this lib. But sorry, I haven't find the solution for the bug yet. It sometime works after waiting for few seconds after the stream begin, maybe it was a timing issue 💭

To stream with video, it's similar with the example like for the audio. You just need to enable the video options for ScarletsMediaPresenter. and use ScarletsVideoStreamer instead of ScarletsAudioStreamer.

<video id="target"></video>
let videoElement = document.querySelector('video#target');
let ... = new ScarletsVideoStreamer(videoElement, 1000);

By the way, if it's about peer to peer live streaming, I recommend you to use WebRTC instead. There are many demo and example online, and actually I want to improve this lib and use WebRTC on v2 but currently I'm still have some other project to be done.

Suchismit4 commented 3 years ago

Yeah, the problem is, WebRTC (peerjs) can't handle many users, any recommendation on that? @StefansArya