Skip to content

Commit

Permalink
Merge pull request #1643 from changzhn/patch-1
Browse files Browse the repository at this point in the history
fix(change-codecs): audio receiver set video codec throw error
  • Loading branch information
fippo authored Dec 4, 2023
2 parents 3a780e9 + 7582831 commit 2cefe37
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/content/peerconnection/change-codecs/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ function onSetSessionDescriptionError(error) {

function gotRemoteStream(e) {
// Set codec preferences on the receiving side.
if (supportsSetCodecPreferences) {
if (e.track.kind === 'video' && supportsSetCodecPreferences) {
const preferredCodec = codecPreferences.options[codecPreferences.selectedIndex];
if (preferredCodec.value !== '') {
const [mimeType, sdpFmtpLine] = preferredCodec.value.split(' ');
Expand Down

0 comments on commit 2cefe37

Please sign in to comment.