@stream-io/video-client 0.5.6 → 0.5.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stream-io/video-client",
3
- "version": "0.5.6",
3
+ "version": "0.5.7",
4
4
  "packageManager": "yarn@3.2.4",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.es.js",
@@ -246,10 +246,16 @@ export class Publisher {
246
246
 
247
247
  let preferredCodec = opts.preferredCodec;
248
248
  if (!preferredCodec && trackType === TrackType.VIDEO) {
249
- const isRNAndroid =
250
- isReactNative() && getOSInfo()?.name.toLowerCase() === 'android';
251
- if (isRNAndroid) {
252
- preferredCodec = 'VP8';
249
+ if (isReactNative()) {
250
+ const osName = getOSInfo()?.name.toLowerCase();
251
+ if (osName === 'ios' || osName === 'ipados') {
252
+ // in ipads it was noticed that if vp8 codec is used
253
+ // then the bytes sent is 0 in the outbound-rtp
254
+ // so we are forcing h264 codec for ipads and also in ios devices
255
+ preferredCodec = 'H264';
256
+ } else if (osName === 'android') {
257
+ preferredCodec = 'VP8';
258
+ }
253
259
  }
254
260
  }
255
261
  const codecPreferences = this.getCodecPreferences(