livekit-client 1.14.3 → 1.14.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -12045,7 +12045,7 @@ function getMatch(exp, ua) {
12045
12045
  return match && match.length >= id && match[id] || '';
12046
12046
  }
12047
12047
 
12048
- var version$1 = "1.14.3";
12048
+ var version$1 = "1.14.4";
12049
12049
 
12050
12050
  const version = version$1;
12051
12051
  const protocolVersion = 10;
@@ -17963,7 +17963,8 @@ function computeVideoEncodings(isScreenShare, width, height, options) {
17963
17963
  }
17964
17964
  function computeTrackBackupEncodings(track, videoCodec, opts) {
17965
17965
  var _a, _b, _c, _d;
17966
- if (!opts.backupCodec || opts.backupCodec.codec === opts.videoCodec) {
17966
+ // backupCodec should not be true anymore, default codec is set in LocalParticipant.publish
17967
+ if (!opts.backupCodec || opts.backupCodec === true || opts.backupCodec.codec === opts.videoCodec) {
17967
17968
  // backup codec publishing is disabled
17968
17969
  return;
17969
17970
  }
@@ -18831,9 +18832,6 @@ class RemoteAudioTrack extends RemoteTrack {
18831
18832
  } else {
18832
18833
  super.attach(element);
18833
18834
  }
18834
- if (this.elementVolume) {
18835
- element.volume = this.elementVolume;
18836
- }
18837
18835
  if (this.sinkId && supportsSetSinkId(element)) {
18838
18836
  /* @ts-ignore */
18839
18837
  element.setSinkId(this.sinkId);
@@ -18844,6 +18842,10 @@ class RemoteAudioTrack extends RemoteTrack {
18844
18842
  element.volume = 0;
18845
18843
  element.muted = true;
18846
18844
  }
18845
+ if (this.elementVolume) {
18846
+ // make sure volume setting is being applied to the newly attached element
18847
+ this.setVolume(this.elementVolume);
18848
+ }
18847
18849
  return element;
18848
18850
  }
18849
18851
  detach(element) {
@@ -20783,7 +20785,13 @@ class LocalParticipant extends Participant {
20783
20785
  cid: track.mediaStreamTrack.id
20784
20786
  })];
20785
20787
  // set up backup
20788
+ if (opts.backupCodec === true) {
20789
+ opts.backupCodec = {
20790
+ codec: defaultVideoCodec
20791
+ };
20792
+ }
20786
20793
  if (opts.backupCodec && videoCodec !== opts.backupCodec.codec) {
20794
+ // multi-codec simulcast requires dynacast
20787
20795
  if (!this.roomOptions.dynacast) {
20788
20796
  this.roomOptions.dynacast = true;
20789
20797
  }