|
@@ -33,6 +33,11 @@ let room, connection, localAudio, localVideo, roomLocker;
|
33
|
33
|
*/
|
34
|
34
|
let connectionIsInterrupted = false;
|
35
|
35
|
|
|
36
|
+/**
|
|
37
|
+ * Indicates whether extension external installation is in progress or not.
|
|
38
|
+ */
|
|
39
|
+let DSExternalInstallationInProgress = false;
|
|
40
|
+
|
36
|
41
|
import {VIDEO_CONTAINER_TYPE} from "./modules/UI/videolayout/LargeVideo";
|
37
|
42
|
|
38
|
43
|
/**
|
|
@@ -270,7 +275,9 @@ function createLocalTracks (options, checkForPermissionPrompt) {
|
270
|
275
|
? APP.settings.getMicDeviceId()
|
271
|
276
|
: options.micDeviceId,
|
272
|
277
|
// adds any ff fake device settings if any
|
273
|
|
- firefox_fake_device: config.firefox_fake_device
|
|
278
|
+ firefox_fake_device: config.firefox_fake_device,
|
|
279
|
+ desktopSharingExtensionExternalInstallation:
|
|
280
|
+ options.desktopSharingExtensionExternalInstallation
|
274
|
281
|
}, checkForPermissionPrompt)
|
275
|
282
|
.catch(function (err) {
|
276
|
283
|
console.error(
|
|
@@ -878,9 +885,27 @@ export default {
|
878
|
885
|
}
|
879
|
886
|
|
880
|
887
|
this.videoSwitchInProgress = true;
|
|
888
|
+ let externalInstallation = false;
|
881
|
889
|
|
882
|
890
|
if (shareScreen) {
|
883
|
|
- createLocalTracks({ devices: ['desktop'] }).then(([stream]) => {
|
|
891
|
+ createLocalTracks({
|
|
892
|
+ devices: ['desktop'],
|
|
893
|
+ desktopSharingExtensionExternalInstallation: {
|
|
894
|
+ interval: 500,
|
|
895
|
+ checkAgain: () => {
|
|
896
|
+ return DSExternalInstallationInProgress;
|
|
897
|
+ },
|
|
898
|
+ listener: (url) => {
|
|
899
|
+ DSExternalInstallationInProgress = true;
|
|
900
|
+ externalInstallation = true;
|
|
901
|
+ APP.UI.showExtensionExternalInstallationDialog(url);
|
|
902
|
+ }
|
|
903
|
+ }
|
|
904
|
+ }).then(([stream]) => {
|
|
905
|
+ DSExternalInstallationInProgress = false;
|
|
906
|
+ // close external installation dialog on success.
|
|
907
|
+ if(externalInstallation)
|
|
908
|
+ $.prompt.close();
|
884
|
909
|
stream.on(
|
885
|
910
|
TrackEvents.LOCAL_TRACK_STOPPED,
|
886
|
911
|
() => {
|
|
@@ -1134,6 +1159,17 @@ export default {
|
1134
|
1159
|
APP.UI.updateDTMFSupport(isDTMFSupported);
|
1135
|
1160
|
});
|
1136
|
1161
|
|
|
1162
|
+ APP.UI.addListener(UIEvents.EXTERNAL_INSTALLATION_CANCELED, () => {
|
|
1163
|
+ // Wait a little bit more just to be sure that we won't miss the
|
|
1164
|
+ // extension installation
|
|
1165
|
+ setTimeout(() => DSExternalInstallationInProgress = false, 500);
|
|
1166
|
+ });
|
|
1167
|
+ APP.UI.addListener(UIEvents.OPEN_EXTENSION_STORE, (url) => {
|
|
1168
|
+ window.open(
|
|
1169
|
+ url, "extension_store_window",
|
|
1170
|
+ "resizable,scrollbars=yes,status=1");
|
|
1171
|
+ });
|
|
1172
|
+
|
1137
|
1173
|
APP.UI.addListener(UIEvents.ROOM_LOCK_CLICKED, () => {
|
1138
|
1174
|
if (room.isModerator()) {
|
1139
|
1175
|
let promise = roomLocker.isLocked
|