Archived
2
0

fix stereo for chormium browsers.

This commit is contained in:
Miroslav Šedivý
2023-01-12 20:53:36 +01:00
parent 1509521129
commit ccc1df936d
3 changed files with 6 additions and 1 deletions

View File

@ -286,6 +286,10 @@ export abstract class BaseClient extends EventEmitter<BaseEvents> {
try {
const d = await this._peer.createAnswer()
// add stereo=1 to answer sdp to enable stereo audio for chromium
d.sdp = d.sdp?.replace(/(stereo=1;)?useinbandfec=1/, 'useinbandfec=1;stereo=1')
this._peer!.setLocalDescription(d)
this._ws!.send(