@tessantech/rtc-light
TypeScript icon, indicating that this package has built-in type declarations

4.0.1 • Public • Published

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));
	 });

Package Sidebar

Install

npm i @tessantech/rtc-light

Weekly Downloads

36

Version

4.0.1

License

ISC

Unpacked Size

13.5 kB

Total Files

10

Last publish

Collaborators

  • tessantech