@tessantech/rtc-light
v4.0.1
Published
Verry light package to simplify Webrtc and make a videoconference in a few lines of code.
Downloads
671
Maintainers
Readme
rtc-light
Verry light package to simplify Webrtc and make a videoconference in a few lines of code.
Demo : https://github.com/Mfron-42/rtc-videconference
Short example
navigator.mediaDevices.getUserMedia({video : true})
.then(stream => {
let receiver : RTCConnection = undefined;
let initiator : RTCConnection = undefined;
receiver = new RTCReceiver(stream, infos => initiator.addInformations(infos));
initiator = new RTCInitiator(stream, infos => receiver.addInformations(infos));
receiver.onStream(stream => console.log("Remote stream received", stream));
initiator.onStream(stream => console.log("Remote stream received", stream));
});