@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/CHANGELOG.md +7 -0
- package/dist/index.browser.es.js +12 -4
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +12 -4
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +12 -4
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
- package/src/rtc/Publisher.ts +10 -4
package/package.json
CHANGED
package/src/rtc/Publisher.ts
CHANGED
|
@@ -246,10 +246,16 @@ export class Publisher {
|
|
|
246
246
|
|
|
247
247
|
let preferredCodec = opts.preferredCodec;
|
|
248
248
|
if (!preferredCodec && trackType === TrackType.VIDEO) {
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
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(
|