0.0.14 • Published 2 years ago

simple-mediasoup-peer-client v0.0.14

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years 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.14

2 years ago

0.0.11

2 years ago

0.0.12

2 years ago

0.0.10

2 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago