Eyevinn / webrtc-player

WebRTC (recvonly) player
MIT License
97 stars 22 forks source link

Datachannel support #5

Closed birme closed 2 years ago

birme commented 2 years ago

Add support for datachannel between broadcaster and player. Add an onmessage handler (or message event) to WebRTC player class. Proposed usage:

const player = new WebRTCPlayer(...);
player.onmessage = (message) => {
  // do stuff with message from broadcaster
}

// or send a message to the broadcaster
player.send(myMessage);