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,9 +11425,16 @@ function patchRtcCodecs() {
try {
nativeSetCodecPreferences.apply(this, [newCodecs]);
} catch (e) {
// Didn't work -> use default codecs
console.log(e);
nativeSetCodecPreferences.apply(this, [codecs]);
try {
// Fix Kiwi 124
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]);
}
}
}
}