mirror of
https://github.com/koush/scrypted.git
synced 2026-05-24 13:50:26 +01:00
webrtc: fix audio handling on unrecognized codec
This commit is contained in:
4
plugins/webrtc/package-lock.json
generated
4
plugins/webrtc/package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@scrypted/webrtc",
|
||||
"version": "0.2.22",
|
||||
"version": "0.2.23",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@scrypted/webrtc",
|
||||
"version": "0.2.22",
|
||||
"version": "0.2.23",
|
||||
"dependencies": {
|
||||
"@scrypted/common": "file:../../common",
|
||||
"@scrypted/sdk": "file:../../sdk",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@scrypted/webrtc",
|
||||
"version": "0.2.22",
|
||||
"version": "0.2.23",
|
||||
"scripts": {
|
||||
"scrypted-setup-project": "scrypted-setup-project",
|
||||
"prescrypted-setup-project": "scrypted-package-json",
|
||||
|
||||
@@ -204,7 +204,7 @@ export async function startRtpForwarderProcess(console: Console, ffmpegInput: FF
|
||||
}
|
||||
|
||||
const audioSections = parsedSdp.msections.filter(msection => msection.type === 'audio');
|
||||
let audioSection = audioSections.find(msection => msection.codec === audioCodec || audioCodec === 'copy');
|
||||
let audioSection = audioSections.find(msection => (msection.codec && msection.codec === audioCodec) || audioCodec === 'copy');
|
||||
if (!audioSection) {
|
||||
for (const check of audioSections) {
|
||||
if (await audio?.negotiate?.(check) === true) {
|
||||
|
||||
Reference in New Issue
Block a user