opentok-react-native
Advanced tools
Comparing version 0.15.0 to 0.16.0
@@ -0,1 +1,5 @@ | ||
# 0.16.0 (Apr 19, 2021) | ||
- **[Feature]**: Added support for `stereo` output on `iOS` and `Android` using `CustomAudioDevice` | ||
# 0.15.0 (Jan 26, 2021) | ||
@@ -2,0 +6,0 @@ |
@@ -101,2 +101,3 @@ ### OTSession Component | ||
ipWhitelist: false, // https://tokbox.com/developer/sdks/js/reference/OT.html#initSession - ipWhitelist | ||
enableStereoOutput: true // Enable stereo output, default is false | ||
}; | ||
@@ -103,0 +104,0 @@ } |
{ | ||
"name": "opentok-react-native", | ||
"version": "0.15.0", | ||
"version": "0.16.0", | ||
"description": "React Native components for OpenTok iOS and Android SDKs", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
import { Platform } from 'react-native'; | ||
import { reassignEvents } from './OTHelper'; | ||
import { handleSignalError, handleError } from '../OTError'; | ||
import { each, isNull, isEmpty, isString, isBoolean, isObject } from 'underscore'; | ||
import { | ||
each, | ||
isNull, | ||
isEmpty, | ||
isString, | ||
isBoolean, | ||
isObject, | ||
} from 'underscore'; | ||
const validateString = value => (isString(value) ? value : ''); | ||
const validateString = (value) => (isString(value) ? value : ''); | ||
const validateBoolean = value => (isBoolean(value) ? value : false); | ||
const validateBoolean = (value) => (isBoolean(value) ? value : false); | ||
const validateObject = value => (isObject(value) ? value : {}); | ||
const validateObject = (value) => (isObject(value) ? value : {}); | ||
@@ -51,3 +58,2 @@ const sanitizeSessionEvents = (sessionId, events) => { | ||
const sanitizeSessionOptions = (options) => { | ||
@@ -65,5 +71,6 @@ const platform = Platform.OS; | ||
useTextureViews: false, | ||
enableStereoOutput: false, | ||
androidOnTop: '', // 'publisher' || 'subscriber' | ||
androidZOrder: '', // 'mediaOverlay' || 'onTop' | ||
} | ||
}; | ||
} else { | ||
@@ -75,3 +82,4 @@ sessionOptions = { | ||
proxyUrl: '', | ||
} | ||
enableStereoOutput: false, | ||
}; | ||
} | ||
@@ -89,2 +97,3 @@ | ||
proxyUrl: 'string', | ||
enableStereoOutput: 'boolean', | ||
}, | ||
@@ -100,2 +109,3 @@ android: { | ||
proxyUrl: 'string', | ||
enableStereoOutput: 'boolean', | ||
}, | ||
@@ -112,3 +122,3 @@ }; | ||
} else if (optionType === 'object') { | ||
sessionOptions[key] = validateObject(value) | ||
sessionOptions[key] = validateObject(value); | ||
} | ||
@@ -140,3 +150,6 @@ } else { | ||
}, | ||
errorHandler: typeof signal.errorHandler !== 'function' ? handleSignalError : signal.errorHandler, | ||
errorHandler: | ||
typeof signal.errorHandler !== 'function' | ||
? handleSignalError | ||
: signal.errorHandler, | ||
}; | ||
@@ -160,17 +173,18 @@ }; | ||
case 0: | ||
return "not connected"; | ||
return 'not connected'; | ||
case 1: | ||
return "connected"; | ||
return 'connected'; | ||
case 2: | ||
return "connecting"; | ||
return 'connecting'; | ||
case 3: | ||
return "reconnecting"; | ||
return 'reconnecting'; | ||
case 4: | ||
return "disconnecting"; | ||
return 'disconnecting'; | ||
case 5: | ||
return "failed"; | ||
return 'failed'; | ||
} | ||
}; | ||
const isConnected = (connectionStatus) => (getConnectionStatus(connectionStatus) === 'connected'); | ||
const isConnected = (connectionStatus) => | ||
getConnectionStatus(connectionStatus) === 'connected'; | ||
@@ -177,0 +191,0 @@ export { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
325480
67
1314