From a25a733ef7d3a3b94fe7fcae660fba99a09aa655 Mon Sep 17 00:00:00 2001 From: redphx <96280+redphx@users.noreply.github.com> Date: Sat, 20 Apr 2024 07:18:52 +0700 Subject: [PATCH] Fix Kiwi 124 --- better-xcloud.user.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/better-xcloud.user.js b/better-xcloud.user.js index 577e726..91f1bf4 100644 --- a/better-xcloud.user.js +++ b/better-xcloud.user.js @@ -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]); + } } } }