add media input methods.

This commit is contained in:
Miroslav Šedivý 2022-01-06 22:32:40 +01:00
parent 88886972e2
commit d546c5f65f

View File

@ -373,6 +373,14 @@
this.connection.setVideo(video)
}
public addTrack(track: MediaStreamTrack, ...streams: MediaStream[]): RTCRtpSender {
return this.connection.webrtc.addTrack(track, ...streams)
}
public removeTrack(sender: RTCRtpSender) {
this.connection.webrtc.removeTrack(sender)
}
public sendUnicast(receiver: string, subject: string, body: any) {
this.connection.websocket.send(EVENT.SEND_UNICAST, { receiver, subject, body })
}