@stream-io/video-client 0.7.1 → 0.7.3

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/CHANGELOG.md CHANGED
@@ -2,6 +2,20 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ### [0.7.3](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-0.7.2...@stream-io/video-client-0.7.3) (2024-04-17)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * **codecs:** Set codec preferences based on receiving capabilities ([#1318](https://github.com/GetStream/stream-video-js/issues/1318)) ([43087fe](https://github.com/GetStream/stream-video-js/commit/43087fed8e844ad9c80a5b4849500eedc8301609))
11
+
12
+ ### [0.7.2](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-0.7.1...@stream-io/video-client-0.7.2) (2024-04-16)
13
+
14
+
15
+ ### Features
16
+
17
+ * update coordinator models ([#1317](https://github.com/GetStream/stream-video-js/issues/1317)) ([cdbee74](https://github.com/GetStream/stream-video-js/commit/cdbee747f1730f6965315e7c9ea9426287ff0cfd))
18
+
5
19
  ### [0.7.1](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-0.7.0...@stream-io/video-client-0.7.1) (2024-04-09)
6
20
 
7
21
 
@@ -5831,6 +5831,11 @@ const logToConsole = (logLevel, message, ...args) => {
5831
5831
  let logMethod;
5832
5832
  switch (logLevel) {
5833
5833
  case 'error':
5834
+ if (isReactNative()) {
5835
+ message = `ERROR: ${message}`;
5836
+ logMethod = console.info;
5837
+ break;
5838
+ }
5834
5839
  logMethod = console.error;
5835
5840
  break;
5836
5841
  case 'warn':
@@ -5875,11 +5880,11 @@ const getLogger = (withTags) => {
5875
5880
 
5876
5881
  const getPreferredCodecs = (kind, preferredCodec, codecToRemove) => {
5877
5882
  const logger = getLogger(['codecs']);
5878
- if (!('getCapabilities' in RTCRtpSender)) {
5879
- logger?.('warn', 'RTCRtpSender.getCapabilities is not supported');
5883
+ if (!('getCapabilities' in RTCRtpReceiver)) {
5884
+ logger('warn', 'RTCRtpReceiver.getCapabilities is not supported');
5880
5885
  return;
5881
5886
  }
5882
- const cap = RTCRtpSender.getCapabilities(kind);
5887
+ const cap = RTCRtpReceiver.getCapabilities(kind);
5883
5888
  if (!cap)
5884
5889
  return;
5885
5890
  const matched = [];
@@ -5887,7 +5892,7 @@ const getPreferredCodecs = (kind, preferredCodec, codecToRemove) => {
5887
5892
  const unmatched = [];
5888
5893
  cap.codecs.forEach((c) => {
5889
5894
  const codec = c.mimeType.toLowerCase();
5890
- logger?.('debug', `Found supported codec: ${codec}`);
5895
+ logger('debug', `Found supported codec: ${codec}`);
5891
5896
  const shouldRemoveCodec = codecToRemove && codec === `${kind}/${codecToRemove.toLowerCase()}`;
5892
5897
  if (shouldRemoveCodec)
5893
5898
  return;
@@ -5909,9 +5914,7 @@ const getPreferredCodecs = (kind, preferredCodec, codecToRemove) => {
5909
5914
  }
5910
5915
  matched.push(c);
5911
5916
  });
5912
- const result = [...matched, ...partialMatched, ...unmatched];
5913
- logger?.('info', `Preffered codecs: `, result);
5914
- return result;
5917
+ return [...matched, ...partialMatched, ...unmatched];
5915
5918
  };
5916
5919
  const getGenericSdp = async (direction) => {
5917
5920
  const tempPc = new RTCPeerConnection();
@@ -7712,7 +7715,12 @@ class Publisher {
7712
7715
  this.publishOptionsPerTrackType.set(trackType, opts);
7713
7716
  if ('setCodecPreferences' in transceiver && codecPreferences) {
7714
7717
  logger$3('info', `Setting ${TrackType[trackType]} codec preferences`, codecPreferences);
7715
- transceiver.setCodecPreferences(codecPreferences);
7718
+ try {
7719
+ transceiver.setCodecPreferences(codecPreferences);
7720
+ }
7721
+ catch (err) {
7722
+ logger$3('warn', `Couldn't set codec preferences`, err);
7723
+ }
7716
7724
  }
7717
7725
  }
7718
7726
  else {
@@ -14461,7 +14469,7 @@ class StreamClient {
14461
14469
  });
14462
14470
  };
14463
14471
  this.getUserAgent = () => {
14464
- const version = "0.7.1" ;
14472
+ const version = "0.7.3" ;
14465
14473
  return (this.userAgent ||
14466
14474
  `stream-video-javascript-client-${this.node ? 'node' : 'browser'}-${version}`);
14467
14475
  };