Browse Source
Allow screensharing even when alone
Signed-off-by: Joas Schilling <coding@schilljs.com>
pull/741/head
Joas Schilling
8 years ago
No known key found for this signature in database
GPG Key ID: 7076EA9751AACDDA
3 changed files with
11 additions and
20 deletions
-
css/style.scss
-
js/app.js
-
js/webrtc.js
|
|
|
@ -299,7 +299,7 @@ video { |
|
|
|
opacity: .8 !important; |
|
|
|
} |
|
|
|
|
|
|
|
.participants-1 #emptycontent { |
|
|
|
.participants-1:not(.screensharing) #emptycontent { |
|
|
|
display: block !important; |
|
|
|
} |
|
|
|
|
|
|
|
@ -307,10 +307,6 @@ video { |
|
|
|
display: none; |
|
|
|
} |
|
|
|
|
|
|
|
.participants-1 #screensharing-button { |
|
|
|
display: none; |
|
|
|
} |
|
|
|
|
|
|
|
#screensharing-menu { |
|
|
|
bottom: 44px; |
|
|
|
left: calc(50% - 40px); |
|
|
|
|
|
|
|
@ -242,14 +242,6 @@ |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
var screensharingStopped = function() { |
|
|
|
console.log("Screensharing now stopped"); |
|
|
|
$('#screensharing-button').attr('data-original-title', t('spreed', 'Enable screensharing')) |
|
|
|
.addClass('screensharing-disabled icon-screen-off') |
|
|
|
.removeClass('icon-screen'); |
|
|
|
$('#screensharing-menu').toggleClass('open', false); |
|
|
|
}; |
|
|
|
|
|
|
|
$('#screensharing-button').click(function() { |
|
|
|
var webrtc = OCA.SpreedMe.webrtc; |
|
|
|
if (!webrtc.capabilities.supportScreenSharing) { |
|
|
|
@ -319,7 +311,6 @@ |
|
|
|
|
|
|
|
$("#stop-screen-button").on('click', function() { |
|
|
|
OCA.SpreedMe.webrtc.stopScreenShare(); |
|
|
|
screensharingStopped(); |
|
|
|
}); |
|
|
|
|
|
|
|
$(document).keyup(this._onKeyUp.bind(this)); |
|
|
|
@ -750,6 +741,12 @@ |
|
|
|
this.hideVideo(); |
|
|
|
this.videoDisabled = true; |
|
|
|
}, |
|
|
|
disableScreensharingButton: function() { |
|
|
|
$('#screensharing-button').attr('data-original-title', t('spreed', 'Enable screensharing')) |
|
|
|
.addClass('screensharing-disabled icon-screen-off') |
|
|
|
.removeClass('icon-screen'); |
|
|
|
$('#screensharing-menu').toggleClass('open', false); |
|
|
|
}, |
|
|
|
initGuestName: function() { |
|
|
|
var self = this; |
|
|
|
this._localStorageModel = new OCA.SpreedMe.Models.LocalStorageModel({ nick: '' }); |
|
|
|
|
|
|
|
@ -217,12 +217,6 @@ var spreedPeerConnectionTable = []; |
|
|
|
enableDataChannels: true, |
|
|
|
nick: OC.getCurrentUser().displayName |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
webrtc.on('localScreenStopped', function() { |
|
|
|
app.screensharingStopped(); |
|
|
|
}); |
|
|
|
|
|
|
|
OCA.SpreedMe.webrtc = webrtc; |
|
|
|
|
|
|
|
var spreedListofSpeakers = {}; |
|
|
|
@ -637,6 +631,10 @@ var spreedPeerConnectionTable = []; |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
OCA.SpreedMe.webrtc.on('localScreenStopped', function() { |
|
|
|
app.disableScreensharingButton(); |
|
|
|
}); |
|
|
|
|
|
|
|
OCA.SpreedMe.webrtc.on('localMediaStarted', function (configuration) { |
|
|
|
console.log('localMediaStarted'); |
|
|
|
app.startLocalMedia(configuration); |
|
|
|
|