Fixed a bug where you could not restart Chrome deskshare

This commit is contained in:
perroned 2015-09-14 08:40:07 -07:00
parent 6a2b4c972a
commit 95bbe10ca7
2 changed files with 3 additions and 2 deletions

View File

@ -135,7 +135,9 @@ this.getScreenConstraints = function(callback) {
// this statement verifies chrome extension availability
// if installed and available then it will invoke extension API
// otherwise it will fallback to command-line based screen capturing API
if (chromeMediaSource == 'desktop' && !sourceId) {
// without a previous sourceId, Chrome will prompt the user to choose again
sourceId = null;
if (chromeMediaSource == 'desktop') {
getSourceId(function() {
screen_constraints.mandatory.chromeMediaSourceId = sourceId;
callback(sourceId == 'PermissionDeniedError' ? sourceId : null, screen_constraints);

View File

@ -60,7 +60,6 @@ this.doshare = function(on, callback, videoTag) {
});
} else {
getChromeExtensionStatus( function(status) {
sourceId = null;
getScreenConstraints(function(error, screen_constraints) {
if(error) {
return console.error(error);