Hi, I'm using Chrome version 131.0, when setting the Preferred Codec to VP9, the following error appears in the console, and the screen sharing content is not displayed on other sharing ends. This issue can be reproduced in the online version of screego.
index-C_cVS6sr.js:214 Uncaught (in promise) InvalidModificationError: Failed to execute 'setCodecPreferences' on 'RTCRtpTransceiver': Invalid codec preferences: invalid codec with name "H264".
at z4 (index-C_cVS6sr.js:214:13782)
at w.onmessage (index-C_cVS6sr.js:214:15046)
Due to environment limitations, I have not upgraded my browser. However, I have tested this issue on other browser versions. The problem does not occur in Chrome version 120.0 or Edge version 134.0.
After researching the issue, I suspect it might be related to line 88 in ui/src/useRoom.ts:
RTCRtpSender.getCapabilities('video')?.codecs.forEach((codec) =>...
I modified it to:
RTCRtpReceiver.getCapabilities('video')?.codecs.forEach((codec) =>...
After this change, the error no longer appears, and the screen sharing functionality works as expected.
I am not very familiar with WebRTC, so I am not sure about the exact cause of this issue. There might be a better solution for this problem.
Hi, I'm using Chrome version 131.0, when setting the Preferred Codec to VP9, the following error appears in the console, and the screen sharing content is not displayed on other sharing ends. This issue can be reproduced in the online version of screego.
Due to environment limitations, I have not upgraded my browser. However, I have tested this issue on other browser versions. The problem does not occur in Chrome version 120.0 or Edge version 134.0.
After researching the issue, I suspect it might be related to line 88 in
ui/src/useRoom.ts:I modified it to:
After this change, the error no longer appears, and the screen sharing functionality works as expected.
I am not very familiar with WebRTC, so I am not sure about the exact cause of this issue. There might be a better solution for this problem.