mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
fix stereo for chormium browsers.
This commit is contained in:
parent
1509521129
commit
ccc1df936d
@ -286,6 +286,10 @@ export abstract class BaseClient extends EventEmitter<BaseEvents> {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
const d = await this._peer.createAnswer()
|
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._peer!.setLocalDescription(d)
|
||||||
|
|
||||||
this._ws!.send(
|
this._ws!.send(
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
### Bugs
|
### Bugs
|
||||||
- Fixed TCP mux occasional freeze by adding write buffer to it.
|
- Fixed TCP mux occasional freeze by adding write buffer to it.
|
||||||
|
- Fixed stereo problem in chromium-based browsers, where it was only as mono by adding `stereo=1` to opus SDP to clients answer.
|
||||||
|
|
||||||
## [n.eko v2.7](https://github.com/m1k1o/neko/releases/tag/v2.7)
|
## [n.eko v2.7](https://github.com/m1k1o/neko/releases/tag/v2.7)
|
||||||
|
|
||||||
|
@ -118,7 +118,7 @@ func Opus() RTPCodec {
|
|||||||
MimeType: webrtc.MimeTypeOpus,
|
MimeType: webrtc.MimeTypeOpus,
|
||||||
ClockRate: 48000,
|
ClockRate: 48000,
|
||||||
Channels: 2,
|
Channels: 2,
|
||||||
SDPFmtpLine: "useinbandfec=1",
|
SDPFmtpLine: "useinbandfec=1;stereo=1",
|
||||||
RTCPFeedback: []webrtc.RTCPFeedback{},
|
RTCPFeedback: []webrtc.RTCPFeedback{},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user