зеркало из https://github.com/nextcloud/spreed.git
Create specific button to show your screen.
Signed-off-by: Ivan Sein <ivan@nextcloud.com>
This commit is contained in:
Родитель
f0b94d8b82
Коммит
bb38d02177
39
js/app.js
39
js/app.js
|
@ -265,12 +265,16 @@
|
|||
// The parent CSS of the menu list items is using "display:block !important",
|
||||
// so we need to also hide with "!important".
|
||||
if (webrtc.getLocalScreen()) {
|
||||
$('#show-window-entry').attr('style','display:none !important');
|
||||
$('#share-screen-entry').attr('style','display:none !important');
|
||||
$('#share-window-entry').attr('style','display:none !important');
|
||||
$('#show-screen-entry').show();
|
||||
$('#stop-screen-entry').show();
|
||||
$('#screensharing-menu').toggleClass('open');
|
||||
} else {
|
||||
if (splitShare) {
|
||||
$('#show-window-entry').show();
|
||||
$('#share-screen-entry').show();
|
||||
$('#share-window-entry').show();
|
||||
$('#show-screen-entry').attr('style','display:none !important');
|
||||
$('#stop-screen-entry').attr('style','display:none !important');
|
||||
$('#screensharing-menu').toggleClass('open');
|
||||
return;
|
||||
|
@ -280,27 +284,28 @@
|
|||
}
|
||||
}.bind(this));
|
||||
|
||||
$("#share-screen-button").on('click', function() {
|
||||
var webrtc = OCA.SpreedMe.webrtc;
|
||||
if (!webrtc.getLocalScreen()) {
|
||||
this.startShareScreen('screen');
|
||||
}
|
||||
$('#screensharing-menu').toggleClass('open', false);
|
||||
}.bind(this));
|
||||
|
||||
$("#share-window-button").on('click', function() {
|
||||
var webrtc = OCA.SpreedMe.webrtc;
|
||||
if (!webrtc.getLocalScreen()) {
|
||||
this.startShareScreen('window');
|
||||
}
|
||||
$('#screensharing-menu').toggleClass('open', false);
|
||||
}.bind(this));
|
||||
|
||||
$("#show-screen-button").on('click', function() {
|
||||
var webrtc = OCA.SpreedMe.webrtc;
|
||||
if (webrtc.getLocalScreen()) {
|
||||
var currentUser = OCA.SpreedMe.webrtc.connection.getSessionid();
|
||||
OCA.SpreedMe.sharedScreens.switchScreenToId(currentUser);
|
||||
} else {
|
||||
this.startShareScreen('screen');
|
||||
}
|
||||
|
||||
$('#screensharing-menu').toggleClass('open', false);
|
||||
}.bind(this));
|
||||
|
||||
$("#show-window-button").on('click', function() {
|
||||
var webrtc = OCA.SpreedMe.webrtc;
|
||||
if (webrtc.getLocalScreen()) {
|
||||
var currentUser = OCA.SpreedMe.webrtc.connection.getSessionid();
|
||||
OCA.SpreedMe.sharedScreens.switchScreenToId(currentUser);
|
||||
} else {
|
||||
this.startShareScreen('window');
|
||||
}
|
||||
|
||||
$('#screensharing-menu').toggleClass('open', false);
|
||||
}.bind(this));
|
||||
|
||||
|
|
|
@ -79,13 +79,25 @@
|
|||
' <button id="screensharing-button" class="app-navigation-entry-utils-menu-button icon-screen-off icon-white icon-shadow screensharing-disabled" data-placement="top" data-toggle="tooltip" data-original-title="' + t('spreed', 'Share screen') + '"></button>' +
|
||||
' <div id="screensharing-menu" class="app-navigation-entry-menu">' +
|
||||
' <ul>' +
|
||||
' <li>' +
|
||||
' <li id="share-screen-entry">' +
|
||||
' <button id="share-screen-button">' +
|
||||
' <span class="icon-screen"></span>' +
|
||||
' <span>' + t('spreed', 'Share your screen') + '</span>' +
|
||||
' </button>' +
|
||||
' </li>' +
|
||||
' <li id="share-window-entry">' +
|
||||
' <button id="share-window-button">' +
|
||||
' <span class="icon-share-window"></span>' +
|
||||
' <span>' + t('spreed', 'Share a single window') + '</span>' +
|
||||
' </button>' +
|
||||
' </li>' +
|
||||
' <li id="show-screen-entry">' +
|
||||
' <button id="show-screen-button">' +
|
||||
' <span class="icon-screen"></span>' +
|
||||
' <span>' + t('spreed', 'Show your screen') + '</span>' +
|
||||
' </button>' +
|
||||
' </li>' +
|
||||
' <li>' +
|
||||
' <li id="stop-screen-entry">' +
|
||||
' <button id="stop-screen-button">' +
|
||||
' <span class="icon-screen-off"></span>' +
|
||||
' <span>' + t('spreed', 'Stop screensharing') + '</span>' +
|
||||
|
|
|
@ -72,18 +72,24 @@ script(
|
|||
<button id="screensharing-button" class="app-navigation-entry-utils-menu-button icon-screen-off icon-white icon-shadow screensharing-disabled" data-placement="top" data-toggle="tooltip" data-original-title="<?php p($l->t('Share screen')) ?>"></button>
|
||||
<div id="screensharing-menu" class="app-navigation-entry-menu">
|
||||
<ul>
|
||||
<li>
|
||||
<button id="show-screen-button">
|
||||
<li id="share-screen-entry">
|
||||
<button id="share-screen-button">
|
||||
<span class="icon-screen"></span>
|
||||
<span><?php p($l->t('Share your screen'));?></span>
|
||||
</button>
|
||||
</li>
|
||||
<li id="show-window-entry">
|
||||
<button id="show-window-button">
|
||||
<li id="share-window-entry">
|
||||
<button id="share-window-button">
|
||||
<span class="icon-share-window"></span>
|
||||
<span><?php p($l->t('Share a single window'));?></span>
|
||||
</button>
|
||||
</li>
|
||||
<li id="show-screen-entry">
|
||||
<button id="show-screen-button">
|
||||
<span class="icon-screen"></span>
|
||||
<span><?php p($l->t('Show your screen'));?></span>
|
||||
</button>
|
||||
</li>
|
||||
<li id="stop-screen-entry">
|
||||
<button id="stop-screen-button">
|
||||
<span class="icon-screen-off"></span>
|
||||
|
|
|
@ -79,18 +79,24 @@ script(
|
|||
<button id="screensharing-button" class="app-navigation-entry-utils-menu-button icon-screen-off icon-white icon-shadow screensharing-disabled" data-placement="top" data-toggle="tooltip" data-original-title="<?php p($l->t('Share screen')) ?>"></button>
|
||||
<div id="screensharing-menu" class="app-navigation-entry-menu">
|
||||
<ul>
|
||||
<li>
|
||||
<button id="show-screen-button">
|
||||
<li id="share-screen-entry">
|
||||
<button id="share-screen-button">
|
||||
<span class="icon-screen"></span>
|
||||
<span><?php p($l->t('Share your screen'));?></span>
|
||||
</button>
|
||||
</li>
|
||||
<li id="show-window-entry">
|
||||
<button id="show-window-button">
|
||||
<li id="share-window-entry">
|
||||
<button id="share-window-button">
|
||||
<span class="icon-share-window"></span>
|
||||
<span><?php p($l->t('Share a single window'));?></span>
|
||||
</button>
|
||||
</li>
|
||||
<li id="show-screen-entry">
|
||||
<button id="show-screen-button">
|
||||
<span class="icon-screen"></span>
|
||||
<span><?php p($l->t('Show your screen'));?></span>
|
||||
</button>
|
||||
</li>
|
||||
<li id="stop-screen-entry">
|
||||
<button id="stop-screen-button">
|
||||
<span class="icon-screen-off"></span>
|
||||
|
|
Загрузка…
Ссылка в новой задаче