Fix Kiwi 124

This commit is contained in:
redphx 2024-04-20 07:18:52 +07:00 committed by GitHub
parent 97f2ae0df9
commit a25a733ef7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -11425,11 +11425,18 @@ function patchRtcCodecs() {
try { try {
nativeSetCodecPreferences.apply(this, [newCodecs]); nativeSetCodecPreferences.apply(this, [newCodecs]);
} catch (e) { } catch (e) {
// Didn't work -> use default codecs try {
// Fix Kiwi 124
console.log(e); console.log(e);
newCodec.push(...RTCRtpSender.getCapabilities('video').codecs);
nativeSetCodecPreferences.apply(this, [newCodecs]);
} catch (x) {
// Didn't work -> use default codecs
console.log(x);
nativeSetCodecPreferences.apply(this, [codecs]); nativeSetCodecPreferences.apply(this, [codecs]);
} }
} }
}
} }