Fixes issue with desktop sharing when the user click Cancel on the popup window.

This commit is contained in:
hristoterezov 2015-03-27 16:23:48 +02:00
parent 0e0f7d7ccb
commit d25a9b0e41
3 changed files with 17 additions and 7 deletions

View File

@ -19,7 +19,7 @@
<script src="libs/popover.js?v=1"></script><!-- bootstrap tooltip lib -->
<script src="libs/toastr.js?v=1"></script><!-- notifications lib -->
<script src="interface_config.js?v=5"></script>
<script src="libs/app.bundle.js?v=49"></script>
<script src="libs/app.bundle.js?v=50"></script>
<script src="analytics.js?v=1"></script><!-- google analytics plugin -->
<link rel="stylesheet" href="css/font.css?v=6"/>
<link rel="stylesheet" href="css/toastr.css?v=1">

View File

@ -9577,13 +9577,18 @@ function initInlineInstalls()
$("link[rel=chrome-webstore-item]").attr("href", getWebStoreInstallUrl());
}
function getSwitchStreamFailed(error) {
function getVideoStreamFailed(error) {
console.error("Failed to obtain the stream to switch to", error);
switchInProgress = false;
isUsingScreenStream = false;
newStreamCreated(null);
}
function getDesktopStreamFailed(error) {
console.error("Failed to obtain the stream to switch to", error);
switchInProgress = false;
}
function streamSwitchDone() {
switchInProgress = false;
eventEmitter.emit(
@ -9683,7 +9688,7 @@ module.exports = {
);
newStreamCreated(stream);
},
getSwitchStreamFailed);
getDesktopStreamFailed);
} else {
// Disable screen stream
APP.RTC.getUserMediaWithConstraints(
@ -9693,7 +9698,7 @@ module.exports = {
isUsingScreenStream = false;
newStreamCreated(stream);
},
getSwitchStreamFailed, config.resolution || '360'
getVideoStreamFailed, config.resolution || '360'
);
}
}

View File

@ -237,13 +237,18 @@ function initInlineInstalls()
$("link[rel=chrome-webstore-item]").attr("href", getWebStoreInstallUrl());
}
function getSwitchStreamFailed(error) {
function getVideoStreamFailed(error) {
console.error("Failed to obtain the stream to switch to", error);
switchInProgress = false;
isUsingScreenStream = false;
newStreamCreated(null);
}
function getDesktopStreamFailed(error) {
console.error("Failed to obtain the stream to switch to", error);
switchInProgress = false;
}
function streamSwitchDone() {
switchInProgress = false;
eventEmitter.emit(
@ -343,7 +348,7 @@ module.exports = {
);
newStreamCreated(stream);
},
getSwitchStreamFailed);
getDesktopStreamFailed);
} else {
// Disable screen stream
APP.RTC.getUserMediaWithConstraints(
@ -353,7 +358,7 @@ module.exports = {
isUsingScreenStream = false;
newStreamCreated(stream);
},
getSwitchStreamFailed, config.resolution || '360'
getVideoStreamFailed, config.resolution || '360'
);
}
}