mirror of
https://github.com/m1k1o/neko.git
synced 2025-07-30 15:00:26 +02:00
fix stereo for chromium. (#18)
This commit is contained in:
parent
1434d308ba
commit
737bf7da02
1 changed files with 4 additions and 0 deletions
|
@ -233,6 +233,10 @@ export class NekoWebRTC extends EventEmitter<NekoWebRTCEvents> {
|
||||||
}
|
}
|
||||||
|
|
||||||
const answer = await this._peer.createAnswer()
|
const answer = await this._peer.createAnswer()
|
||||||
|
|
||||||
|
// add stereo=1 to answer sdp to enable stereo audio for chromium
|
||||||
|
answer.sdp = answer.sdp?.replace(/(stereo=1;)?useinbandfec=1/, 'useinbandfec=1;stereo=1')
|
||||||
|
|
||||||
this._peer.setLocalDescription(answer)
|
this._peer.setLocalDescription(answer)
|
||||||
|
|
||||||
if (answer) {
|
if (answer) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue