diff --git a/src/component/internal/webrtc.ts b/src/component/internal/webrtc.ts index 58128b2a..6066cfc2 100644 --- a/src/component/internal/webrtc.ts +++ b/src/component/internal/webrtc.ts @@ -235,7 +235,15 @@ export class NekoWebRTC extends EventEmitter { throw new Error('attempting to add track for nonexistent peer') } - return this._peer.addTransceiver(track, { direction: 'sendonly', streams }).sender + // @ts-ignore + const isChromium = !!window.chrome + + // TOOD: Ugly workaround, find real cause of this issue. + if (isChromium) { + return this._peer.addTrack(track, ...streams) + } else { + return this._peer.addTransceiver(track, { direction: 'sendonly', streams }).sender + } } public removeTrack(sender: RTCRtpSender) {