|
@@ -1,7 +1,6 @@
|
1
|
|
-/* global $, APP, AJS, interfaceConfig, JitsiMeetJS */
|
2
|
|
-import { openDialog } from '../../../../react/features/base/dialog';
|
|
1
|
+/* global $, APP, AJS, interfaceConfig */
|
3
|
2
|
import { LANGUAGES } from "../../../../react/features/base/i18n";
|
4
|
|
-import { DeviceSelectionDialog }
|
|
3
|
+import { openDeviceSelectionDialog }
|
5
|
4
|
from '../../../../react/features/device-selection';
|
6
|
5
|
|
7
|
6
|
import UIUtil from "../../util/UIUtil";
|
|
@@ -101,34 +100,6 @@ function initSelect2($el, onSelectedCb) {
|
101
|
100
|
}
|
102
|
101
|
}
|
103
|
102
|
|
104
|
|
-/**
|
105
|
|
- * Open DeviceSelectionDialog with a configuration based on the environment's
|
106
|
|
- * supported abilities.
|
107
|
|
- *
|
108
|
|
- * @param {boolean} isDeviceListAvailable - Whether or not device enumeration
|
109
|
|
- * is possible. This is a value obtained through an async operation whereas all
|
110
|
|
- * other configurations for the modal are obtained synchronously.
|
111
|
|
- * @private
|
112
|
|
- * @returns {void}
|
113
|
|
- */
|
114
|
|
-function _openDeviceSelectionModal(isDeviceListAvailable) {
|
115
|
|
- APP.store.dispatch(openDialog(DeviceSelectionDialog, {
|
116
|
|
- currentAudioOutputId: APP.settings.getAudioOutputDeviceId(),
|
117
|
|
- currentAudioTrack: APP.conference.getLocalAudioTrack(),
|
118
|
|
- currentVideoTrack: APP.conference.getLocalVideoTrack(),
|
119
|
|
- disableAudioInputChange: !JitsiMeetJS.isMultipleAudioInputSupported(),
|
120
|
|
- disableDeviceChange: !isDeviceListAvailable
|
121
|
|
- || !JitsiMeetJS.mediaDevices.isDeviceChangeAvailable(),
|
122
|
|
- hasAudioPermission: JitsiMeetJS.mediaDevices
|
123
|
|
- .isDevicePermissionGranted('audio'),
|
124
|
|
- hasVideoPermission: JitsiMeetJS.mediaDevices
|
125
|
|
- .isDevicePermissionGranted('video'),
|
126
|
|
- hideAudioInputPreview: !JitsiMeetJS.isCollectingLocalStats(),
|
127
|
|
- hideAudioOutputSelect: !JitsiMeetJS.mediaDevices
|
128
|
|
- .isDeviceChangeAvailable('output')
|
129
|
|
- }));
|
130
|
|
-}
|
131
|
|
-
|
132
|
103
|
export default {
|
133
|
104
|
init (emitter) {
|
134
|
105
|
initHTML();
|
|
@@ -170,12 +141,8 @@ export default {
|
170
|
141
|
if (UIUtil.isSettingEnabled('devices')) {
|
171
|
142
|
const wrapperId = 'deviceOptionsWrapper';
|
172
|
143
|
|
173
|
|
- JitsiMeetJS.mediaDevices.isDeviceListAvailable()
|
174
|
|
- .then((isDeviceListAvailable) => {
|
175
|
|
- $('#deviceSelection').on('click', () => {
|
176
|
|
- _openDeviceSelectionModal(isDeviceListAvailable);
|
177
|
|
- });
|
178
|
|
- });
|
|
144
|
+ $('#deviceSelection').on('click', () =>
|
|
145
|
+ APP.store.dispatch(openDeviceSelectionDialog()));
|
179
|
146
|
|
180
|
147
|
// Only show the subtitle if this isn't the only setting section.
|
181
|
148
|
if (interfaceConfig.SETTINGS_SECTIONS.length > 1)
|