@stream-io/video-client 0.5.9 → 0.5.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -7550,6 +7550,16 @@ const logger$3 = getLogger(['Publisher']);
7550
7550
  * @internal
7551
7551
  */
7552
7552
  class Publisher {
7553
+ /**
7554
+ * Returns the current connection configuration.
7555
+ *
7556
+ * @internal
7557
+ */
7558
+ get connectionConfiguration() {
7559
+ if (this.pc.getConfiguration)
7560
+ return this.pc.getConfiguration();
7561
+ return this._connectionConfiguration;
7562
+ }
7553
7563
  /**
7554
7564
  * Constructs a new `Publisher` instance.
7555
7565
  *
@@ -7595,6 +7605,7 @@ class Publisher {
7595
7605
  this.isIceRestarting = false;
7596
7606
  this.createPeerConnection = (connectionConfig) => {
7597
7607
  const pc = new RTCPeerConnection(connectionConfig);
7608
+ this._connectionConfiguration = connectionConfig;
7598
7609
  pc.addEventListener('icecandidate', this.onIceCandidate);
7599
7610
  pc.addEventListener('negotiationneeded', this.onNegotiationNeeded);
7600
7611
  pc.addEventListener('icecandidateerror', this.onIceCandidateError);
@@ -7665,10 +7676,10 @@ class Publisher {
7665
7676
  if (!preferredCodec && trackType === TrackType.VIDEO) {
7666
7677
  if (isReactNative()) {
7667
7678
  const osName = getOSInfo()?.name.toLowerCase();
7668
- if (osName === 'ios' || osName === 'ipados') {
7679
+ if (osName === 'ipados') {
7669
7680
  // in ipads it was noticed that if vp8 codec is used
7670
7681
  // then the bytes sent is 0 in the outbound-rtp
7671
- // so we are forcing h264 codec for ipads and also in ios devices
7682
+ // so we are forcing h264 codec for ipads
7672
7683
  preferredCodec = 'H264';
7673
7684
  }
7674
7685
  else if (osName === 'android') {
@@ -7902,6 +7913,7 @@ class Publisher {
7902
7913
  this.migrateTo = async (sfuClient, connectionConfig) => {
7903
7914
  this.sfuClient = sfuClient;
7904
7915
  this.pc.setConfiguration(connectionConfig);
7916
+ this._connectionConfiguration = connectionConfig;
7905
7917
  const shouldRestartIce = this.pc.iceConnectionState === 'connected';
7906
7918
  if (shouldRestartIce) {
7907
7919
  // negotiate only if there are tracks to publish
@@ -8119,14 +8131,6 @@ class Publisher {
8119
8131
  await this.restartIce();
8120
8132
  });
8121
8133
  }
8122
- /**
8123
- * Returns the current connection configuration.
8124
- *
8125
- * @internal
8126
- */
8127
- get connectionConfiguration() {
8128
- return this.pc.getConfiguration();
8129
- }
8130
8134
  }
8131
8135
 
8132
8136
  const logger$2 = getLogger(['Subscriber']);
@@ -8135,6 +8139,16 @@ const logger$2 = getLogger(['Subscriber']);
8135
8139
  * media streams from the SFU.
8136
8140
  */
8137
8141
  class Subscriber {
8142
+ /**
8143
+ * Returns the current connection configuration.
8144
+ *
8145
+ * @internal
8146
+ */
8147
+ get connectionConfiguration() {
8148
+ if (this.pc.getConfiguration)
8149
+ return this.pc.getConfiguration();
8150
+ return this._connectionConfiguration;
8151
+ }
8138
8152
  /**
8139
8153
  * Constructs a new `Subscriber` instance.
8140
8154
  *
@@ -8153,6 +8167,7 @@ class Subscriber {
8153
8167
  */
8154
8168
  this.createPeerConnection = (connectionConfig) => {
8155
8169
  const pc = new RTCPeerConnection(connectionConfig);
8170
+ this._connectionConfiguration = connectionConfig;
8156
8171
  pc.addEventListener('icecandidate', this.onIceCandidate);
8157
8172
  pc.addEventListener('track', this.handleOnTrack);
8158
8173
  pc.addEventListener('icecandidateerror', this.onIceCandidateError);
@@ -14261,7 +14276,7 @@ class StreamClient {
14261
14276
  });
14262
14277
  };
14263
14278
  this.getUserAgent = () => {
14264
- const version = "0.5.9" ;
14279
+ const version = "0.5.11" ;
14265
14280
  return (this.userAgent ||
14266
14281
  `stream-video-javascript-client-${this.node ? 'node' : 'browser'}-${version}`);
14267
14282
  };