rn: disable H.264 on iOS 10 devices

It crashes like hell. See:
https://bugs.chromium.org/p/webrtc/issues/detail?id=11002
This commit is contained in:
Saúl Ibarra Corretgé 2019-10-02 13:21:56 +02:00 committed by Saúl Ibarra Corretgé
parent 5cd351a46f
commit afccf6f06d
2 changed files with 22 additions and 3 deletions

View File

@ -2,6 +2,7 @@
import _ from 'lodash';
import Platform from '../react/Platform';
import { equals, ReducerRegistry, set } from '../redux';
import { CONFIG_WILL_LOAD, LOAD_CONFIG_ERROR, SET_CONFIG } from './actionTypes';
@ -20,6 +21,15 @@ import { _cleanupConfig } from './functions';
const INITIAL_NON_RN_STATE = {
};
/**
* When we should enable H.264 on mobile. iOS 10 crashes so we disable it there.
* See: https://bugs.chromium.org/p/webrtc/issues/detail?id=11002
* Note that this is only used for P2P calls.
*
* @type {boolean}
*/
const RN_ENABLE_H264 = navigator.product === 'ReactNative' && !(Platform.OS === 'ios' && Platform.Version === 10);
/**
* The initial state of the feature base/config when executing in a React Native
* environment. The mandatory configuration to be passed to JitsiMeetJS#init().
@ -41,8 +51,8 @@ const INITIAL_RN_STATE = {
disableAudioLevels: true,
p2p: {
disableH264: false,
preferH264: true
disableH264: !RN_ENABLE_H264,
preferH264: RN_ENABLE_H264
}
};

View File

@ -22,5 +22,14 @@ export default {
*
* @type {string}
*/
OS
OS,
/**
* The operating system version on which the application is executing.
* This is intentionally set to undefined so we can tell mobile and mobile web
* appart easier.
*
* @type {number|undefined}
*/
Version: undefined
};