mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
add track.
This commit is contained in:
parent
4479096a48
commit
18e04fdb03
@ -190,6 +190,14 @@ export class NekoWebRTC extends EventEmitter<NekoWebRTCEvents> {
|
||||
}
|
||||
}
|
||||
|
||||
public addTrack(track: MediaStreamTrack, ...streams: MediaStream[]): RTCRtpSender {
|
||||
if (!this._peer) {
|
||||
throw new Error('attempting to add track for nonexistent peer')
|
||||
}
|
||||
|
||||
return this._peer.addTrack(track, ...streams)
|
||||
}
|
||||
|
||||
public disconnect() {
|
||||
if (typeof this._channel !== 'undefined') {
|
||||
// unmount all events
|
||||
|
Loading…
Reference in New Issue
Block a user