0.0.12 • Published 3 months ago

simple-mediasoup-peer-client v0.0.12

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

Getting Started

On the client-side, this requires the use of a Javascript complier. The examples use parcel.

The api consists of the following methods:

socket = io("localhost:5000", {
  path: "/socket.io",
});
const peer = new SimpleMediasoupPeer(socket);

// add a MediaStream track to your peer object
peer.addTrack(videoTrack, "webcam", false);

// connect to a given peer (based on their socket ID)
peer.connectToPeer(otherPeerID);

// what to do when a track arrives
peer.onTrack = (incomingTrack, peerId, info) => {
  // do something with this new track
  // info will contain the label assigned by the addTrack
  // method: {label: "webcam", peerId: "e8219dsjwek123a", broadcast: false}
};

peer.resumePeer(otherPeerID);
peer.pausePeer(otherPeerID);
0.0.11

3 months ago

0.0.12

3 months ago

0.0.10

3 months ago

0.0.9

6 months ago

0.0.8

6 months ago

0.0.7

6 months ago

0.0.6

6 months ago

0.0.5

8 months ago

0.0.4

1 year ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago