зеркало из https://github.com/nextcloud/spreed.git
Allow screensharing even when alone
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Родитель
748177566e
Коммит
583e60b4d7
|
@ -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);
|
||||
|
|
15
js/app.js
15
js/app.js
|
@ -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: '' });
|
||||
|
|
10
js/webrtc.js
10
js/webrtc.js
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче