|
@@ -234,7 +234,7 @@ export function getVideoDeviceIds(state: Object) {
|
234
|
234
|
}
|
235
|
235
|
|
236
|
236
|
/**
|
237
|
|
- * Returns true if there are devices of a specific type.
|
|
237
|
+ * Returns true if there are devices of a specific type or on native platform.
|
238
|
238
|
*
|
239
|
239
|
* @param {Object} state - The state of the application.
|
240
|
240
|
* @param {string} type - The type of device: VideoOutput | audioOutput | audioInput.
|
|
@@ -242,6 +242,10 @@ export function getVideoDeviceIds(state: Object) {
|
242
|
242
|
* @returns {boolean}
|
243
|
243
|
*/
|
244
|
244
|
export function hasAvailableDevices(state: Object, type: string) {
|
|
245
|
+ if (state['features/base/devices'] === undefined) {
|
|
246
|
+ return true;
|
|
247
|
+ }
|
|
248
|
+
|
245
|
249
|
return state['features/base/devices'].availableDevices[type].length > 0;
|
246
|
250
|
}
|
247
|
251
|
|