Compare commits
40 Commits
release-70
...
jitihouse/
Author | SHA1 | Date |
---|---|---|
xenia | 4bd73cc368 | |
Boris Grozev | e12999d44f | |
Robert Pintilii | 8982f17ce1 | |
Robert Pintilii | c8f1690057 | |
Robert Pintilii | aa57309057 | |
damencho | fb81619fc5 | |
Hristo Terezov | 5a5656020b | |
Hristo Terezov | 0ff44a2f22 | |
Hristo Terezov | 4d04ea325e | |
Hristo Terezov | 42ce6dcc58 | |
Hristo Terezov | b033d0268a | |
Hristo Terezov | 4aea40d34f | |
Hristo Terezov | e5a170fb28 | |
Hristo Terezov | d1cf5578fc | |
Hristo Terezov | 4b29af6b5f | |
bgrozev | f3481576ff | |
bgrozev | 455a91a5c6 | |
Gabriel Borlea | 297ab194a8 | |
Christoph Settgast | 077a88a803 | |
Gabriel Borlea | 02c232440e | |
Emmanuel Pelletier | f727b9295f | |
Robert Pintilii | 0d0bec3aad | |
Emmanuel Pelletier | cfb8589bef | |
japm48 | 65730e256e | |
Robert Pintilii | 7b8b911fee | |
Robert Pintilii | 036286a1d6 | |
Robert Pintilii | d550254f31 | |
Robert Pintilii | b1a71d55d7 | |
George Politis | 17ed45799c | |
Jaya Allamsetty | e5681382b0 | |
Robert Pintilii | c27cb25afe | |
Avram Tudor | baf5aa14e8 | |
Horatiu Muresan | 29b6ce7721 | |
Mihaela Dumitru | 4f95c45e50 | |
Emmanuel Pelletier | 72dd609247 | |
Horatiu Muresan | fed74afffe | |
Mihaela Dumitru | 204f34cccb | |
Emmanuel Pelletier | c81777a475 | |
Horatiu Muresan | 778bca3031 | |
Avram Tudor | 336fa304ce |
15
config.js
15
config.js
|
@ -48,7 +48,7 @@ var config = {
|
||||||
// BOSH URL. FIXME: use XEP-0156 to discover it.
|
// BOSH URL. FIXME: use XEP-0156 to discover it.
|
||||||
bosh: 'https://jitsi-meet.example.com/' + subdir + 'http-bind',
|
bosh: 'https://jitsi-meet.example.com/' + subdir + 'http-bind',
|
||||||
|
|
||||||
// Websocket URL
|
// Websocket URL (XMPP)
|
||||||
// websocket: 'wss://jitsi-meet.example.com/' + subdir + 'xmpp-websocket',
|
// websocket: 'wss://jitsi-meet.example.com/' + subdir + 'xmpp-websocket',
|
||||||
|
|
||||||
// The real JID of focus participant - can be overridden here
|
// The real JID of focus participant - can be overridden here
|
||||||
|
@ -56,6 +56,19 @@ var config = {
|
||||||
// https://github.com/jitsi/jitsi-meet/issues/7376
|
// https://github.com/jitsi/jitsi-meet/issues/7376
|
||||||
// focusUserJid: 'focus@auth.jitsi-meet.example.com',
|
// focusUserJid: 'focus@auth.jitsi-meet.example.com',
|
||||||
|
|
||||||
|
// Options related to the bridge (colibri) data channel
|
||||||
|
bridgeChannel: {
|
||||||
|
// If the backend advertises multiple colibri websockets, this options allows
|
||||||
|
// to filter some of them out based on the domain name. We use the first URL
|
||||||
|
// which does not match ignoreDomain, falling back to the first one that matches
|
||||||
|
// ignoreDomain. Has no effect if undefined.
|
||||||
|
// ignoreDomain: 'example.com',
|
||||||
|
|
||||||
|
// Prefer SCTP (WebRTC data channels over the media path) over a colibri websocket.
|
||||||
|
// If SCTP is available in the backend it will be used instead of a WS. Defaults to
|
||||||
|
// false (SCTP is used only if available and no WS are available).
|
||||||
|
// preferSctp: false
|
||||||
|
},
|
||||||
|
|
||||||
// Testing / experimental features.
|
// Testing / experimental features.
|
||||||
//
|
//
|
||||||
|
|
|
@ -22,11 +22,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
&-entry-text {
|
&-entry-text {
|
||||||
display: inline-block;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
max-width: 213px;
|
max-width: 213px;
|
||||||
overflow: hidden;
|
|
||||||
white-space: nowrap;
|
|
||||||
|
|
||||||
&.left-margin {
|
&.left-margin {
|
||||||
margin-left: 36px;
|
margin-left: 36px;
|
||||||
|
|
|
@ -0,0 +1,67 @@
|
||||||
|
@keyframes rotateAroundY {
|
||||||
|
from { transform: rotateY(0deg); }
|
||||||
|
to { transform: rotateY(360deg); }
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes rainbowRoad {
|
||||||
|
to {
|
||||||
|
background-position: 400% 0 !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
font-family: "Comic Sans MS", "Comic Sans", sans-serif !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
background: linear-gradient(90deg, rgba(255,0,0,1) 0%, rgba(255,154,0,1) 10%, rgba(208,222,33,1) 20%, rgba(79,220,74,1) 30%, rgba(63,218,216,1) 40%, rgba(47,201,226,1) 50%, rgba(28,127,238,1) 60%, rgba(95,21,242,1) 70%, rgba(186,12,248,1) 80%, rgba(251,7,217,1) 90%, rgba(255,0,0,1) 100%) !important;
|
||||||
|
-webkit-background-clip: text !important;
|
||||||
|
-webkit-text-fill-color: transparent !important;
|
||||||
|
-moz-background-clip: text !important;
|
||||||
|
-moz-text-fill-color: transparent !important;
|
||||||
|
animation: rainbowRoad 8s linear infinite !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:hover {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.dominant-speaker {
|
||||||
|
box-shadow: inset 0px 0px 0px 4px rgba(255,0,255,0.33) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.display-avatar-only {
|
||||||
|
background-image: url("");
|
||||||
|
}
|
||||||
|
|
||||||
|
.videocontainer:nth-child(odd) {
|
||||||
|
transform: rotate(1.5deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.videocontainer:nth-child(even) {
|
||||||
|
transform: rotate(-1.3deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
#largeVideoContainer.videocontainer {
|
||||||
|
transform: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sideToolbarContainer {
|
||||||
|
transform: rotate(-1.1deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.displayname:before {
|
||||||
|
content: "♡︎ ";
|
||||||
|
}
|
||||||
|
|
||||||
|
.displayname:after {
|
||||||
|
content: " ♡︎";
|
||||||
|
}
|
||||||
|
|
||||||
|
.avatar, .userAvatar {
|
||||||
|
transform: rotateY(0deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.avatar:hover, .userAvatar:hover {
|
||||||
|
animation: rotateAroundY 3.6s linear infinite;
|
||||||
|
}
|
|
@ -82,6 +82,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.left-column {
|
.left-column {
|
||||||
|
order: -1;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
flex-grow: 0;
|
flex-grow: 0;
|
||||||
|
@ -92,6 +93,7 @@
|
||||||
.right-column {
|
.right-column {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
align-items: flex-start;
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
padding-left: 16px;
|
padding-left: 16px;
|
||||||
padding-top: 13px;
|
padding-top: 13px;
|
||||||
|
@ -99,11 +101,11 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
line-height: 16px;
|
line-height: 16px;
|
||||||
padding-bottom: 4px;
|
margin-bottom: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.subtitle {
|
.subtitle {
|
||||||
color: #5E6D7A;
|
color: #5E6D7A;
|
||||||
|
@ -125,8 +127,7 @@
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.with-click-handler:hover,
|
&.with-click-handler:hover {
|
||||||
&.with-click-handler:focus {
|
|
||||||
background-color: #c7ddff;
|
background-color: #c7ddff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
#polls-panel {
|
.polls-panel {
|
||||||
height: calc(100% - 119px);
|
height: calc(100% - 119px);
|
||||||
}
|
}
|
||||||
|
|
|
@ -90,7 +90,7 @@ body.welcome-page {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
padding-left: 10px;
|
padding-left: 10px;
|
||||||
|
|
||||||
&:focus {
|
&.focus-visible {
|
||||||
outline: auto 2px #005fcc;
|
outline: auto 2px #005fcc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -167,7 +167,7 @@ body.welcome-page {
|
||||||
margin: 4px;
|
margin: 4px;
|
||||||
display: $welcomePageTabButtonsDisplay;
|
display: $welcomePageTabButtonsDisplay;
|
||||||
|
|
||||||
.tab {
|
[role="tab"] {
|
||||||
background-color: #c7ddff;
|
background-color: #c7ddff;
|
||||||
border-radius: 7px;
|
border-radius: 7px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
@ -176,8 +176,10 @@ body.welcome-page {
|
||||||
margin: 2px;
|
margin: 2px;
|
||||||
padding: 7px 0;
|
padding: 7px 0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
color: inherit;
|
||||||
|
border: 0;
|
||||||
|
|
||||||
&.selected {
|
&[aria-selected="true"] {
|
||||||
background-color: #FFF;
|
background-color: #FFF;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,6 @@ $flagsImagePath: "../images/";
|
||||||
@import 'reload_overlay/reload_overlay';
|
@import 'reload_overlay/reload_overlay';
|
||||||
@import 'mini_toolbox';
|
@import 'mini_toolbox';
|
||||||
@import 'modals/desktop-picker/desktop-picker';
|
@import 'modals/desktop-picker/desktop-picker';
|
||||||
@import 'modals/device-selection/device-selection';
|
|
||||||
@import 'modals/dialog';
|
@import 'modals/dialog';
|
||||||
@import 'modals/embed-meeting/embed-meeting';
|
@import 'modals/embed-meeting/embed-meeting';
|
||||||
@import 'modals/feedback/feedback';
|
@import 'modals/feedback/feedback';
|
||||||
|
@ -95,3 +94,9 @@ $flagsImagePath: "../images/";
|
||||||
@import 'notifications';
|
@import 'notifications';
|
||||||
|
|
||||||
/* Modules END */
|
/* Modules END */
|
||||||
|
|
||||||
|
/* Jeet crew BEGIN */
|
||||||
|
|
||||||
|
@import 'jiti';
|
||||||
|
|
||||||
|
/* Jeet crew END */
|
||||||
|
|
|
@ -1,148 +0,0 @@
|
||||||
.device-selection {
|
|
||||||
.device-selectors {
|
|
||||||
font-size: 14px;
|
|
||||||
|
|
||||||
> div {
|
|
||||||
display: block;
|
|
||||||
margin-bottom: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.device-selector-icon {
|
|
||||||
align-self: center;
|
|
||||||
color: inherit;
|
|
||||||
font-size: 20px;
|
|
||||||
margin-left: 3px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.device-selector-label {
|
|
||||||
margin-bottom: 1px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* device-selector-trigger stylings attempt to mimic AtlasKit button */
|
|
||||||
.device-selector-trigger {
|
|
||||||
background-color: #0E1624;
|
|
||||||
border: 1px solid #455166;
|
|
||||||
border-radius: 5px;
|
|
||||||
display: flex;
|
|
||||||
height: 2.3em;
|
|
||||||
justify-content: space-between;
|
|
||||||
line-height: 2.3em;
|
|
||||||
overflow: hidden;
|
|
||||||
padding: 0 8px;
|
|
||||||
}
|
|
||||||
.device-selector-trigger-disabled {
|
|
||||||
.device-selector-trigger {
|
|
||||||
color: #a5adba;
|
|
||||||
cursor: default;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.device-selector-trigger-text {
|
|
||||||
overflow: hidden;
|
|
||||||
text-align: center;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
white-space: nowrap;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.device-selection-column {
|
|
||||||
box-sizing: border-box;
|
|
||||||
display: inline-block;
|
|
||||||
vertical-align: top;
|
|
||||||
|
|
||||||
&.column-selectors {
|
|
||||||
margin-left: 15px;
|
|
||||||
width: 45%;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.column-video {
|
|
||||||
width: 50%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.device-selection-video-container {
|
|
||||||
border-radius: 3px;
|
|
||||||
margin-bottom: 5px;
|
|
||||||
|
|
||||||
.video-input-preview {
|
|
||||||
margin-top: 2px;
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
> video {
|
|
||||||
border-radius: 3px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.video-input-preview-error {
|
|
||||||
color: $participantNameColor;
|
|
||||||
display: none;
|
|
||||||
left: 0;
|
|
||||||
position: absolute;
|
|
||||||
right: 0;
|
|
||||||
text-align: center;
|
|
||||||
top: 50%;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.video-preview-has-error {
|
|
||||||
background: black;
|
|
||||||
|
|
||||||
.video-input-preview-error {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.video-input-preview-display {
|
|
||||||
height: auto;
|
|
||||||
overflow: hidden;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.audio-output-preview {
|
|
||||||
font-size: 14px;
|
|
||||||
|
|
||||||
a {
|
|
||||||
color: #6FB1EA;
|
|
||||||
cursor: pointer;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
a:hover {
|
|
||||||
color: #B3D4FF;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.audio-input-preview {
|
|
||||||
background: #1B2638;
|
|
||||||
border-radius: 5px;
|
|
||||||
height: 8px;
|
|
||||||
|
|
||||||
.audio-input-preview-level {
|
|
||||||
background: #75B1FF;
|
|
||||||
border-radius: 5px;
|
|
||||||
height: 100%;
|
|
||||||
-webkit-transition: width .1s ease-in-out;
|
|
||||||
-moz-transition: width .1s ease-in-out;
|
|
||||||
-o-transition: width .1s ease-in-out;
|
|
||||||
transition: width .1s ease-in-out;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.device-selection.video-hidden {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
width: 100%;
|
|
||||||
|
|
||||||
.column-selectors {
|
|
||||||
width: 100%;
|
|
||||||
margin-left: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.column-video {
|
|
||||||
order: 1;
|
|
||||||
width: 100%;
|
|
||||||
margin-top: 8px;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -44,61 +44,3 @@
|
||||||
-webkit-animation-timing-function: ease-in-out;
|
-webkit-animation-timing-function: ease-in-out;
|
||||||
animation-timing-function: ease-in-out
|
animation-timing-function: ease-in-out
|
||||||
}
|
}
|
||||||
|
|
||||||
.feedback-dialog {
|
|
||||||
margin-bottom: 5px;
|
|
||||||
|
|
||||||
.details {
|
|
||||||
textarea {
|
|
||||||
min-height: 100px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.input-control {
|
|
||||||
background-color: $feedbackInputBg;
|
|
||||||
color: $feedbackInputTextColor;
|
|
||||||
|
|
||||||
&::-webkit-input-placeholder {
|
|
||||||
color: $feedbackInputPlaceholderColor;
|
|
||||||
}
|
|
||||||
&::-moz-placeholder { /* Firefox 19+ */
|
|
||||||
color: $feedbackInputPlaceholderColor;
|
|
||||||
}
|
|
||||||
&:-ms-input-placeholder {
|
|
||||||
color: $feedbackInputPlaceholderColor;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.rating {
|
|
||||||
line-height: 1.2;
|
|
||||||
margin-top: 10px;
|
|
||||||
text-align: center;
|
|
||||||
|
|
||||||
.star-label {
|
|
||||||
font-size: 14px;
|
|
||||||
height: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.star-btn {
|
|
||||||
color: inherit;
|
|
||||||
cursor: pointer;
|
|
||||||
display: inline-block;
|
|
||||||
font-size: 34px;
|
|
||||||
outline: none;
|
|
||||||
position: relative;
|
|
||||||
text-decoration: none;
|
|
||||||
@include transition(all .2s ease);
|
|
||||||
|
|
||||||
&.active,
|
|
||||||
&:hover,
|
|
||||||
&.starHover {
|
|
||||||
color: #36B37E;
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
.star-btn:focus,
|
|
||||||
.star-btn:active {
|
|
||||||
outline: 1px solid #B8C7E0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var interfaceConfig = {
|
var interfaceConfig = {
|
||||||
APP_NAME: 'Jitsi Meet',
|
APP_NAME: 'JitSea 🏴☠️',
|
||||||
AUDIO_LEVEL_PRIMARY_COLOR: 'rgba(255,255,255,0.4)',
|
AUDIO_LEVEL_PRIMARY_COLOR: 'rgba(255,255,255,0.4)',
|
||||||
AUDIO_LEVEL_SECONDARY_COLOR: 'rgba(255,255,255,0.2)',
|
AUDIO_LEVEL_SECONDARY_COLOR: 'rgba(255,255,255,0.2)',
|
||||||
|
|
||||||
|
|
|
@ -184,13 +184,21 @@
|
||||||
"deepLinking": {
|
"deepLinking": {
|
||||||
"appNotInstalled": "Sie benötigen die „{{app}}“-App, um der Konferenz auf dem Smartphone beizutreten.",
|
"appNotInstalled": "Sie benötigen die „{{app}}“-App, um der Konferenz auf dem Smartphone beizutreten.",
|
||||||
"description": "Nichts passiert? Wir haben versucht, die Konferenz in {{app}} zu öffnen. Versuchen Sie es erneut oder treten Sie der Konferenz in {{app}} im Web bei.",
|
"description": "Nichts passiert? Wir haben versucht, die Konferenz in {{app}} zu öffnen. Versuchen Sie es erneut oder treten Sie der Konferenz in {{app}} im Web bei.",
|
||||||
|
"descriptionNew": "Nichts passiert? Wir haben versucht, die Konferenz in {{app}} zu öffnen. <br /><br /> Versuchen Sie es erneut oder treten Sie der Konferenz im Web bei.",
|
||||||
"descriptionWithoutWeb": "Ist nichts passiert? Wir haben versucht, Ihre Besprechung in der „{{app}}“-Desktop-App zu starten.",
|
"descriptionWithoutWeb": "Ist nichts passiert? Wir haben versucht, Ihre Besprechung in der „{{app}}“-Desktop-App zu starten.",
|
||||||
"downloadApp": "App herunterladen",
|
"downloadApp": "App herunterladen",
|
||||||
|
"downloadMobileApp": "Aus dem App Store herunterladen",
|
||||||
"ifDoNotHaveApp": "Wenn Sie die App noch nicht haben:",
|
"ifDoNotHaveApp": "Wenn Sie die App noch nicht haben:",
|
||||||
"ifHaveApp": "Wenn Sie die App bereits haben:",
|
"ifHaveApp": "Wenn Sie die App bereits haben:",
|
||||||
"joinInApp": "Mit der App am Meeting teilnehmen",
|
"joinInApp": "Mit der App am Meeting teilnehmen",
|
||||||
|
"joinInAppNew": "Mit der App",
|
||||||
|
"joinInBrowser": "Im Browser",
|
||||||
|
"launchMeetingLabel": "Wie möchten Sie an der Konferenz teilnehmen?",
|
||||||
"launchWebButton": "Im Web öffnen",
|
"launchWebButton": "Im Web öffnen",
|
||||||
|
"noMobileApp": "Sie haben die App noch nicht installiert?",
|
||||||
|
"termsAndConditions": "Indem Sie fortfahren, stimmen Sie underen<a href='{{termsAndConditionsLink}}' rel='noopener noreferrer' target='_blank'>Nutzungsbedingungen</a> zu.",
|
||||||
"title": "Die Konferenz wird in {{app}} geöffnet …",
|
"title": "Die Konferenz wird in {{app}} geöffnet …",
|
||||||
|
"titleNew": "Konferenz starten ...",
|
||||||
"tryAgainButton": "Erneut mit der nativen Applikation versuchen",
|
"tryAgainButton": "Erneut mit der nativen Applikation versuchen",
|
||||||
"unsupportedBrowser": "Sie verwenden einen Browser, der noch nicht unterstützt wird."
|
"unsupportedBrowser": "Sie verwenden einen Browser, der noch nicht unterstützt wird."
|
||||||
},
|
},
|
||||||
|
@ -203,6 +211,12 @@
|
||||||
"microphonePermission": "Fehler beim Bezug der Mikrofon-Zugriffsberechtigungen"
|
"microphonePermission": "Fehler beim Bezug der Mikrofon-Zugriffsberechtigungen"
|
||||||
},
|
},
|
||||||
"deviceSelection": {
|
"deviceSelection": {
|
||||||
|
"hid": {
|
||||||
|
"callControl": "Anrufsteuerung",
|
||||||
|
"connectedDevices": "Verbundene Geräte:",
|
||||||
|
"deleteDevice": "Gerät löschen",
|
||||||
|
"pairDevice": "Gerät verbinden"
|
||||||
|
},
|
||||||
"noPermission": "Berechtigungen nicht erteilt",
|
"noPermission": "Berechtigungen nicht erteilt",
|
||||||
"previewUnavailable": "Keine Vorschau verfügbar",
|
"previewUnavailable": "Keine Vorschau verfügbar",
|
||||||
"selectADevice": "Ein Gerät wählen",
|
"selectADevice": "Ein Gerät wählen",
|
||||||
|
@ -226,7 +240,9 @@
|
||||||
"WaitingForHostTitle": "Warten auf den Beginn der Konferenz …",
|
"WaitingForHostTitle": "Warten auf den Beginn der Konferenz …",
|
||||||
"Yes": "Ja",
|
"Yes": "Ja",
|
||||||
"accessibilityLabel": {
|
"accessibilityLabel": {
|
||||||
"liveStreaming": "Livestream"
|
"close": "Popup schließen",
|
||||||
|
"liveStreaming": "Livestream",
|
||||||
|
"sharingTabs": "Optionen zum Teilen"
|
||||||
},
|
},
|
||||||
"add": "Hinzufügen",
|
"add": "Hinzufügen",
|
||||||
"addMeetingNote": "Notiz zu dieser Konferenz hinzufügen",
|
"addMeetingNote": "Notiz zu dieser Konferenz hinzufügen",
|
||||||
|
@ -438,6 +454,11 @@
|
||||||
"veryBad": "Sehr schlecht",
|
"veryBad": "Sehr schlecht",
|
||||||
"veryGood": "Sehr gut"
|
"veryGood": "Sehr gut"
|
||||||
},
|
},
|
||||||
|
"filmstrip": {
|
||||||
|
"accessibilityLabel": {
|
||||||
|
"heading": "Videominiaturen"
|
||||||
|
}
|
||||||
|
},
|
||||||
"giphy": {
|
"giphy": {
|
||||||
"noResults": "Keine Ergebnisse :(",
|
"noResults": "Keine Ergebnisse :(",
|
||||||
"search": "GIPHY durchsuchen"
|
"search": "GIPHY durchsuchen"
|
||||||
|
@ -751,6 +772,7 @@
|
||||||
"headings": {
|
"headings": {
|
||||||
"lobby": "Lobby ({{count}})",
|
"lobby": "Lobby ({{count}})",
|
||||||
"participantsList": "Anwesende ({{count}})",
|
"participantsList": "Anwesende ({{count}})",
|
||||||
|
"visitors": "Gäste ({{count}})",
|
||||||
"waitingLobby": "In der Lobby ({{count}})"
|
"waitingLobby": "In der Lobby ({{count}})"
|
||||||
},
|
},
|
||||||
"search": "Suche Anwesende",
|
"search": "Suche Anwesende",
|
||||||
|
@ -758,6 +780,7 @@
|
||||||
},
|
},
|
||||||
"passwordDigitsOnly": "Bis zu {{number}} Ziffern",
|
"passwordDigitsOnly": "Bis zu {{number}} Ziffern",
|
||||||
"passwordSetRemotely": "von einer anderen Person gesetzt",
|
"passwordSetRemotely": "von einer anderen Person gesetzt",
|
||||||
|
"pinParticipant": "{{participantName}} - anheften",
|
||||||
"pinnedParticipant": "Die Person ist angeheftet",
|
"pinnedParticipant": "Die Person ist angeheftet",
|
||||||
"polls": {
|
"polls": {
|
||||||
"answer": {
|
"answer": {
|
||||||
|
@ -950,6 +973,7 @@
|
||||||
"title": "Sicherheitsoptionen"
|
"title": "Sicherheitsoptionen"
|
||||||
},
|
},
|
||||||
"settings": {
|
"settings": {
|
||||||
|
"audio": "Audio",
|
||||||
"buttonLabel": "Einstellungen",
|
"buttonLabel": "Einstellungen",
|
||||||
"calendar": {
|
"calendar": {
|
||||||
"about": "Die Kalenderintegration von {{appName}} wird verwendet, um ein sicheres Zugreifen auf Ihren Kalender und Auslesen der bevorstehenden Termine zu ermöglichen.",
|
"about": "Die Kalenderintegration von {{appName}} wird verwendet, um ein sicheres Zugreifen auf Ihren Kalender und Auslesen der bevorstehenden Termine zu ermöglichen.",
|
||||||
|
@ -970,9 +994,11 @@
|
||||||
"maxStageParticipants": "Maximale Anzahl an Personen, die zur Hauptansicht angeheftet werden können",
|
"maxStageParticipants": "Maximale Anzahl an Personen, die zur Hauptansicht angeheftet werden können",
|
||||||
"microphones": "Mikrofon",
|
"microphones": "Mikrofon",
|
||||||
"moderator": "Moderation",
|
"moderator": "Moderation",
|
||||||
|
"moderatorOptions": "Moderationseinstellungen",
|
||||||
"more": "Mehr",
|
"more": "Mehr",
|
||||||
"name": "Name",
|
"name": "Name",
|
||||||
"noDevice": "Kein",
|
"noDevice": "Kein",
|
||||||
|
"notifications": "Benachrichtigungen",
|
||||||
"participantJoined": "Neue Person nimmt teil",
|
"participantJoined": "Neue Person nimmt teil",
|
||||||
"participantKnocking": "Person hat Lobby betreten",
|
"participantKnocking": "Person hat Lobby betreten",
|
||||||
"participantLeft": "Person verlässt die Konferenz",
|
"participantLeft": "Person verlässt die Konferenz",
|
||||||
|
@ -983,13 +1009,14 @@
|
||||||
"selectCamera": "Kamera",
|
"selectCamera": "Kamera",
|
||||||
"selectMic": "Mikrofon",
|
"selectMic": "Mikrofon",
|
||||||
"selfView": "Eigene Ansicht",
|
"selfView": "Eigene Ansicht",
|
||||||
"sounds": "Hinweistöne",
|
"shortcuts": "Tastaturkürzel",
|
||||||
"speakers": "Lautsprecher",
|
"speakers": "Lautsprecher",
|
||||||
"startAudioMuted": "Alle Personen treten stummgeschaltet bei",
|
"startAudioMuted": "Alle Personen treten stummgeschaltet bei",
|
||||||
"startReactionsMuted": "Interaktionstöne für alle deaktivieren",
|
"startReactionsMuted": "Interaktionstöne für alle deaktivieren",
|
||||||
"startVideoMuted": "Alle Personen treten ohne Video bei",
|
"startVideoMuted": "Alle Personen treten ohne Video bei",
|
||||||
"talkWhileMuted": "Wenn bei Stummschaltung gesprochen wird",
|
"talkWhileMuted": "Wenn bei Stummschaltung gesprochen wird",
|
||||||
"title": "Einstellungen"
|
"title": "Einstellungen",
|
||||||
|
"video": "Kamera"
|
||||||
},
|
},
|
||||||
"settingsView": {
|
"settingsView": {
|
||||||
"advanced": "Erweitert",
|
"advanced": "Erweitert",
|
||||||
|
@ -1081,6 +1108,7 @@
|
||||||
"giphy": "GIPHY ein-/ausschalten",
|
"giphy": "GIPHY ein-/ausschalten",
|
||||||
"grantModerator": "Moderationsrechte vergeben",
|
"grantModerator": "Moderationsrechte vergeben",
|
||||||
"hangup": "Konferenz verlassen",
|
"hangup": "Konferenz verlassen",
|
||||||
|
"heading": "Toolbar",
|
||||||
"help": "Hilfe",
|
"help": "Hilfe",
|
||||||
"invite": "Person einladen",
|
"invite": "Person einladen",
|
||||||
"kick": "Person entfernen",
|
"kick": "Person entfernen",
|
||||||
|
@ -1147,6 +1175,7 @@
|
||||||
"download": "Unsere Apps herunterladen",
|
"download": "Unsere Apps herunterladen",
|
||||||
"e2ee": "Ende-zu-Ende-Verschlüsselung",
|
"e2ee": "Ende-zu-Ende-Verschlüsselung",
|
||||||
"embedMeeting": "Konferenz einbetten",
|
"embedMeeting": "Konferenz einbetten",
|
||||||
|
"enableNoiseSuppression": "Rauschunterdrückung einschalten",
|
||||||
"endConference": "Konferenz für alle beenden",
|
"endConference": "Konferenz für alle beenden",
|
||||||
"enterFullScreen": "Vollbildmodus",
|
"enterFullScreen": "Vollbildmodus",
|
||||||
"enterTileView": "Kachelansicht einschalten",
|
"enterTileView": "Kachelansicht einschalten",
|
||||||
|
@ -1234,6 +1263,7 @@
|
||||||
"subtitlesOff": "Ausschalten",
|
"subtitlesOff": "Ausschalten",
|
||||||
"tr": "TR"
|
"tr": "TR"
|
||||||
},
|
},
|
||||||
|
"unpinParticipant": "{{participantName}} - Nicht mehr anheften",
|
||||||
"userMedia": {
|
"userMedia": {
|
||||||
"androidGrantPermissions": "Wählen Sie <b><i>Zulassen</i></b>, wenn der Browser um Berechtigungen bittet.",
|
"androidGrantPermissions": "Wählen Sie <b><i>Zulassen</i></b>, wenn der Browser um Berechtigungen bittet.",
|
||||||
"chromeGrantPermissions": "Wählen Sie <b><i>Zulassen</i></b>, wenn der Browser um Berechtigungen bittet.",
|
"chromeGrantPermissions": "Wählen Sie <b><i>Zulassen</i></b>, wenn der Browser um Berechtigungen bittet.",
|
||||||
|
@ -1272,9 +1302,11 @@
|
||||||
"ldTooltip": "Video wird in niedriger Auflösung angezeigt",
|
"ldTooltip": "Video wird in niedriger Auflösung angezeigt",
|
||||||
"lowDefinition": "Niedrige Auflösung",
|
"lowDefinition": "Niedrige Auflösung",
|
||||||
"performanceSettings": "Qualitätseinstellungen",
|
"performanceSettings": "Qualitätseinstellungen",
|
||||||
|
"recording": "Aufnahme läuft",
|
||||||
"sd": "SD",
|
"sd": "SD",
|
||||||
"sdTooltip": "Video wird in Standardauflösung angezeigt",
|
"sdTooltip": "Video wird in Standardauflösung angezeigt",
|
||||||
"standardDefinition": "Standardauflösung"
|
"standardDefinition": "Standardauflösung",
|
||||||
|
"streaming": "Streaming läuft"
|
||||||
},
|
},
|
||||||
"videothumbnail": {
|
"videothumbnail": {
|
||||||
"connectionInfo": "Verbindungsinformationen",
|
"connectionInfo": "Verbindungsinformationen",
|
||||||
|
@ -1324,6 +1356,7 @@
|
||||||
"webAssemblyWarning": "WebAssembly wird nicht unterstützt",
|
"webAssemblyWarning": "WebAssembly wird nicht unterstützt",
|
||||||
"webAssemblyWarningDescription": "WebAssembly ist deaktiviert oder wird in diesem Browser nicht unterstützt"
|
"webAssemblyWarningDescription": "WebAssembly ist deaktiviert oder wird in diesem Browser nicht unterstützt"
|
||||||
},
|
},
|
||||||
|
"visitorsLabel": "Anzahl Gäste: {{count}}",
|
||||||
"volumeSlider": "Lautstärkeregler",
|
"volumeSlider": "Lautstärkeregler",
|
||||||
"welcomepage": {
|
"welcomepage": {
|
||||||
"accessibilityLabel": {
|
"accessibilityLabel": {
|
||||||
|
@ -1356,6 +1389,7 @@
|
||||||
"microsoftLogo": "Microsoft Logo",
|
"microsoftLogo": "Microsoft Logo",
|
||||||
"policyLogo": "Richtlinienlogo"
|
"policyLogo": "Richtlinienlogo"
|
||||||
},
|
},
|
||||||
|
"meetingsAccessibilityLabel": "Konferenzen",
|
||||||
"mobileDownLoadLinkAndroid": "Android App Download",
|
"mobileDownLoadLinkAndroid": "Android App Download",
|
||||||
"mobileDownLoadLinkFDroid": "F-Droid App Download",
|
"mobileDownLoadLinkFDroid": "F-Droid App Download",
|
||||||
"mobileDownLoadLinkIos": "iOS App Download",
|
"mobileDownLoadLinkIos": "iOS App Download",
|
||||||
|
@ -1375,5 +1409,10 @@
|
||||||
"terms": "AGB",
|
"terms": "AGB",
|
||||||
"title": "Sichere, voll funktionale und komplett kostenlose Videokonferenzen",
|
"title": "Sichere, voll funktionale und komplett kostenlose Videokonferenzen",
|
||||||
"upcomingMeetings": "Ihre zukünftigen Konferenzen"
|
"upcomingMeetings": "Ihre zukünftigen Konferenzen"
|
||||||
|
},
|
||||||
|
"whiteboard": {
|
||||||
|
"accessibilityLabel": {
|
||||||
|
"heading": "Whiteboard"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -838,7 +838,7 @@
|
||||||
"selectCamera": "Cámara",
|
"selectCamera": "Cámara",
|
||||||
"selectMic": "Micrófono",
|
"selectMic": "Micrófono",
|
||||||
"sounds": "Sonidos",
|
"sounds": "Sonidos",
|
||||||
"speakers": "Parlantes",
|
"speakers": "Altavoces",
|
||||||
"startAudioMuted": "Todos inician silenciados",
|
"startAudioMuted": "Todos inician silenciados",
|
||||||
"startVideoMuted": "Todos inician con cámara desactivada",
|
"startVideoMuted": "Todos inician con cámara desactivada",
|
||||||
"talkWhileMuted": "Hablar en silencio",
|
"talkWhileMuted": "Hablar en silencio",
|
||||||
|
|
|
@ -220,7 +220,7 @@
|
||||||
"noPermission": "Permission not granted",
|
"noPermission": "Permission not granted",
|
||||||
"previewUnavailable": "Preview unavailable",
|
"previewUnavailable": "Preview unavailable",
|
||||||
"selectADevice": "Select a device",
|
"selectADevice": "Select a device",
|
||||||
"testAudio": "Play a test sound"
|
"testAudio": "Test"
|
||||||
},
|
},
|
||||||
"dialIn": {
|
"dialIn": {
|
||||||
"screenTitle": "Dial-in summary"
|
"screenTitle": "Dial-in summary"
|
||||||
|
@ -240,7 +240,9 @@
|
||||||
"WaitingForHostTitle": "Waiting for the host ...",
|
"WaitingForHostTitle": "Waiting for the host ...",
|
||||||
"Yes": "Yes",
|
"Yes": "Yes",
|
||||||
"accessibilityLabel": {
|
"accessibilityLabel": {
|
||||||
"liveStreaming": "Live Stream"
|
"close": "Close dialog",
|
||||||
|
"liveStreaming": "Live Stream",
|
||||||
|
"sharingTabs": "Sharing options"
|
||||||
},
|
},
|
||||||
"add": "Add",
|
"add": "Add",
|
||||||
"addMeetingNote": "Add a note about this meeting",
|
"addMeetingNote": "Add a note about this meeting",
|
||||||
|
@ -452,6 +454,11 @@
|
||||||
"veryBad": "Very Bad",
|
"veryBad": "Very Bad",
|
||||||
"veryGood": "Very Good"
|
"veryGood": "Very Good"
|
||||||
},
|
},
|
||||||
|
"filmstrip": {
|
||||||
|
"accessibilityLabel": {
|
||||||
|
"heading": "Video thumbnails"
|
||||||
|
}
|
||||||
|
},
|
||||||
"giphy": {
|
"giphy": {
|
||||||
"noResults": "No results found :(",
|
"noResults": "No results found :(",
|
||||||
"search": "Search GIPHY"
|
"search": "Search GIPHY"
|
||||||
|
@ -773,6 +780,7 @@
|
||||||
},
|
},
|
||||||
"passwordDigitsOnly": "Up to {{number}} digits",
|
"passwordDigitsOnly": "Up to {{number}} digits",
|
||||||
"passwordSetRemotely": "Set by another participant",
|
"passwordSetRemotely": "Set by another participant",
|
||||||
|
"pinParticipant": "{{participantName}} - Pin",
|
||||||
"pinnedParticipant": "The participant is pinned",
|
"pinnedParticipant": "The participant is pinned",
|
||||||
"polls": {
|
"polls": {
|
||||||
"answer": {
|
"answer": {
|
||||||
|
@ -880,9 +888,9 @@
|
||||||
},
|
},
|
||||||
"profile": {
|
"profile": {
|
||||||
"avatar": "avatar",
|
"avatar": "avatar",
|
||||||
"setDisplayNameLabel": "Set your display name",
|
"setDisplayNameLabel": "Name",
|
||||||
"setEmailInput": "Enter email",
|
"setEmailInput": "Enter email",
|
||||||
"setEmailLabel": "Set your gravatar email",
|
"setEmailLabel": "Gravatar email",
|
||||||
"title": "Profile"
|
"title": "Profile"
|
||||||
},
|
},
|
||||||
"raisedHand": "Would like to speak",
|
"raisedHand": "Would like to speak",
|
||||||
|
@ -965,6 +973,7 @@
|
||||||
"title": "Security Options"
|
"title": "Security Options"
|
||||||
},
|
},
|
||||||
"settings": {
|
"settings": {
|
||||||
|
"audio": "Audio",
|
||||||
"buttonLabel": "Settings",
|
"buttonLabel": "Settings",
|
||||||
"calendar": {
|
"calendar": {
|
||||||
"about": "The {{appName}} calendar integration is used to securely access your calendar so it can read upcoming events.",
|
"about": "The {{appName}} calendar integration is used to securely access your calendar so it can read upcoming events.",
|
||||||
|
@ -985,9 +994,11 @@
|
||||||
"maxStageParticipants": "Maximum number of participants who can be pinned to the main stage (EXPERIMENTAL)",
|
"maxStageParticipants": "Maximum number of participants who can be pinned to the main stage (EXPERIMENTAL)",
|
||||||
"microphones": "Microphones",
|
"microphones": "Microphones",
|
||||||
"moderator": "Moderator",
|
"moderator": "Moderator",
|
||||||
"more": "More",
|
"moderatorOptions": "Moderator options",
|
||||||
|
"more": "General",
|
||||||
"name": "Name",
|
"name": "Name",
|
||||||
"noDevice": "None",
|
"noDevice": "None",
|
||||||
|
"notifications": "Notifications",
|
||||||
"participantJoined": "Participant Joined",
|
"participantJoined": "Participant Joined",
|
||||||
"participantKnocking": "Participant entered lobby",
|
"participantKnocking": "Participant entered lobby",
|
||||||
"participantLeft": "Participant Left",
|
"participantLeft": "Participant Left",
|
||||||
|
@ -998,13 +1009,14 @@
|
||||||
"selectCamera": "Camera",
|
"selectCamera": "Camera",
|
||||||
"selectMic": "Microphone",
|
"selectMic": "Microphone",
|
||||||
"selfView": "Self view",
|
"selfView": "Self view",
|
||||||
"sounds": "Sounds",
|
"shortcuts": "Shortcuts",
|
||||||
"speakers": "Speakers",
|
"speakers": "Speakers",
|
||||||
"startAudioMuted": "Everyone starts muted",
|
"startAudioMuted": "Everyone starts muted",
|
||||||
"startReactionsMuted": "Mute reaction sounds for everyone",
|
"startReactionsMuted": "Mute reaction sounds for everyone",
|
||||||
"startVideoMuted": "Everyone starts hidden",
|
"startVideoMuted": "Everyone starts hidden",
|
||||||
"talkWhileMuted": "Talk while muted",
|
"talkWhileMuted": "Talk while muted",
|
||||||
"title": "Settings"
|
"title": "Settings",
|
||||||
|
"video": "Video"
|
||||||
},
|
},
|
||||||
"settingsView": {
|
"settingsView": {
|
||||||
"advanced": "Advanced",
|
"advanced": "Advanced",
|
||||||
|
@ -1096,6 +1108,7 @@
|
||||||
"giphy": "Toggle GIPHY menu",
|
"giphy": "Toggle GIPHY menu",
|
||||||
"grantModerator": "Grant Moderator Rights",
|
"grantModerator": "Grant Moderator Rights",
|
||||||
"hangup": "Leave the meeting",
|
"hangup": "Leave the meeting",
|
||||||
|
"heading": "Toolbar",
|
||||||
"help": "Help",
|
"help": "Help",
|
||||||
"invite": "Invite people",
|
"invite": "Invite people",
|
||||||
"kick": "Kick participant",
|
"kick": "Kick participant",
|
||||||
|
@ -1162,6 +1175,7 @@
|
||||||
"download": "Download our apps",
|
"download": "Download our apps",
|
||||||
"e2ee": "End-to-End Encryption",
|
"e2ee": "End-to-End Encryption",
|
||||||
"embedMeeting": "Embed meeting",
|
"embedMeeting": "Embed meeting",
|
||||||
|
"enableNoiseSuppression": "Enable noise suppression",
|
||||||
"endConference": "End meeting for all",
|
"endConference": "End meeting for all",
|
||||||
"enterFullScreen": "View full screen",
|
"enterFullScreen": "View full screen",
|
||||||
"enterTileView": "Enter tile view",
|
"enterTileView": "Enter tile view",
|
||||||
|
@ -1249,6 +1263,7 @@
|
||||||
"subtitlesOff": "Off",
|
"subtitlesOff": "Off",
|
||||||
"tr": "TR"
|
"tr": "TR"
|
||||||
},
|
},
|
||||||
|
"unpinParticipant": "{{participantName}} - Unpin",
|
||||||
"userMedia": {
|
"userMedia": {
|
||||||
"androidGrantPermissions": "Select <b><i>Allow</i></b> when your browser asks for permissions.",
|
"androidGrantPermissions": "Select <b><i>Allow</i></b> when your browser asks for permissions.",
|
||||||
"chromeGrantPermissions": "Select <b><i>Allow</i></b> when your browser asks for permissions.",
|
"chromeGrantPermissions": "Select <b><i>Allow</i></b> when your browser asks for permissions.",
|
||||||
|
@ -1287,9 +1302,11 @@
|
||||||
"ldTooltip": "Viewing low definition video",
|
"ldTooltip": "Viewing low definition video",
|
||||||
"lowDefinition": "Low definition",
|
"lowDefinition": "Low definition",
|
||||||
"performanceSettings": "Performance settings",
|
"performanceSettings": "Performance settings",
|
||||||
|
"recording": "Recording in progress",
|
||||||
"sd": "SD",
|
"sd": "SD",
|
||||||
"sdTooltip": "Viewing standard definition video",
|
"sdTooltip": "Viewing standard definition video",
|
||||||
"standardDefinition": "Standard definition"
|
"standardDefinition": "Standard definition",
|
||||||
|
"streaming": "Streaming in progress"
|
||||||
},
|
},
|
||||||
"videothumbnail": {
|
"videothumbnail": {
|
||||||
"connectionInfo": "Connection Info",
|
"connectionInfo": "Connection Info",
|
||||||
|
@ -1333,7 +1350,7 @@
|
||||||
"none": "None",
|
"none": "None",
|
||||||
"pleaseWait": "Please wait...",
|
"pleaseWait": "Please wait...",
|
||||||
"removeBackground": "Remove background",
|
"removeBackground": "Remove background",
|
||||||
"slightBlur": "Slight Blur",
|
"slightBlur": "Half Blur",
|
||||||
"title": "Virtual backgrounds",
|
"title": "Virtual backgrounds",
|
||||||
"uploadedImage": "Uploaded image {{index}}",
|
"uploadedImage": "Uploaded image {{index}}",
|
||||||
"webAssemblyWarning": "WebAssembly not supported",
|
"webAssemblyWarning": "WebAssembly not supported",
|
||||||
|
@ -1372,6 +1389,7 @@
|
||||||
"microsoftLogo": "Microsoft logo",
|
"microsoftLogo": "Microsoft logo",
|
||||||
"policyLogo": "Policy logo"
|
"policyLogo": "Policy logo"
|
||||||
},
|
},
|
||||||
|
"meetingsAccessibilityLabel": "Meetings",
|
||||||
"mobileDownLoadLinkAndroid": "Download mobile app for Android",
|
"mobileDownLoadLinkAndroid": "Download mobile app for Android",
|
||||||
"mobileDownLoadLinkFDroid": "Download mobile app for F-Droid",
|
"mobileDownLoadLinkFDroid": "Download mobile app for F-Droid",
|
||||||
"mobileDownLoadLinkIos": "Download mobile app for iOS",
|
"mobileDownLoadLinkIos": "Download mobile app for iOS",
|
||||||
|
@ -1391,5 +1409,10 @@
|
||||||
"terms": "Terms",
|
"terms": "Terms",
|
||||||
"title": "Secure, fully featured, and completely free video conferencing",
|
"title": "Secure, fully featured, and completely free video conferencing",
|
||||||
"upcomingMeetings": "Your upcoming meetings"
|
"upcomingMeetings": "Your upcoming meetings"
|
||||||
|
},
|
||||||
|
"whiteboard": {
|
||||||
|
"accessibilityLabel": {
|
||||||
|
"heading": "Whiteboard"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -106,6 +106,8 @@ import { startAudioScreenShareFlow, startScreenShareFlow } from '../../react/fea
|
||||||
import { isScreenAudioSupported } from '../../react/features/screen-share/functions';
|
import { isScreenAudioSupported } from '../../react/features/screen-share/functions';
|
||||||
import { toggleScreenshotCaptureSummary } from '../../react/features/screenshot-capture';
|
import { toggleScreenshotCaptureSummary } from '../../react/features/screenshot-capture';
|
||||||
import { isScreenshotCaptureEnabled } from '../../react/features/screenshot-capture/functions';
|
import { isScreenshotCaptureEnabled } from '../../react/features/screenshot-capture/functions';
|
||||||
|
import SettingsDialog from '../../react/features/settings/components/web/SettingsDialog';
|
||||||
|
import { SETTINGS_TABS } from '../../react/features/settings/constants';
|
||||||
import { playSharedVideo, stopSharedVideo } from '../../react/features/shared-video/actions.any';
|
import { playSharedVideo, stopSharedVideo } from '../../react/features/shared-video/actions.any';
|
||||||
import { extractYoutubeIdOrURL } from '../../react/features/shared-video/functions';
|
import { extractYoutubeIdOrURL } from '../../react/features/shared-video/functions';
|
||||||
import { setRequestingSubtitles, toggleRequestingSubtitles } from '../../react/features/subtitles/actions';
|
import { setRequestingSubtitles, toggleRequestingSubtitles } from '../../react/features/subtitles/actions';
|
||||||
|
@ -113,7 +115,6 @@ import { isAudioMuteButtonDisabled } from '../../react/features/toolbox/function
|
||||||
import { setTileView, toggleTileView } from '../../react/features/video-layout';
|
import { setTileView, toggleTileView } from '../../react/features/video-layout';
|
||||||
import { muteAllParticipants } from '../../react/features/video-menu/actions';
|
import { muteAllParticipants } from '../../react/features/video-menu/actions';
|
||||||
import { setVideoQuality } from '../../react/features/video-quality';
|
import { setVideoQuality } from '../../react/features/video-quality';
|
||||||
import VirtualBackgroundDialog from '../../react/features/virtual-background/components/VirtualBackgroundDialog';
|
|
||||||
import { getJitsiMeetTransport } from '../transport';
|
import { getJitsiMeetTransport } from '../transport';
|
||||||
|
|
||||||
import { API_ID, ENDPOINT_TEXT_MESSAGE_NAME } from './constants';
|
import { API_ID, ENDPOINT_TEXT_MESSAGE_NAME } from './constants';
|
||||||
|
@ -798,7 +799,8 @@ function initCommands() {
|
||||||
APP.store.dispatch(overwriteConfig(whitelistedConfig));
|
APP.store.dispatch(overwriteConfig(whitelistedConfig));
|
||||||
},
|
},
|
||||||
'toggle-virtual-background': () => {
|
'toggle-virtual-background': () => {
|
||||||
APP.store.dispatch(toggleDialog(VirtualBackgroundDialog));
|
APP.store.dispatch(toggleDialog(SettingsDialog, {
|
||||||
|
defaultTab: SETTINGS_TABS.VIRTUAL_BACKGROUND }));
|
||||||
},
|
},
|
||||||
'end-conference': () => {
|
'end-conference': () => {
|
||||||
APP.store.dispatch(endConference());
|
APP.store.dispatch(endConference());
|
||||||
|
@ -1229,6 +1231,22 @@ class API {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notify the external app that a notification has been triggered.
|
||||||
|
*
|
||||||
|
* @param {string} title - The notification title.
|
||||||
|
* @param {string} description - The notification description.
|
||||||
|
*
|
||||||
|
* @returns {void}
|
||||||
|
*/
|
||||||
|
notifyNotificationTriggered(title: string, description: string) {
|
||||||
|
this._sendEvent({
|
||||||
|
description,
|
||||||
|
name: 'notification-triggered',
|
||||||
|
title
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Notify external application that the video quality setting has changed.
|
* Notify external application that the video quality setting has changed.
|
||||||
*
|
*
|
||||||
|
|
|
@ -127,6 +127,7 @@ const events = {
|
||||||
'mouse-enter': 'mouseEnter',
|
'mouse-enter': 'mouseEnter',
|
||||||
'mouse-leave': 'mouseLeave',
|
'mouse-leave': 'mouseLeave',
|
||||||
'mouse-move': 'mouseMove',
|
'mouse-move': 'mouseMove',
|
||||||
|
'notification-triggered': 'notificationTriggered',
|
||||||
'outgoing-message': 'outgoingMessage',
|
'outgoing-message': 'outgoingMessage',
|
||||||
'participant-joined': 'participantJoined',
|
'participant-joined': 'participantJoined',
|
||||||
'participant-kicked-out': 'participantKickedOut',
|
'participant-kicked-out': 'participantKickedOut',
|
||||||
|
|
|
@ -292,17 +292,6 @@ UI.showToolbar = timeout => APP.store.dispatch(showToolbox(timeout));
|
||||||
// Used by torture.
|
// Used by torture.
|
||||||
UI.dockToolbar = dock => APP.store.dispatch(dockToolbox(dock));
|
UI.dockToolbar = dock => APP.store.dispatch(dockToolbox(dock));
|
||||||
|
|
||||||
/**
|
|
||||||
* Updates the displayed avatar for participant.
|
|
||||||
*
|
|
||||||
* @param {string} id - User id whose avatar should be updated.
|
|
||||||
* @param {string} avatarURL - The URL to avatar image to display.
|
|
||||||
* @returns {void}
|
|
||||||
*/
|
|
||||||
UI.refreshAvatarDisplay = function(id) {
|
|
||||||
VideoLayout.changeUserAvatar(id);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Notify user that connection failed.
|
* Notify user that connection failed.
|
||||||
* @param {string} stropheErrorMsg raw Strophe error message
|
* @param {string} stropheErrorMsg raw Strophe error message
|
||||||
|
|
|
@ -139,12 +139,6 @@ const VideoLayout = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
changeUserAvatar(id, avatarUrl) {
|
|
||||||
if (this.isCurrentlyOnLarge(id)) {
|
|
||||||
largeVideo.updateAvatar(avatarUrl);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
isLargeVideoVisible() {
|
isLargeVideoVisible() {
|
||||||
return this.isLargeContainerTypeVisible(VIDEO_CONTAINER_TYPE);
|
return this.isLargeContainerTypeVisible(VIDEO_CONTAINER_TYPE);
|
||||||
},
|
},
|
||||||
|
|
|
@ -8,10 +8,9 @@ import {
|
||||||
createShortcutEvent,
|
createShortcutEvent,
|
||||||
sendAnalytics
|
sendAnalytics
|
||||||
} from '../../react/features/analytics';
|
} from '../../react/features/analytics';
|
||||||
import { toggleDialog } from '../../react/features/base/dialog';
|
|
||||||
import { clickOnVideo } from '../../react/features/filmstrip/actions';
|
import { clickOnVideo } from '../../react/features/filmstrip/actions';
|
||||||
import { KeyboardShortcutsDialog }
|
import { openSettingsDialog } from '../../react/features/settings/actions';
|
||||||
from '../../react/features/keyboard-shortcuts';
|
import { SETTINGS_TABS } from '../../react/features/settings/constants';
|
||||||
|
|
||||||
const logger = Logger.getLogger(__filename);
|
const logger = Logger.getLogger(__filename);
|
||||||
|
|
||||||
|
@ -120,15 +119,17 @@ const KeyboardShortcut = {
|
||||||
return jitsiLocalStorage.getItem(_enableShortcutsKey) === 'false' ? false : true;
|
return jitsiLocalStorage.getItem(_enableShortcutsKey) === 'false' ? false : true;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
getShortcutsDescriptions() {
|
||||||
|
return _shortcutsHelp;
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Opens the {@KeyboardShortcutsDialog} dialog.
|
* Opens the {@SettingsDialog} dialog on the Shortcuts page.
|
||||||
*
|
*
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
openDialog() {
|
openDialog() {
|
||||||
APP.store.dispatch(toggleDialog(KeyboardShortcutsDialog, {
|
APP.store.dispatch(openSettingsDialog(SETTINGS_TABS.SHORTCUTS, false));
|
||||||
shortcutDescriptions: _shortcutsHelp
|
|
||||||
}));
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -72,7 +72,7 @@
|
||||||
"js-md5": "0.6.1",
|
"js-md5": "0.6.1",
|
||||||
"js-sha512": "0.8.0",
|
"js-sha512": "0.8.0",
|
||||||
"jwt-decode": "2.2.0",
|
"jwt-decode": "2.2.0",
|
||||||
"lib-jitsi-meet": "https://github.com/jitsi/lib-jitsi-meet/releases/download/v1585.0.0+362d1b2c/lib-jitsi-meet.tgz",
|
"lib-jitsi-meet": "https://github.com/jitsi/lib-jitsi-meet/releases/download/v1589.0.0+d43c349d/lib-jitsi-meet.tgz",
|
||||||
"lodash": "4.17.21",
|
"lodash": "4.17.21",
|
||||||
"moment": "2.29.4",
|
"moment": "2.29.4",
|
||||||
"moment-duration-format": "2.2.2",
|
"moment-duration-format": "2.2.2",
|
||||||
|
@ -158,7 +158,7 @@
|
||||||
"circular-dependency-plugin": "5.2.0",
|
"circular-dependency-plugin": "5.2.0",
|
||||||
"clean-css-cli": "4.3.0",
|
"clean-css-cli": "4.3.0",
|
||||||
"css-loader": "3.6.0",
|
"css-loader": "3.6.0",
|
||||||
"eslint": "8.25.0",
|
"eslint": "8.35.0",
|
||||||
"eslint-plugin-flowtype": "8.0.3",
|
"eslint-plugin-flowtype": "8.0.3",
|
||||||
"eslint-plugin-import": "2.25.2",
|
"eslint-plugin-import": "2.25.2",
|
||||||
"eslint-plugin-jsdoc": "37.0.3",
|
"eslint-plugin-jsdoc": "37.0.3",
|
||||||
|
@ -3250,15 +3250,15 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@eslint/eslintrc": {
|
"node_modules/@eslint/eslintrc": {
|
||||||
"version": "1.3.3",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.3.tgz",
|
"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.0.tgz",
|
||||||
"integrity": "sha512-uj3pT6Mg+3t39fvLrj8iuCIJ38zKO9FpGtJ4BBJebJhEwjoT+KLVNCcHT5QC9NGRIEi7fZ0ZR8YRb884auB4Lg==",
|
"integrity": "sha512-fluIaaV+GyV24CCu/ggiHdV+j4RNh85yQnAYS/G2mZODZgGmmlrgCydjUcV3YvxCm9x8nMAfThsqTni4KiXT4A==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"ajv": "^6.12.4",
|
"ajv": "^6.12.4",
|
||||||
"debug": "^4.3.2",
|
"debug": "^4.3.2",
|
||||||
"espree": "^9.4.0",
|
"espree": "^9.4.0",
|
||||||
"globals": "^13.15.0",
|
"globals": "^13.19.0",
|
||||||
"ignore": "^5.2.0",
|
"ignore": "^5.2.0",
|
||||||
"import-fresh": "^3.2.1",
|
"import-fresh": "^3.2.1",
|
||||||
"js-yaml": "^4.1.0",
|
"js-yaml": "^4.1.0",
|
||||||
|
@ -3279,9 +3279,9 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@eslint/eslintrc/node_modules/globals": {
|
"node_modules/@eslint/eslintrc/node_modules/globals": {
|
||||||
"version": "13.17.0",
|
"version": "13.20.0",
|
||||||
"resolved": "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz",
|
"resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz",
|
||||||
"integrity": "sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==",
|
"integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"type-fest": "^0.20.2"
|
"type-fest": "^0.20.2"
|
||||||
|
@ -3333,6 +3333,15 @@
|
||||||
"url": "https://github.com/sponsors/sindresorhus"
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@eslint/js": {
|
||||||
|
"version": "8.35.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.35.0.tgz",
|
||||||
|
"integrity": "sha512-JXdzbRiWclLVoD8sNUjR443VVlYqiYmDVT6rGUEIEHU5YJW0gaVZwV2xgM7D4arkvASqD0IlLUVjHiFuxaftRw==",
|
||||||
|
"dev": true,
|
||||||
|
"engines": {
|
||||||
|
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@giphy/js-analytics": {
|
"node_modules/@giphy/js-analytics": {
|
||||||
"version": "4.0.7",
|
"version": "4.0.7",
|
||||||
"resolved": "https://registry.npmjs.org/@giphy/js-analytics/-/js-analytics-4.0.7.tgz",
|
"resolved": "https://registry.npmjs.org/@giphy/js-analytics/-/js-analytics-4.0.7.tgz",
|
||||||
|
@ -3470,14 +3479,14 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@humanwhocodes/config-array": {
|
"node_modules/@humanwhocodes/config-array": {
|
||||||
"version": "0.10.7",
|
"version": "0.11.8",
|
||||||
"resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.10.7.tgz",
|
"resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz",
|
||||||
"integrity": "sha512-MDl6D6sBsaV452/QSdX+4CXIjZhIcI0PELsxUjk4U828yd58vk3bTIvk/6w5FY+4hIy9sLW0sfrV7K7Kc++j/w==",
|
"integrity": "sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@humanwhocodes/object-schema": "^1.2.1",
|
"@humanwhocodes/object-schema": "^1.2.1",
|
||||||
"debug": "^4.1.1",
|
"debug": "^4.1.1",
|
||||||
"minimatch": "^3.0.4"
|
"minimatch": "^3.0.5"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=10.10.0"
|
"node": ">=10.10.0"
|
||||||
|
@ -9885,14 +9894,16 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/eslint": {
|
"node_modules/eslint": {
|
||||||
"version": "8.25.0",
|
"version": "8.35.0",
|
||||||
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.25.0.tgz",
|
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.35.0.tgz",
|
||||||
"integrity": "sha512-DVlJOZ4Pn50zcKW5bYH7GQK/9MsoQG2d5eDH0ebEkE8PbgzTTmtt/VTH9GGJ4BfeZCpBLqFfvsjX35UacUL83A==",
|
"integrity": "sha512-BxAf1fVL7w+JLRQhWl2pzGeSiGqbWumV4WNvc9Rhp6tiCtm4oHnyPBSEtMGZwrQgudFQ+otqzWoPB7x+hxoWsw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@eslint/eslintrc": "^1.3.3",
|
"@eslint/eslintrc": "^2.0.0",
|
||||||
"@humanwhocodes/config-array": "^0.10.5",
|
"@eslint/js": "8.35.0",
|
||||||
|
"@humanwhocodes/config-array": "^0.11.8",
|
||||||
"@humanwhocodes/module-importer": "^1.0.1",
|
"@humanwhocodes/module-importer": "^1.0.1",
|
||||||
|
"@nodelib/fs.walk": "^1.2.8",
|
||||||
"ajv": "^6.10.0",
|
"ajv": "^6.10.0",
|
||||||
"chalk": "^4.0.0",
|
"chalk": "^4.0.0",
|
||||||
"cross-spawn": "^7.0.2",
|
"cross-spawn": "^7.0.2",
|
||||||
|
@ -9903,19 +9914,19 @@
|
||||||
"eslint-utils": "^3.0.0",
|
"eslint-utils": "^3.0.0",
|
||||||
"eslint-visitor-keys": "^3.3.0",
|
"eslint-visitor-keys": "^3.3.0",
|
||||||
"espree": "^9.4.0",
|
"espree": "^9.4.0",
|
||||||
"esquery": "^1.4.0",
|
"esquery": "^1.4.2",
|
||||||
"esutils": "^2.0.2",
|
"esutils": "^2.0.2",
|
||||||
"fast-deep-equal": "^3.1.3",
|
"fast-deep-equal": "^3.1.3",
|
||||||
"file-entry-cache": "^6.0.1",
|
"file-entry-cache": "^6.0.1",
|
||||||
"find-up": "^5.0.0",
|
"find-up": "^5.0.0",
|
||||||
"glob-parent": "^6.0.1",
|
"glob-parent": "^6.0.2",
|
||||||
"globals": "^13.15.0",
|
"globals": "^13.19.0",
|
||||||
"globby": "^11.1.0",
|
|
||||||
"grapheme-splitter": "^1.0.4",
|
"grapheme-splitter": "^1.0.4",
|
||||||
"ignore": "^5.2.0",
|
"ignore": "^5.2.0",
|
||||||
"import-fresh": "^3.0.0",
|
"import-fresh": "^3.0.0",
|
||||||
"imurmurhash": "^0.1.4",
|
"imurmurhash": "^0.1.4",
|
||||||
"is-glob": "^4.0.0",
|
"is-glob": "^4.0.0",
|
||||||
|
"is-path-inside": "^3.0.3",
|
||||||
"js-sdsl": "^4.1.4",
|
"js-sdsl": "^4.1.4",
|
||||||
"js-yaml": "^4.1.0",
|
"js-yaml": "^4.1.0",
|
||||||
"json-stable-stringify-without-jsonify": "^1.0.1",
|
"json-stable-stringify-without-jsonify": "^1.0.1",
|
||||||
|
@ -10324,9 +10335,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/eslint/node_modules/globals": {
|
"node_modules/eslint/node_modules/globals": {
|
||||||
"version": "13.17.0",
|
"version": "13.20.0",
|
||||||
"resolved": "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz",
|
"resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz",
|
||||||
"integrity": "sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==",
|
"integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"type-fest": "^0.20.2"
|
"type-fest": "^0.20.2"
|
||||||
|
@ -10454,9 +10465,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/espree": {
|
"node_modules/espree": {
|
||||||
"version": "9.4.0",
|
"version": "9.4.1",
|
||||||
"resolved": "https://registry.npmjs.org/espree/-/espree-9.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/espree/-/espree-9.4.1.tgz",
|
||||||
"integrity": "sha512-DQmnRpLj7f6TgN/NYb0MTzJXL+vJF9h3pHy4JhCIs3zwcgez8xmGg3sXHcEO97BrmO2OSvCwMdfdlyl+E9KjOw==",
|
"integrity": "sha512-XwctdmTO6SIvCzd9810yyNzIrOrqNYV9Koizx4C/mRhf9uq0o4yHoCEU/670pOxOL/MSraektvSAji79kX90Vg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"acorn": "^8.8.0",
|
"acorn": "^8.8.0",
|
||||||
|
@ -10492,9 +10503,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/esquery": {
|
"node_modules/esquery": {
|
||||||
"version": "1.4.0",
|
"version": "1.4.2",
|
||||||
"resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.2.tgz",
|
||||||
"integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==",
|
"integrity": "sha512-JVSoLdTlTDkmjFmab7H/9SL9qGSyjElT3myyKp7krqjVFQCDLmj1QFaCLRFBszBKI0XVZaiiXvuPIX3ZwHe1Ng==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"estraverse": "^5.1.0"
|
"estraverse": "^5.1.0"
|
||||||
|
@ -13405,8 +13416,8 @@
|
||||||
},
|
},
|
||||||
"node_modules/lib-jitsi-meet": {
|
"node_modules/lib-jitsi-meet": {
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"resolved": "https://github.com/jitsi/lib-jitsi-meet/releases/download/v1585.0.0+362d1b2c/lib-jitsi-meet.tgz",
|
"resolved": "https://github.com/jitsi/lib-jitsi-meet/releases/download/v1589.0.0+d43c349d/lib-jitsi-meet.tgz",
|
||||||
"integrity": "sha512-g7JVvBfZixl1fKZI4ZMm3nvMasEz5sdapMzZdc76kA/eZSej2QuNK+W9cB8IypB7dqeTM4yzbfzi9rDipyWn+w==",
|
"integrity": "sha512-6QuR109o4sq24c9EU73NGLWAdJO+piiEylsqtmOL/B+I2GMTFeIras0tMOl6eQpncpZS5nD9gqiJmTNDnZqWbw==",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@jitsi/js-utils": "2.0.0",
|
"@jitsi/js-utils": "2.0.0",
|
||||||
|
@ -22631,15 +22642,15 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@eslint/eslintrc": {
|
"@eslint/eslintrc": {
|
||||||
"version": "1.3.3",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.3.tgz",
|
"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.0.tgz",
|
||||||
"integrity": "sha512-uj3pT6Mg+3t39fvLrj8iuCIJ38zKO9FpGtJ4BBJebJhEwjoT+KLVNCcHT5QC9NGRIEi7fZ0ZR8YRb884auB4Lg==",
|
"integrity": "sha512-fluIaaV+GyV24CCu/ggiHdV+j4RNh85yQnAYS/G2mZODZgGmmlrgCydjUcV3YvxCm9x8nMAfThsqTni4KiXT4A==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"ajv": "^6.12.4",
|
"ajv": "^6.12.4",
|
||||||
"debug": "^4.3.2",
|
"debug": "^4.3.2",
|
||||||
"espree": "^9.4.0",
|
"espree": "^9.4.0",
|
||||||
"globals": "^13.15.0",
|
"globals": "^13.19.0",
|
||||||
"ignore": "^5.2.0",
|
"ignore": "^5.2.0",
|
||||||
"import-fresh": "^3.2.1",
|
"import-fresh": "^3.2.1",
|
||||||
"js-yaml": "^4.1.0",
|
"js-yaml": "^4.1.0",
|
||||||
|
@ -22654,9 +22665,9 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"globals": {
|
"globals": {
|
||||||
"version": "13.17.0",
|
"version": "13.20.0",
|
||||||
"resolved": "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz",
|
"resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz",
|
||||||
"integrity": "sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==",
|
"integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"type-fest": "^0.20.2"
|
"type-fest": "^0.20.2"
|
||||||
|
@ -22689,6 +22700,12 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"@eslint/js": {
|
||||||
|
"version": "8.35.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.35.0.tgz",
|
||||||
|
"integrity": "sha512-JXdzbRiWclLVoD8sNUjR443VVlYqiYmDVT6rGUEIEHU5YJW0gaVZwV2xgM7D4arkvASqD0IlLUVjHiFuxaftRw==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"@giphy/js-analytics": {
|
"@giphy/js-analytics": {
|
||||||
"version": "4.0.7",
|
"version": "4.0.7",
|
||||||
"resolved": "https://registry.npmjs.org/@giphy/js-analytics/-/js-analytics-4.0.7.tgz",
|
"resolved": "https://registry.npmjs.org/@giphy/js-analytics/-/js-analytics-4.0.7.tgz",
|
||||||
|
@ -22810,14 +22827,14 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@humanwhocodes/config-array": {
|
"@humanwhocodes/config-array": {
|
||||||
"version": "0.10.7",
|
"version": "0.11.8",
|
||||||
"resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.10.7.tgz",
|
"resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz",
|
||||||
"integrity": "sha512-MDl6D6sBsaV452/QSdX+4CXIjZhIcI0PELsxUjk4U828yd58vk3bTIvk/6w5FY+4hIy9sLW0sfrV7K7Kc++j/w==",
|
"integrity": "sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@humanwhocodes/object-schema": "^1.2.1",
|
"@humanwhocodes/object-schema": "^1.2.1",
|
||||||
"debug": "^4.1.1",
|
"debug": "^4.1.1",
|
||||||
"minimatch": "^3.0.4"
|
"minimatch": "^3.0.5"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@humanwhocodes/module-importer": {
|
"@humanwhocodes/module-importer": {
|
||||||
|
@ -27604,14 +27621,16 @@
|
||||||
"integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA=="
|
"integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA=="
|
||||||
},
|
},
|
||||||
"eslint": {
|
"eslint": {
|
||||||
"version": "8.25.0",
|
"version": "8.35.0",
|
||||||
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.25.0.tgz",
|
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.35.0.tgz",
|
||||||
"integrity": "sha512-DVlJOZ4Pn50zcKW5bYH7GQK/9MsoQG2d5eDH0ebEkE8PbgzTTmtt/VTH9GGJ4BfeZCpBLqFfvsjX35UacUL83A==",
|
"integrity": "sha512-BxAf1fVL7w+JLRQhWl2pzGeSiGqbWumV4WNvc9Rhp6tiCtm4oHnyPBSEtMGZwrQgudFQ+otqzWoPB7x+hxoWsw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@eslint/eslintrc": "^1.3.3",
|
"@eslint/eslintrc": "^2.0.0",
|
||||||
"@humanwhocodes/config-array": "^0.10.5",
|
"@eslint/js": "8.35.0",
|
||||||
|
"@humanwhocodes/config-array": "^0.11.8",
|
||||||
"@humanwhocodes/module-importer": "^1.0.1",
|
"@humanwhocodes/module-importer": "^1.0.1",
|
||||||
|
"@nodelib/fs.walk": "^1.2.8",
|
||||||
"ajv": "^6.10.0",
|
"ajv": "^6.10.0",
|
||||||
"chalk": "^4.0.0",
|
"chalk": "^4.0.0",
|
||||||
"cross-spawn": "^7.0.2",
|
"cross-spawn": "^7.0.2",
|
||||||
|
@ -27622,19 +27641,19 @@
|
||||||
"eslint-utils": "^3.0.0",
|
"eslint-utils": "^3.0.0",
|
||||||
"eslint-visitor-keys": "^3.3.0",
|
"eslint-visitor-keys": "^3.3.0",
|
||||||
"espree": "^9.4.0",
|
"espree": "^9.4.0",
|
||||||
"esquery": "^1.4.0",
|
"esquery": "^1.4.2",
|
||||||
"esutils": "^2.0.2",
|
"esutils": "^2.0.2",
|
||||||
"fast-deep-equal": "^3.1.3",
|
"fast-deep-equal": "^3.1.3",
|
||||||
"file-entry-cache": "^6.0.1",
|
"file-entry-cache": "^6.0.1",
|
||||||
"find-up": "^5.0.0",
|
"find-up": "^5.0.0",
|
||||||
"glob-parent": "^6.0.1",
|
"glob-parent": "^6.0.2",
|
||||||
"globals": "^13.15.0",
|
"globals": "^13.19.0",
|
||||||
"globby": "^11.1.0",
|
|
||||||
"grapheme-splitter": "^1.0.4",
|
"grapheme-splitter": "^1.0.4",
|
||||||
"ignore": "^5.2.0",
|
"ignore": "^5.2.0",
|
||||||
"import-fresh": "^3.0.0",
|
"import-fresh": "^3.0.0",
|
||||||
"imurmurhash": "^0.1.4",
|
"imurmurhash": "^0.1.4",
|
||||||
"is-glob": "^4.0.0",
|
"is-glob": "^4.0.0",
|
||||||
|
"is-path-inside": "^3.0.3",
|
||||||
"js-sdsl": "^4.1.4",
|
"js-sdsl": "^4.1.4",
|
||||||
"js-yaml": "^4.1.0",
|
"js-yaml": "^4.1.0",
|
||||||
"json-stable-stringify-without-jsonify": "^1.0.1",
|
"json-stable-stringify-without-jsonify": "^1.0.1",
|
||||||
|
@ -27716,9 +27735,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"globals": {
|
"globals": {
|
||||||
"version": "13.17.0",
|
"version": "13.20.0",
|
||||||
"resolved": "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz",
|
"resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz",
|
||||||
"integrity": "sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==",
|
"integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"type-fest": "^0.20.2"
|
"type-fest": "^0.20.2"
|
||||||
|
@ -28030,9 +28049,9 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"espree": {
|
"espree": {
|
||||||
"version": "9.4.0",
|
"version": "9.4.1",
|
||||||
"resolved": "https://registry.npmjs.org/espree/-/espree-9.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/espree/-/espree-9.4.1.tgz",
|
||||||
"integrity": "sha512-DQmnRpLj7f6TgN/NYb0MTzJXL+vJF9h3pHy4JhCIs3zwcgez8xmGg3sXHcEO97BrmO2OSvCwMdfdlyl+E9KjOw==",
|
"integrity": "sha512-XwctdmTO6SIvCzd9810yyNzIrOrqNYV9Koizx4C/mRhf9uq0o4yHoCEU/670pOxOL/MSraektvSAji79kX90Vg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"acorn": "^8.8.0",
|
"acorn": "^8.8.0",
|
||||||
|
@ -28054,9 +28073,9 @@
|
||||||
"integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A=="
|
"integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A=="
|
||||||
},
|
},
|
||||||
"esquery": {
|
"esquery": {
|
||||||
"version": "1.4.0",
|
"version": "1.4.2",
|
||||||
"resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.2.tgz",
|
||||||
"integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==",
|
"integrity": "sha512-JVSoLdTlTDkmjFmab7H/9SL9qGSyjElT3myyKp7krqjVFQCDLmj1QFaCLRFBszBKI0XVZaiiXvuPIX3ZwHe1Ng==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"estraverse": "^5.1.0"
|
"estraverse": "^5.1.0"
|
||||||
|
@ -30289,8 +30308,8 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lib-jitsi-meet": {
|
"lib-jitsi-meet": {
|
||||||
"version": "https://github.com/jitsi/lib-jitsi-meet/releases/download/v1585.0.0+362d1b2c/lib-jitsi-meet.tgz",
|
"version": "https://github.com/jitsi/lib-jitsi-meet/releases/download/v1589.0.0+d43c349d/lib-jitsi-meet.tgz",
|
||||||
"integrity": "sha512-g7JVvBfZixl1fKZI4ZMm3nvMasEz5sdapMzZdc76kA/eZSej2QuNK+W9cB8IypB7dqeTM4yzbfzi9rDipyWn+w==",
|
"integrity": "sha512-6QuR109o4sq24c9EU73NGLWAdJO+piiEylsqtmOL/B+I2GMTFeIras0tMOl6eQpncpZS5nD9gqiJmTNDnZqWbw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@jitsi/js-utils": "2.0.0",
|
"@jitsi/js-utils": "2.0.0",
|
||||||
"@jitsi/logger": "2.0.0",
|
"@jitsi/logger": "2.0.0",
|
||||||
|
|
|
@ -77,7 +77,7 @@
|
||||||
"js-md5": "0.6.1",
|
"js-md5": "0.6.1",
|
||||||
"js-sha512": "0.8.0",
|
"js-sha512": "0.8.0",
|
||||||
"jwt-decode": "2.2.0",
|
"jwt-decode": "2.2.0",
|
||||||
"lib-jitsi-meet": "https://github.com/jitsi/lib-jitsi-meet/releases/download/v1585.0.0+362d1b2c/lib-jitsi-meet.tgz",
|
"lib-jitsi-meet": "https://github.com/jitsi/lib-jitsi-meet/releases/download/v1589.0.0+d43c349d/lib-jitsi-meet.tgz",
|
||||||
"lodash": "4.17.21",
|
"lodash": "4.17.21",
|
||||||
"moment": "2.29.4",
|
"moment": "2.29.4",
|
||||||
"moment-duration-format": "2.2.2",
|
"moment-duration-format": "2.2.2",
|
||||||
|
@ -163,7 +163,7 @@
|
||||||
"circular-dependency-plugin": "5.2.0",
|
"circular-dependency-plugin": "5.2.0",
|
||||||
"clean-css-cli": "4.3.0",
|
"clean-css-cli": "4.3.0",
|
||||||
"css-loader": "3.6.0",
|
"css-loader": "3.6.0",
|
||||||
"eslint": "8.25.0",
|
"eslint": "8.35.0",
|
||||||
"eslint-plugin-flowtype": "8.0.3",
|
"eslint-plugin-flowtype": "8.0.3",
|
||||||
"eslint-plugin-import": "2.25.2",
|
"eslint-plugin-import": "2.25.2",
|
||||||
"eslint-plugin-jsdoc": "37.0.3",
|
"eslint-plugin-jsdoc": "37.0.3",
|
||||||
|
|
|
@ -199,7 +199,7 @@ export default class AlwaysOnTop extends Component<*, State> {
|
||||||
color = { getAvatarColor(displayName, customAvatarBackgrounds) }
|
color = { getAvatarColor(displayName, customAvatarBackgrounds) }
|
||||||
id = 'avatar'
|
id = 'avatar'
|
||||||
initials = { getInitials(displayName) }
|
initials = { getInitials(displayName) }
|
||||||
url = { displayName ? null : avatarURL } />)
|
url = { avatarURL } />)
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
className = 'displayname'
|
className = 'displayname'
|
||||||
|
|
|
@ -5,7 +5,6 @@ import '../base/media/middleware';
|
||||||
import '../dynamic-branding/middleware';
|
import '../dynamic-branding/middleware';
|
||||||
import '../e2ee/middleware';
|
import '../e2ee/middleware';
|
||||||
import '../external-api/middleware';
|
import '../external-api/middleware';
|
||||||
import '../keyboard-shortcuts/middleware';
|
|
||||||
import '../no-audio-signal/middleware';
|
import '../no-audio-signal/middleware';
|
||||||
import '../notifications/middleware';
|
import '../notifications/middleware';
|
||||||
import '../noise-detection/middleware';
|
import '../noise-detection/middleware';
|
||||||
|
|
|
@ -88,7 +88,7 @@ const useStyles = makeStyles()(theme => {
|
||||||
boxShadow: 'inset 0px -1px 0px rgba(255, 255, 255, 0.15)',
|
boxShadow: 'inset 0px -1px 0px rgba(255, 255, 255, 0.15)',
|
||||||
minHeight: '40px',
|
minHeight: '40px',
|
||||||
|
|
||||||
'&:hover': {
|
'&:hover, &:focus-within': {
|
||||||
backgroundColor: theme.palette.ui02,
|
backgroundColor: theme.palette.ui02,
|
||||||
|
|
||||||
'& .indicators': {
|
'& .indicators': {
|
||||||
|
@ -97,6 +97,8 @@ const useStyles = makeStyles()(theme => {
|
||||||
|
|
||||||
'& .actions': {
|
'& .actions': {
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
|
position: 'relative',
|
||||||
|
top: 'auto',
|
||||||
boxShadow: `-15px 0px 10px -5px ${theme.palette.ui02}`,
|
boxShadow: `-15px 0px 10px -5px ${theme.palette.ui02}`,
|
||||||
backgroundColor: theme.palette.ui02
|
backgroundColor: theme.palette.ui02
|
||||||
}
|
}
|
||||||
|
@ -154,7 +156,8 @@ const useStyles = makeStyles()(theme => {
|
||||||
},
|
},
|
||||||
|
|
||||||
actionsContainer: {
|
actionsContainer: {
|
||||||
display: 'none',
|
position: 'absolute',
|
||||||
|
top: '-1000px',
|
||||||
boxShadow: `-15px 0px 10px -5px ${theme.palette.ui02}`,
|
boxShadow: `-15px 0px 10px -5px ${theme.palette.ui02}`,
|
||||||
backgroundColor: theme.palette.ui02
|
backgroundColor: theme.palette.ui02
|
||||||
},
|
},
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M12.7158 3.03843C12.4964 2.33696 11.5037 2.33696 11.2842 3.03843L9.54263 8.60636C9.44381 8.92229 9.14957 9.13606 8.81858 9.13242L2.98497 9.0682C2.25003 9.06011 1.94325 10.0043 2.54258 10.4297L7.29982 13.8067C7.56974 13.9983 7.68213 14.3442 7.57638 14.6579L5.71262 20.1861C5.47782 20.8826 6.28099 21.4661 6.87081 21.0276L11.5525 17.5467C11.8182 17.3492 12.1819 17.3492 12.4475 17.5467L17.1293 21.0276C17.7191 21.4661 18.5223 20.8826 18.2875 20.1861L16.4237 14.6579C16.3179 14.3442 16.4303 13.9983 16.7003 13.8067L21.4575 10.4297C22.0568 10.0043 21.75 9.06011 21.0151 9.0682L15.1815 9.13242C14.8505 9.13606 14.5563 8.92228 14.4574 8.60636L12.7158 3.03843Z" />
|
||||||
|
</svg>
|
After Width: | Height: | Size: 814 B |
|
@ -0,0 +1,3 @@
|
||||||
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M12 5.77465L10.9742 9.05416C10.6778 10.0019 9.79505 10.6433 8.80206 10.6323L5.36607 10.5945L8.16808 12.5835C8.97785 13.1583 9.31502 14.1961 8.99778 15.1371L7.90002 18.3932L10.6576 16.343C11.4545 15.7505 12.5456 15.7505 13.3425 16.343L16.1001 18.3932L15.0023 15.1371C14.6851 14.1961 15.0222 13.1583 15.832 12.5835L18.634 10.5945L15.198 10.6323C14.205 10.6433 13.3223 10.0019 13.0258 9.05416L12 5.77465ZM12.7158 3.03843C12.4964 2.33696 11.5037 2.33696 11.2842 3.03843L9.54263 8.60636C9.44381 8.92229 9.14957 9.13606 8.81858 9.13242L2.98497 9.0682C2.25003 9.06011 1.94325 10.0043 2.54258 10.4297L7.29982 13.8067C7.56974 13.9983 7.68213 14.3442 7.57638 14.6579L5.71262 20.1861C5.47782 20.8826 6.28099 21.4661 6.87081 21.0276L11.5525 17.5467C11.8182 17.3492 12.1819 17.3492 12.4475 17.5467L17.1293 21.0276C17.7191 21.4661 18.5223 20.8826 18.2875 20.1861L16.4237 14.6579C16.3179 14.3442 16.4303 13.9983 16.7003 13.8067L21.4575 10.4297C22.0568 10.0043 21.75 9.06011 21.0151 9.0682L15.1815 9.13242C14.8505 9.13606 14.5563 8.92228 14.4574 8.60636L12.7158 3.03843Z" fill="white"/>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 1.2 KiB |
|
@ -0,0 +1,6 @@
|
||||||
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M12.1602 8.24439C13.3281 8.16225 14.25 7.18879 14.25 6C14.25 4.75736 13.2426 3.75 12 3.75C10.7574 3.75 9.75 4.75736 9.75 6C9.75 7.18151 10.6607 8.15032 11.8184 8.24278C11.5197 8.21896 11.2375 8.13687 10.9831 8.00775C9.85816 9.83693 8.19346 10.3318 6.74461 10.3424C6.66364 9.17333 5.68961 8.25 4.5 8.25C3.25736 8.25 2.25 9.25736 2.25 10.5C2.25 11.7426 3.25736 12.75 4.5 12.75C5.32135 12.75 6.03995 12.31 6.43279 11.6528C6.39557 11.715 6.35542 11.7754 6.31253 11.8336C6.67901 11.8506 7.06503 11.8447 7.4618 11.805C8.64456 11.6868 9.95784 11.2623 11.0918 10.2228C11.4736 9.87283 11.8205 9.46641 12.1289 9.0006C12.4727 9.47803 12.8468 9.89069 13.2474 10.2432C14.3929 11.2513 15.6592 11.6829 16.8118 11.8042C17.1152 11.8362 17.4101 11.8467 17.6932 11.8412C17.6739 11.8152 17.6551 11.7887 17.6369 11.7619C18.0415 12.3582 18.725 12.75 19.5 12.75C20.7426 12.75 21.75 11.7426 21.75 10.5C21.75 9.25736 20.7426 8.25 19.5 8.25C18.3129 8.25 17.3405 9.16938 17.256 10.335C15.9245 10.2658 14.3912 9.7053 13.1957 7.90649C12.8918 8.09752 12.5389 8.21778 12.1602 8.24439ZM12 6.75C12.4142 6.75 12.75 6.41421 12.75 6C12.75 5.58579 12.4142 5.25 12 5.25C11.5858 5.25 11.25 5.58579 11.25 6C11.25 6.41421 11.5858 6.75 12 6.75ZM20.25 10.5C20.25 10.9142 19.9142 11.25 19.5 11.25C19.0858 11.25 18.75 10.9142 18.75 10.5C18.75 10.0858 19.0858 9.75 19.5 9.75C19.9142 9.75 20.25 10.0858 20.25 10.5ZM4.5 11.25C4.91421 11.25 5.25 10.9142 5.25 10.5C5.25 10.0858 4.91421 9.75 4.5 9.75C4.08579 9.75 3.75 10.0858 3.75 10.5C3.75 10.9142 4.08579 11.25 4.5 11.25Z" fill="white"/>
|
||||||
|
<path d="M17.9485 12.1296C18.3135 12.4773 18.7952 12.7036 19.3289 12.7437L19.2591 12.9706C19.1623 13.2853 18.8715 13.5 18.5423 13.5C18.0377 13.5 17.677 13.0117 17.8254 12.5294L17.9485 12.1296Z" fill="white"/>
|
||||||
|
<path d="M12.75 18.0001C13.1642 18.0001 13.5 18.3359 13.5 18.7501C13.5 19.1643 13.1642 19.5001 12.75 19.5001H7.85792C7.19941 19.5001 6.61791 19.0706 6.42425 18.4412L4.6712 12.7437C5.20487 12.7036 5.6866 12.4773 6.05164 12.1296L7.85792 18.0001H12.75Z" fill="white"/>
|
||||||
|
<path d="M11.25 18.0002C10.8358 18.0002 10.5 18.336 10.5 18.7502C10.5 19.1644 10.8358 19.5002 11.25 19.5002H16.1421C16.8006 19.5002 17.3821 19.0707 17.5757 18.4413L19.3289 12.7437C18.7952 12.7036 18.3135 12.4773 17.9485 12.1296L16.1421 18.0002H11.25Z" fill="white"/>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 2.4 KiB |
|
@ -39,10 +39,13 @@ export { default as IconExclamationSolid } from './exclamation-solid.svg';
|
||||||
export { default as IconExclamationTriangle } from './exclamation-triangle.svg';
|
export { default as IconExclamationTriangle } from './exclamation-triangle.svg';
|
||||||
export { default as IconExitFullscreen } from './exit-fullscreen.svg';
|
export { default as IconExitFullscreen } from './exit-fullscreen.svg';
|
||||||
export { default as IconFaceSmile } from './face-smile.svg';
|
export { default as IconFaceSmile } from './face-smile.svg';
|
||||||
|
export { default as IconFavorite } from './favorite.svg';
|
||||||
|
export { default as IconFavoriteSolid } from './favorite-solid.svg';
|
||||||
export { default as IconFeedback } from './feedback.svg';
|
export { default as IconFeedback } from './feedback.svg';
|
||||||
export { default as IconGear } from './gear.svg';
|
export { default as IconGear } from './gear.svg';
|
||||||
export { default as IconGoogle } from './google.svg';
|
export { default as IconGoogle } from './google.svg';
|
||||||
export { default as IconHangup } from './hangup.svg';
|
export { default as IconHangup } from './hangup.svg';
|
||||||
|
export { default as IconHost } from './host.svg';
|
||||||
export { default as IconHelp } from './help.svg';
|
export { default as IconHelp } from './help.svg';
|
||||||
export { default as IconHighlight } from './highlight.svg';
|
export { default as IconHighlight } from './highlight.svg';
|
||||||
export { default as IconImage } from './image.svg';
|
export { default as IconImage } from './image.svg';
|
||||||
|
@ -81,6 +84,7 @@ export { default as IconSend } from './send.svg';
|
||||||
export { default as IconShare } from './share.svg';
|
export { default as IconShare } from './share.svg';
|
||||||
export { default as IconShareDoc } from './share-doc.svg';
|
export { default as IconShareDoc } from './share-doc.svg';
|
||||||
export { default as IconShortcuts } from './shortcuts.svg';
|
export { default as IconShortcuts } from './shortcuts.svg';
|
||||||
|
export { default as IconSip } from './sip.svg';
|
||||||
export { default as IconSites } from './sites.svg';
|
export { default as IconSites } from './sites.svg';
|
||||||
export { default as IconStop } from './stop.svg';
|
export { default as IconStop } from './stop.svg';
|
||||||
export { default as IconStopScreenshare } from './stop-screenshare.svg';
|
export { default as IconStopScreenshare } from './stop-screenshare.svg';
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
<svg width="20" height="14" viewBox="0 0 20 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M4.41201 1.90767C3.50689 3.37865 5.24438 7.52348 7.36096 9.64007C7.36096 9.64004 7.36175 9.63923 7.36329 9.63765C9.48 11.7541 13.6215 13.4932 15.0923 12.5882C16.1022 11.9668 16.0078 9.51337 15.2427 8.76783C14.7369 8.2749 13.1882 8.01994 12.5497 8.14762C12.3496 8.18763 11.7907 8.76515 11.4793 9.08696C11.4184 9.14994 11.3669 9.20313 11.3295 9.24058C11.1007 9.46937 9.63912 8.22168 9.20588 7.78845L7.60102 9.39838C8.10053 8.89635 9.2057 7.78701 9.2057 7.78701C8.77247 7.35377 7.53081 5.89935 7.7596 5.67056C7.79705 5.63311 7.85024 5.58164 7.91322 5.5207C8.23503 5.20928 8.81255 4.65041 8.85256 4.45033C8.98024 3.81178 8.72528 2.26311 8.23236 1.75727C7.48681 0.992193 5.03342 0.897765 4.41201 1.90767Z" fill="white"/>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 868 B |
|
@ -1,4 +1,4 @@
|
||||||
import React from 'react';
|
import React, { useCallback } from 'react';
|
||||||
import { makeStyles } from 'tss-react/mui';
|
import { makeStyles } from 'tss-react/mui';
|
||||||
|
|
||||||
import Icon from '../../../icons/components/Icon';
|
import Icon from '../../../icons/components/Icon';
|
||||||
|
@ -92,13 +92,27 @@ const Label = ({
|
||||||
}: IProps) => {
|
}: IProps) => {
|
||||||
const { classes, cx } = useStyles();
|
const { classes, cx } = useStyles();
|
||||||
|
|
||||||
|
const onKeyPress = useCallback(event => {
|
||||||
|
if (!onClick) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (event.key === 'Enter' || event.key === ' ') {
|
||||||
|
event.preventDefault();
|
||||||
|
onClick();
|
||||||
|
}
|
||||||
|
}, [ onClick ]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className = { cx(classes.label, onClick && classes.clickable,
|
className = { cx(classes.label, onClick && classes.clickable,
|
||||||
color && classes[color], className
|
color && classes[color], className
|
||||||
) }
|
) }
|
||||||
id = { id }
|
id = { id }
|
||||||
onClick = { onClick }>
|
onClick = { onClick }
|
||||||
|
onKeyPress = { onKeyPress }
|
||||||
|
role = { onClick ? 'button' : undefined }
|
||||||
|
tabIndex = { onClick ? 0 : undefined }>
|
||||||
{icon && <Icon
|
{icon && <Icon
|
||||||
color = { iconColor }
|
color = { iconColor }
|
||||||
size = '16'
|
size = '16'
|
||||||
|
|
|
@ -88,7 +88,11 @@ const _updateLastN = debounce(({ dispatch, getState }: IStore) => {
|
||||||
lastNSelected = 1;
|
lastNSelected = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
dispatch(setLastN(lastNSelected));
|
const { lastN } = state['features/base/lastn'];
|
||||||
|
|
||||||
|
if (lastN !== lastNSelected) {
|
||||||
|
dispatch(setLastN(lastNSelected));
|
||||||
|
}
|
||||||
}, 1000); /* Don't send this more often than once a second. */
|
}, 1000); /* Don't send this more often than once a second. */
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -15,11 +15,15 @@ export type MediaType = 'audio' | 'video' | 'screenshare';
|
||||||
*
|
*
|
||||||
* @enum {string}
|
* @enum {string}
|
||||||
*/
|
*/
|
||||||
export const MEDIA_TYPE: { [key: string]: MediaType; } = {
|
export const MEDIA_TYPE: {
|
||||||
AUDIO: 'audio',
|
AUDIO: MediaType;
|
||||||
SCREENSHARE: 'screenshare',
|
SCREENSHARE: MediaType;
|
||||||
VIDEO: 'video'
|
VIDEO: MediaType;
|
||||||
};
|
} = {
|
||||||
|
AUDIO: 'audio',
|
||||||
|
SCREENSHARE: 'screenshare',
|
||||||
|
VIDEO: 'video'
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/* eslint-disable no-bitwise */
|
/* eslint-disable no-bitwise */
|
||||||
|
|
|
@ -601,7 +601,7 @@ export function getDominantSpeakerParticipant(stateful: IStateful) {
|
||||||
export function isEveryoneModerator(stateful: IStateful) {
|
export function isEveryoneModerator(stateful: IStateful) {
|
||||||
const state = toState(stateful)['features/base/participants'];
|
const state = toState(stateful)['features/base/participants'];
|
||||||
|
|
||||||
return state.everyoneIsModerator === true;
|
return state.numberOfNonModeratorParticipants === 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -429,11 +429,12 @@ StateListenerRegistry.register(
|
||||||
'e2ee.enabled': (participant: IJitsiParticipant, value: string) =>
|
'e2ee.enabled': (participant: IJitsiParticipant, value: string) =>
|
||||||
_e2eeUpdated(store, conference, participant.getId(), value),
|
_e2eeUpdated(store, conference, participant.getId(), value),
|
||||||
'features_e2ee': (participant: IJitsiParticipant, value: boolean) =>
|
'features_e2ee': (participant: IJitsiParticipant, value: boolean) =>
|
||||||
store.dispatch(participantUpdated({
|
getParticipantById(store.getState(), participant.getId())?.e2eeSupported !== value
|
||||||
conference,
|
&& store.dispatch(participantUpdated({
|
||||||
id: participant.getId(),
|
conference,
|
||||||
e2eeSupported: value
|
id: participant.getId(),
|
||||||
})),
|
e2eeSupported: value
|
||||||
|
})),
|
||||||
'features_jigasi': (participant: IJitsiParticipant, value: boolean) =>
|
'features_jigasi': (participant: IJitsiParticipant, value: boolean) =>
|
||||||
store.dispatch(participantUpdated({
|
store.dispatch(participantUpdated({
|
||||||
conference,
|
conference,
|
||||||
|
@ -506,7 +507,12 @@ StateListenerRegistry.register(
|
||||||
function _e2eeUpdated({ getState, dispatch }: IStore, conference: IJitsiConference,
|
function _e2eeUpdated({ getState, dispatch }: IStore, conference: IJitsiConference,
|
||||||
participantId: string, newValue: string | boolean) {
|
participantId: string, newValue: string | boolean) {
|
||||||
const e2eeEnabled = newValue === 'true';
|
const e2eeEnabled = newValue === 'true';
|
||||||
const { e2ee = {} } = getState()['features/base/config'];
|
const state = getState();
|
||||||
|
const { e2ee = {} } = state['features/base/config'];
|
||||||
|
|
||||||
|
if (e2eeEnabled === getParticipantById(state, participantId)?.e2eeEnabled) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
dispatch(participantUpdated({
|
dispatch(participantUpdated({
|
||||||
conference,
|
conference,
|
||||||
|
@ -641,7 +647,6 @@ function _participantJoinedOrUpdated(store: IStore, next: Function, action: any)
|
||||||
// Send an external update of the local participant's raised hand state
|
// Send an external update of the local participant's raised hand state
|
||||||
// if a new raised hand state is defined in the action.
|
// if a new raised hand state is defined in the action.
|
||||||
if (typeof raisedHandTimestamp !== 'undefined') {
|
if (typeof raisedHandTimestamp !== 'undefined') {
|
||||||
|
|
||||||
if (local) {
|
if (local) {
|
||||||
const { conference } = getState()['features/base/conference'];
|
const { conference } = getState()['features/base/conference'];
|
||||||
const rHand = parseInt(raisedHandTimestamp, 10);
|
const rHand = parseInt(raisedHandTimestamp, 10);
|
||||||
|
@ -691,14 +696,6 @@ function _participantJoinedOrUpdated(store: IStore, next: Function, action: any)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Notify external listeners of potential avatarURL changes.
|
|
||||||
if (typeof APP === 'object') {
|
|
||||||
const currentKnownId = local ? APP.conference.getMyUserId() : id;
|
|
||||||
|
|
||||||
// Force update of local video getting a new id.
|
|
||||||
APP.UI.refreshAvatarDisplay(currentKnownId);
|
|
||||||
}
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -63,10 +63,12 @@ const PARTICIPANT_PROPS_TO_OMIT_WHEN_UPDATE = [
|
||||||
|
|
||||||
const DEFAULT_STATE = {
|
const DEFAULT_STATE = {
|
||||||
dominantSpeaker: undefined,
|
dominantSpeaker: undefined,
|
||||||
everyoneIsModerator: false,
|
|
||||||
fakeParticipants: new Map(),
|
fakeParticipants: new Map(),
|
||||||
local: undefined,
|
local: undefined,
|
||||||
localScreenShare: undefined,
|
localScreenShare: undefined,
|
||||||
|
numberOfNonModeratorParticipants: 0,
|
||||||
|
numberOfParticipantsDisabledE2EE: 0,
|
||||||
|
numberOfParticipantsNotSupportingE2EE: 0,
|
||||||
overwrittenNameList: {},
|
overwrittenNameList: {},
|
||||||
pinnedParticipant: undefined,
|
pinnedParticipant: undefined,
|
||||||
raisedHandsQueue: [],
|
raisedHandsQueue: [],
|
||||||
|
@ -79,10 +81,12 @@ const DEFAULT_STATE = {
|
||||||
|
|
||||||
export interface IParticipantsState {
|
export interface IParticipantsState {
|
||||||
dominantSpeaker?: string;
|
dominantSpeaker?: string;
|
||||||
everyoneIsModerator: boolean;
|
|
||||||
fakeParticipants: Map<string, IParticipant>;
|
fakeParticipants: Map<string, IParticipant>;
|
||||||
local?: ILocalParticipant;
|
local?: ILocalParticipant;
|
||||||
localScreenShare?: IParticipant;
|
localScreenShare?: IParticipant;
|
||||||
|
numberOfNonModeratorParticipants: number;
|
||||||
|
numberOfParticipantsDisabledE2EE: number;
|
||||||
|
numberOfParticipantsNotSupportingE2EE: number;
|
||||||
overwrittenNameList: { [id: string]: string; };
|
overwrittenNameList: { [id: string]: string; };
|
||||||
pinnedParticipant?: string;
|
pinnedParticipant?: string;
|
||||||
raisedHandsQueue: Array<{ id: string; raisedHandTimestamp: number; }>;
|
raisedHandsQueue: Array<{ id: string; raisedHandTimestamp: number; }>;
|
||||||
|
@ -200,23 +204,30 @@ ReducerRegistry.register<IParticipantsState>('features/base/participants',
|
||||||
}
|
}
|
||||||
|
|
||||||
let newParticipant: IParticipant | null = null;
|
let newParticipant: IParticipant | null = null;
|
||||||
|
const oldParticipant = local || state.local?.id === id ? state.local : state.remote.get(id);
|
||||||
|
|
||||||
if (state.remote.has(id)) {
|
if (state.remote.has(id)) {
|
||||||
newParticipant = _participant(state.remote.get(id), action);
|
newParticipant = _participant(oldParticipant, action);
|
||||||
state.remote.set(id, newParticipant);
|
state.remote.set(id, newParticipant);
|
||||||
} else if (id === state.local?.id) {
|
} else if (id === state.local?.id) {
|
||||||
newParticipant = state.local = _participant(state.local, action);
|
newParticipant = state.local = _participant(state.local, action);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (newParticipant) {
|
if (oldParticipant && newParticipant && !newParticipant.fakeParticipant) {
|
||||||
|
|
||||||
// everyoneIsModerator calculation:
|
|
||||||
const isModerator = isParticipantModerator(newParticipant);
|
const isModerator = isParticipantModerator(newParticipant);
|
||||||
|
|
||||||
if (state.everyoneIsModerator && !isModerator) {
|
if (isParticipantModerator(oldParticipant) !== isModerator) {
|
||||||
state.everyoneIsModerator = false;
|
state.numberOfNonModeratorParticipants += isModerator ? -1 : 1;
|
||||||
} else if (!state.everyoneIsModerator && isModerator) {
|
}
|
||||||
state.everyoneIsModerator = _isEveryoneModerator(state);
|
|
||||||
|
const e2eeEnabled = Boolean(newParticipant.e2eeEnabled);
|
||||||
|
const e2eeSupported = Boolean(newParticipant.e2eeSupported);
|
||||||
|
|
||||||
|
if (Boolean(oldParticipant.e2eeEnabled) !== e2eeEnabled) {
|
||||||
|
state.numberOfParticipantsDisabledE2EE += e2eeEnabled ? -1 : 1;
|
||||||
|
}
|
||||||
|
if (!local && Boolean(oldParticipant.e2eeSupported) !== e2eeSupported) {
|
||||||
|
state.numberOfParticipantsNotSupportingE2EE += e2eeSupported ? -1 : 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -267,13 +278,22 @@ ReducerRegistry.register<IParticipantsState>('features/base/participants',
|
||||||
state.dominantSpeaker = id;
|
state.dominantSpeaker = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
const isModerator = isParticipantModerator(participant);
|
if (!fakeParticipant) {
|
||||||
const { local, remote } = state;
|
const isModerator = isParticipantModerator(participant);
|
||||||
|
|
||||||
if (state.everyoneIsModerator && !isModerator) {
|
if (!isModerator) {
|
||||||
state.everyoneIsModerator = false;
|
state.numberOfNonModeratorParticipants += 1;
|
||||||
} else if (!local && remote.size === 0 && isModerator) {
|
}
|
||||||
state.everyoneIsModerator = true;
|
|
||||||
|
const { e2eeEnabled, e2eeSupported } = participant as IParticipant;
|
||||||
|
|
||||||
|
if (!e2eeEnabled) {
|
||||||
|
state.numberOfParticipantsDisabledE2EE += 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!participant.local && !e2eeSupported) {
|
||||||
|
state.numberOfParticipantsNotSupportingE2EE += 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (participant.local) {
|
if (participant.local) {
|
||||||
|
@ -349,6 +369,7 @@ ReducerRegistry.register<IParticipantsState>('features/base/participants',
|
||||||
pinnedParticipant
|
pinnedParticipant
|
||||||
} = state;
|
} = state;
|
||||||
let oldParticipant = remote.get(id);
|
let oldParticipant = remote.get(id);
|
||||||
|
let isLocalScreenShare = false;
|
||||||
|
|
||||||
if (oldParticipant?.sources?.size) {
|
if (oldParticipant?.sources?.size) {
|
||||||
const videoSources: Map<string, ISourceInfo> | undefined = oldParticipant.sources.get(MEDIA_TYPE.VIDEO);
|
const videoSources: Map<string, ISourceInfo> | undefined = oldParticipant.sources.get(MEDIA_TYPE.VIDEO);
|
||||||
|
@ -373,6 +394,7 @@ ReducerRegistry.register<IParticipantsState>('features/base/participants',
|
||||||
oldParticipant = state.local;
|
oldParticipant = state.local;
|
||||||
delete state.local;
|
delete state.local;
|
||||||
} else if (localScreenShare?.id === id) {
|
} else if (localScreenShare?.id === id) {
|
||||||
|
isLocalScreenShare = true;
|
||||||
oldParticipant = state.local;
|
oldParticipant = state.local;
|
||||||
delete state.localScreenShare;
|
delete state.localScreenShare;
|
||||||
} else {
|
} else {
|
||||||
|
@ -383,10 +405,6 @@ ReducerRegistry.register<IParticipantsState>('features/base/participants',
|
||||||
state.sortedRemoteParticipants.delete(id);
|
state.sortedRemoteParticipants.delete(id);
|
||||||
state.raisedHandsQueue = state.raisedHandsQueue.filter(pid => pid.id !== id);
|
state.raisedHandsQueue = state.raisedHandsQueue.filter(pid => pid.id !== id);
|
||||||
|
|
||||||
if (!state.everyoneIsModerator && !isParticipantModerator(oldParticipant)) {
|
|
||||||
state.everyoneIsModerator = _isEveryoneModerator(state);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (dominantSpeaker === id) {
|
if (dominantSpeaker === id) {
|
||||||
state.dominantSpeaker = undefined;
|
state.dominantSpeaker = undefined;
|
||||||
}
|
}
|
||||||
|
@ -407,6 +425,22 @@ ReducerRegistry.register<IParticipantsState>('features/base/participants',
|
||||||
state.sortedRemoteVirtualScreenshareParticipants = new Map(sortedRemoteVirtualScreenshareParticipants);
|
state.sortedRemoteVirtualScreenshareParticipants = new Map(sortedRemoteVirtualScreenshareParticipants);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (oldParticipant && !oldParticipant.fakeParticipant && !isLocalScreenShare) {
|
||||||
|
const { e2eeEnabled, e2eeSupported } = oldParticipant;
|
||||||
|
|
||||||
|
if (!isParticipantModerator(oldParticipant)) {
|
||||||
|
state.numberOfNonModeratorParticipants -= 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!e2eeEnabled) {
|
||||||
|
state.numberOfParticipantsDisabledE2EE -= 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!oldParticipant.local && !e2eeSupported) {
|
||||||
|
state.numberOfParticipantsNotSupportingE2EE -= 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return { ...state };
|
return { ...state };
|
||||||
}
|
}
|
||||||
case PARTICIPANT_SOURCES_UPDATED: {
|
case PARTICIPANT_SOURCES_UPDATED: {
|
||||||
|
@ -465,27 +499,6 @@ function _getDisplayName(state: Object, name?: string): string {
|
||||||
return name ?? (config?.defaultRemoteDisplayName || 'Fellow Jitster');
|
return name ?? (config?.defaultRemoteDisplayName || 'Fellow Jitster');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Loops through the participants in the state in order to check if all participants are moderators.
|
|
||||||
*
|
|
||||||
* @param {Object} state - The local participant redux state.
|
|
||||||
* @returns {boolean}
|
|
||||||
*/
|
|
||||||
function _isEveryoneModerator(state: IParticipantsState) {
|
|
||||||
if (isParticipantModerator(state.local)) {
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
||||||
for (const [ k, p ] of state.remote) {
|
|
||||||
if (!isParticipantModerator(p)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reducer function for a single participant.
|
* Reducer function for a single participant.
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import React, { Component, ReactNode } from 'react';
|
import React, { Component, ReactNode } from 'react';
|
||||||
|
import ReactFocusLock from 'react-focus-lock';
|
||||||
|
|
||||||
import { IReduxState } from '../../../app/types';
|
import { IReduxState } from '../../../app/types';
|
||||||
import DialogPortal from '../../../toolbox/components/web/DialogPortal';
|
import DialogPortal from '../../../toolbox/components/web/DialogPortal';
|
||||||
|
@ -34,6 +35,18 @@ interface IProps {
|
||||||
*/
|
*/
|
||||||
disablePopover?: boolean;
|
disablePopover?: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The id of the dom element acting as the Popover label (matches aria-labelledby).
|
||||||
|
*/
|
||||||
|
headingId?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* String acting as the Popover label (matches aria-label).
|
||||||
|
*
|
||||||
|
* If headingId is set, this will not be used.
|
||||||
|
*/
|
||||||
|
headingLabel?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An id attribute to apply to the root of the {@code Popover}
|
* An id attribute to apply to the root of the {@code Popover}
|
||||||
* component.
|
* component.
|
||||||
|
@ -186,7 +199,16 @@ class Popover extends Component<IProps, IState> {
|
||||||
* @returns {ReactElement}
|
* @returns {ReactElement}
|
||||||
*/
|
*/
|
||||||
render() {
|
render() {
|
||||||
const { children, className, content, id, overflowDrawer, visible, trigger } = this.props;
|
const { children,
|
||||||
|
className,
|
||||||
|
content,
|
||||||
|
headingId,
|
||||||
|
headingLabel,
|
||||||
|
id,
|
||||||
|
overflowDrawer,
|
||||||
|
visible,
|
||||||
|
trigger
|
||||||
|
} = this.props;
|
||||||
|
|
||||||
if (overflowDrawer) {
|
if (overflowDrawer) {
|
||||||
return (
|
return (
|
||||||
|
@ -197,6 +219,7 @@ class Popover extends Component<IProps, IState> {
|
||||||
{ children }
|
{ children }
|
||||||
<JitsiPortal>
|
<JitsiPortal>
|
||||||
<Drawer
|
<Drawer
|
||||||
|
headingId = { headingId }
|
||||||
isOpen = { visible }
|
isOpen = { visible }
|
||||||
onClose = { this._onHideDialog }>
|
onClose = { this._onHideDialog }>
|
||||||
{ content }
|
{ content }
|
||||||
|
@ -214,7 +237,8 @@ class Popover extends Component<IProps, IState> {
|
||||||
onKeyPress = { this._onKeyPress }
|
onKeyPress = { this._onKeyPress }
|
||||||
{ ...(trigger === 'hover' ? {
|
{ ...(trigger === 'hover' ? {
|
||||||
onMouseEnter: this._onShowDialog,
|
onMouseEnter: this._onShowDialog,
|
||||||
onMouseLeave: this._onHideDialog
|
onMouseLeave: this._onHideDialog,
|
||||||
|
tabIndex: 0
|
||||||
} : {}) }
|
} : {}) }
|
||||||
ref = { this._containerRef }>
|
ref = { this._containerRef }>
|
||||||
{ visible && (
|
{ visible && (
|
||||||
|
@ -222,7 +246,16 @@ class Popover extends Component<IProps, IState> {
|
||||||
getRef = { this._setContextMenuRef }
|
getRef = { this._setContextMenuRef }
|
||||||
setSize = { this._setContextMenuStyle }
|
setSize = { this._setContextMenuStyle }
|
||||||
style = { this.state.contextMenuStyle }>
|
style = { this.state.contextMenuStyle }>
|
||||||
{this._renderContent()}
|
<ReactFocusLock
|
||||||
|
lockProps = {{
|
||||||
|
role: 'dialog',
|
||||||
|
'aria-modal': true,
|
||||||
|
'aria-labelledby': headingId,
|
||||||
|
'aria-label': !headingId && headingLabel ? headingLabel : undefined
|
||||||
|
}}
|
||||||
|
returnFocus = { true }>
|
||||||
|
{this._renderContent()}
|
||||||
|
</ReactFocusLock>
|
||||||
</DialogPortal>
|
</DialogPortal>
|
||||||
)}
|
)}
|
||||||
{ children }
|
{ children }
|
||||||
|
|
|
@ -105,18 +105,14 @@ class MeetingsList extends Component<Props> {
|
||||||
* @returns {React.ReactNode}
|
* @returns {React.ReactNode}
|
||||||
*/
|
*/
|
||||||
render() {
|
render() {
|
||||||
const { listEmptyComponent, meetings, t } = this.props;
|
const { listEmptyComponent, meetings } = this.props;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If there are no recent meetings we don't want to display anything.
|
* If there are no recent meetings we don't want to display anything.
|
||||||
*/
|
*/
|
||||||
if (meetings) {
|
if (meetings) {
|
||||||
return (
|
return (
|
||||||
<Container
|
<Container className = 'meetings-list'>
|
||||||
aria-label = { t('welcomepage.recentList') }
|
|
||||||
className = 'meetings-list'
|
|
||||||
role = 'menu'
|
|
||||||
tabIndex = '-1'>
|
|
||||||
{
|
{
|
||||||
meetings.length === 0
|
meetings.length === 0
|
||||||
? listEmptyComponent
|
? listEmptyComponent
|
||||||
|
@ -238,23 +234,16 @@ class MeetingsList extends Component<Props> {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Container
|
<Container
|
||||||
aria-label = { title }
|
|
||||||
className = { rootClassName }
|
className = { rootClassName }
|
||||||
key = { index }
|
key = { index }
|
||||||
onClick = { onPress }
|
onClick = { onPress }>
|
||||||
onKeyPress = { onKeyPress }
|
|
||||||
role = 'menuitem'
|
|
||||||
tabIndex = { 0 }>
|
|
||||||
<Container className = 'left-column'>
|
|
||||||
<Text className = 'title'>
|
|
||||||
{ _toDateString(date) }
|
|
||||||
</Text>
|
|
||||||
<Text className = 'subtitle'>
|
|
||||||
{ _toTimeString(time) }
|
|
||||||
</Text>
|
|
||||||
</Container>
|
|
||||||
<Container className = 'right-column'>
|
<Container className = 'right-column'>
|
||||||
<Text className = 'title'>
|
<Text
|
||||||
|
className = 'title'
|
||||||
|
onClick = { onPress }
|
||||||
|
onKeyPress = { onKeyPress }
|
||||||
|
role = 'button'
|
||||||
|
tabIndex = { 0 }>
|
||||||
{ title }
|
{ title }
|
||||||
</Text>
|
</Text>
|
||||||
{
|
{
|
||||||
|
@ -270,6 +259,14 @@ class MeetingsList extends Component<Props> {
|
||||||
</Text>) : null
|
</Text>) : null
|
||||||
}
|
}
|
||||||
</Container>
|
</Container>
|
||||||
|
<Container className = 'left-column'>
|
||||||
|
<Text className = 'title'>
|
||||||
|
{ _toDateString(date) }
|
||||||
|
</Text>
|
||||||
|
<Text className = 'subtitle'>
|
||||||
|
{ _toTimeString(time) }
|
||||||
|
</Text>
|
||||||
|
</Container>
|
||||||
<Container className = 'actions'>
|
<Container className = 'actions'>
|
||||||
{ elementAfter || null }
|
{ elementAfter || null }
|
||||||
|
|
||||||
|
|
|
@ -84,7 +84,7 @@ export default class ToolboxItem extends AbstractToolboxItem<Props> {
|
||||||
onKeyDown: disabled ? undefined : onKeyDown,
|
onKeyDown: disabled ? undefined : onKeyDown,
|
||||||
onKeyPress: this._onKeyPress,
|
onKeyPress: this._onKeyPress,
|
||||||
tabIndex: 0,
|
tabIndex: 0,
|
||||||
role: showLabel ? 'menuitem' : 'button'
|
role: 'button'
|
||||||
};
|
};
|
||||||
|
|
||||||
const elementType = showLabel ? 'li' : 'div';
|
const elementType = showLabel ? 'li' : 'div';
|
||||||
|
|
|
@ -123,7 +123,7 @@ class OverflowMenuItem extends Component<Props> {
|
||||||
className = { className }
|
className = { className }
|
||||||
onClick = { disabled ? null : onClick }
|
onClick = { disabled ? null : onClick }
|
||||||
onKeyPress = { this._onKeyPress }
|
onKeyPress = { this._onKeyPress }
|
||||||
role = 'menuitem'
|
role = 'button'
|
||||||
tabIndex = { 0 }>
|
tabIndex = { 0 }>
|
||||||
<span className = 'overflow-menu-item-icon'>
|
<span className = 'overflow-menu-item-icon'>
|
||||||
<Icon
|
<Icon
|
||||||
|
|
|
@ -121,6 +121,7 @@ export default function ToolboxButtonWithIconPopup(props: Props) {
|
||||||
<div className = 'settings-button-small-icon-container'>
|
<div className = 'settings-button-small-icon-container'>
|
||||||
<Popover
|
<Popover
|
||||||
content = { popoverContent }
|
content = { popoverContent }
|
||||||
|
headingLabel = { ariaLabel }
|
||||||
onPopoverClose = { onPopoverClose }
|
onPopoverClose = { onPopoverClose }
|
||||||
onPopoverOpen = { onPopoverOpen }
|
onPopoverOpen = { onPopoverOpen }
|
||||||
position = 'top'
|
position = 'top'
|
||||||
|
|
|
@ -65,7 +65,7 @@ export default class ToolboxItem extends AbstractToolboxItem<Props> {
|
||||||
onClick: disabled ? undefined : onClick,
|
onClick: disabled ? undefined : onClick,
|
||||||
onKeyPress: this._onKeyPress,
|
onKeyPress: this._onKeyPress,
|
||||||
tabIndex: 0,
|
tabIndex: 0,
|
||||||
role: showLabel ? 'menuitem' : 'button'
|
role: 'button'
|
||||||
};
|
};
|
||||||
|
|
||||||
const elementType = showLabel ? 'li' : 'div';
|
const elementType = showLabel ? 'li' : 'div';
|
||||||
|
|
|
@ -182,7 +182,9 @@ const BaseDialog = ({
|
||||||
<div
|
<div
|
||||||
className = { classes.backdrop }
|
className = { classes.backdrop }
|
||||||
onClick = { onBackdropClick } />
|
onClick = { onBackdropClick } />
|
||||||
<FocusLock className = { classes.focusLock }>
|
<FocusLock
|
||||||
|
className = { classes.focusLock }
|
||||||
|
returnFocus = { true }>
|
||||||
<div
|
<div
|
||||||
aria-describedby = { description }
|
aria-describedby = { description }
|
||||||
aria-labelledby = { title ?? t(titleKey ?? '') }
|
aria-labelledby = { title ?? t(titleKey ?? '') }
|
||||||
|
|
|
@ -69,7 +69,7 @@ const useStyles = makeStyles()(theme => {
|
||||||
backgroundColor: theme.palette.action01Active
|
backgroundColor: theme.palette.action01Active
|
||||||
},
|
},
|
||||||
|
|
||||||
'&:focus': {
|
'&.focus-visible': {
|
||||||
outline: 0,
|
outline: 0,
|
||||||
boxShadow: `0px 0px 0px 2px ${theme.palette.focus01}`
|
boxShadow: `0px 0px 0px 2px ${theme.palette.focus01}`
|
||||||
},
|
},
|
||||||
|
|
|
@ -53,6 +53,10 @@ const useStyles = makeStyles()(theme => {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
disabled: {
|
||||||
|
cursor: 'not-allowed'
|
||||||
|
},
|
||||||
|
|
||||||
activeArea: {
|
activeArea: {
|
||||||
display: 'grid',
|
display: 'grid',
|
||||||
placeContent: 'center',
|
placeContent: 'center',
|
||||||
|
@ -73,7 +77,6 @@ const useStyles = makeStyles()(theme => {
|
||||||
height: '18px',
|
height: '18px',
|
||||||
border: `2px solid ${theme.palette.icon03}`,
|
border: `2px solid ${theme.palette.icon03}`,
|
||||||
borderRadius: '3px',
|
borderRadius: '3px',
|
||||||
cursor: 'pointer',
|
|
||||||
|
|
||||||
display: 'grid',
|
display: 'grid',
|
||||||
placeContent: 'center',
|
placeContent: 'center',
|
||||||
|
@ -154,7 +157,7 @@ const Checkbox = ({
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className = { cx(styles.formControl, isMobile && 'is-mobile', className) }>
|
<div className = { cx(styles.formControl, isMobile && 'is-mobile', className) }>
|
||||||
<label className = { cx(styles.activeArea, isMobile && 'is-mobile') }>
|
<label className = { cx(styles.activeArea, isMobile && 'is-mobile', disabled && styles.disabled) }>
|
||||||
<input
|
<input
|
||||||
checked = { checked }
|
checked = { checked }
|
||||||
disabled = { disabled }
|
disabled = { disabled }
|
||||||
|
|
|
@ -25,7 +25,7 @@ const useStyles = makeStyles()(theme => {
|
||||||
backgroundColor: theme.palette.ui02
|
backgroundColor: theme.palette.ui02
|
||||||
},
|
},
|
||||||
|
|
||||||
'&:focus': {
|
'&.focus-visible': {
|
||||||
outline: 0,
|
outline: 0,
|
||||||
boxShadow: `0px 0px 0px 2px ${theme.palette.focus01}`
|
boxShadow: `0px 0px 0px 2px ${theme.palette.focus01}`
|
||||||
},
|
},
|
||||||
|
|
|
@ -262,7 +262,7 @@ const ContextMenu = ({
|
||||||
onMouseEnter = { onMouseEnter }
|
onMouseEnter = { onMouseEnter }
|
||||||
onMouseLeave = { onMouseLeave }
|
onMouseLeave = { onMouseLeave }
|
||||||
ref = { containerRef }
|
ref = { containerRef }
|
||||||
role = { role ?? 'menu' }
|
role = { role }
|
||||||
tabIndex = { tabIndex }>
|
tabIndex = { tabIndex }>
|
||||||
{children}
|
{children}
|
||||||
</div>;
|
</div>;
|
||||||
|
|
|
@ -5,6 +5,9 @@ import { makeStyles } from 'tss-react/mui';
|
||||||
import { showOverflowDrawer } from '../../../../toolbox/functions.web';
|
import { showOverflowDrawer } from '../../../../toolbox/functions.web';
|
||||||
import Icon from '../../../icons/components/Icon';
|
import Icon from '../../../icons/components/Icon';
|
||||||
import { withPixelLineHeight } from '../../../styles/functions.web';
|
import { withPixelLineHeight } from '../../../styles/functions.web';
|
||||||
|
import { TEXT_OVERFLOW_TYPES } from '../../constants.any';
|
||||||
|
|
||||||
|
import TextWithOverflow from './TextWithOverflow';
|
||||||
|
|
||||||
export interface IProps {
|
export interface IProps {
|
||||||
|
|
||||||
|
@ -23,6 +26,13 @@ export interface IProps {
|
||||||
*/
|
*/
|
||||||
className?: string;
|
className?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Id of dom element controlled by this item. Matches aria-controls.
|
||||||
|
* Useful if you need this item as a tab element.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
controls?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Custom icon. If used, the icon prop is ignored.
|
* Custom icon. If used, the icon prop is ignored.
|
||||||
* Used to allow custom children instead of just the default icons.
|
* Used to allow custom children instead of just the default icons.
|
||||||
|
@ -52,13 +62,23 @@ export interface IProps {
|
||||||
/**
|
/**
|
||||||
* Keydown handler.
|
* Keydown handler.
|
||||||
*/
|
*/
|
||||||
onKeyDown?: (e?: React.KeyboardEvent) => void;
|
onKeyDown?: (e: React.KeyboardEvent<HTMLDivElement>) => void;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Keypress handler.
|
* Keypress handler.
|
||||||
*/
|
*/
|
||||||
onKeyPress?: (e?: React.KeyboardEvent) => void;
|
onKeyPress?: (e?: React.KeyboardEvent) => void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Overflow type for item text.
|
||||||
|
*/
|
||||||
|
overflowType?: TEXT_OVERFLOW_TYPES;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* You can use this item as a tab. Defaults to button if not set.
|
||||||
|
*/
|
||||||
|
role?: 'tab' | 'button';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether the item is marked as selected.
|
* Whether the item is marked as selected.
|
||||||
*/
|
*/
|
||||||
|
@ -102,7 +122,7 @@ const useStyles = makeStyles()(theme => {
|
||||||
backgroundColor: theme.palette.ui03
|
backgroundColor: theme.palette.ui03
|
||||||
},
|
},
|
||||||
|
|
||||||
'&:focus': {
|
'&.focus-visible': {
|
||||||
boxShadow: `inset 0 0 0 2px ${theme.palette.action01Hover}`
|
boxShadow: `inset 0 0 0 2px ${theme.palette.action01Hover}`
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -142,6 +162,7 @@ const ContextMenuItem = ({
|
||||||
accessibilityLabel,
|
accessibilityLabel,
|
||||||
children,
|
children,
|
||||||
className,
|
className,
|
||||||
|
controls,
|
||||||
customIcon,
|
customIcon,
|
||||||
disabled,
|
disabled,
|
||||||
id,
|
id,
|
||||||
|
@ -149,6 +170,8 @@ const ContextMenuItem = ({
|
||||||
onClick,
|
onClick,
|
||||||
onKeyDown,
|
onKeyDown,
|
||||||
onKeyPress,
|
onKeyPress,
|
||||||
|
overflowType,
|
||||||
|
role = 'button',
|
||||||
selected,
|
selected,
|
||||||
testId,
|
testId,
|
||||||
text,
|
text,
|
||||||
|
@ -158,8 +181,10 @@ const ContextMenuItem = ({
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
|
aria-controls = { controls }
|
||||||
aria-disabled = { disabled }
|
aria-disabled = { disabled }
|
||||||
aria-label = { accessibilityLabel }
|
aria-label = { accessibilityLabel }
|
||||||
|
aria-selected = { role === 'tab' ? selected : undefined }
|
||||||
className = { cx(styles.contextMenuItem,
|
className = { cx(styles.contextMenuItem,
|
||||||
_overflowDrawer && styles.contextMenuItemDrawer,
|
_overflowDrawer && styles.contextMenuItemDrawer,
|
||||||
disabled && styles.contextMenuItemDisabled,
|
disabled && styles.contextMenuItemDisabled,
|
||||||
|
@ -172,19 +197,24 @@ const ContextMenuItem = ({
|
||||||
onClick = { disabled ? undefined : onClick }
|
onClick = { disabled ? undefined : onClick }
|
||||||
onKeyDown = { disabled ? undefined : onKeyDown }
|
onKeyDown = { disabled ? undefined : onKeyDown }
|
||||||
onKeyPress = { disabled ? undefined : onKeyPress }
|
onKeyPress = { disabled ? undefined : onKeyPress }
|
||||||
role = 'menuitem'>
|
role = { role }
|
||||||
|
tabIndex = { role === 'tab'
|
||||||
|
? selected ? 0 : -1
|
||||||
|
: disabled ? undefined : 0
|
||||||
|
}>
|
||||||
{customIcon ? customIcon
|
{customIcon ? customIcon
|
||||||
: icon && <Icon
|
: icon && <Icon
|
||||||
className = { styles.contextMenuItemIcon }
|
className = { styles.contextMenuItemIcon }
|
||||||
size = { 20 }
|
size = { 20 }
|
||||||
src = { icon } />}
|
src = { icon } />}
|
||||||
{text && (
|
{text && (
|
||||||
<span
|
<TextWithOverflow
|
||||||
className = { cx(styles.text,
|
className = { cx(styles.text,
|
||||||
_overflowDrawer && styles.drawerText,
|
_overflowDrawer && styles.drawerText,
|
||||||
textClassName) }>
|
textClassName) }
|
||||||
|
overflowType = { overflowType } >
|
||||||
{text}
|
{text}
|
||||||
</span>
|
</TextWithOverflow>
|
||||||
)}
|
)}
|
||||||
{children}
|
{children}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -23,12 +23,6 @@ const useStyles = makeStyles()(theme => {
|
||||||
justifyContent: 'space-between'
|
justifyContent: 'space-between'
|
||||||
},
|
},
|
||||||
|
|
||||||
closeIcon: {
|
|
||||||
'&:focus': {
|
|
||||||
boxShadow: 'none'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
title: {
|
title: {
|
||||||
color: theme.palette.text01,
|
color: theme.palette.text01,
|
||||||
...withPixelLineHeight(theme.typography.heading5),
|
...withPixelLineHeight(theme.typography.heading5),
|
||||||
|
@ -137,8 +131,7 @@ const Dialog = ({
|
||||||
</p>
|
</p>
|
||||||
{!hideCloseButton && (
|
{!hideCloseButton && (
|
||||||
<ClickableIcon
|
<ClickableIcon
|
||||||
accessibilityLabel = { t('dialog.close') }
|
accessibilityLabel = { t('dialog.accessibilityLabel.close') }
|
||||||
className = { classes.closeIcon }
|
|
||||||
icon = { IconCloseLarge }
|
icon = { IconCloseLarge }
|
||||||
id = 'modal-header-close-button'
|
id = 'modal-header-close-button'
|
||||||
onClick = { onClose } />
|
onClick = { onClose } />
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import React, { ComponentType, useCallback, useEffect, useMemo, useState } from 'react';
|
import React, { ComponentType, useCallback, useEffect, useMemo, useState } from 'react';
|
||||||
|
import { MoveFocusInside } from 'react-focus-lock';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { useDispatch, useSelector } from 'react-redux';
|
import { useDispatch, useSelector } from 'react-redux';
|
||||||
import { makeStyles } from 'tss-react/mui';
|
import { makeStyles } from 'tss-react/mui';
|
||||||
|
@ -105,6 +106,7 @@ const useStyles = makeStyles()(theme => {
|
||||||
|
|
||||||
backContainer: {
|
backContainer: {
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
|
flexDirection: 'row-reverse',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
|
|
||||||
'& > button': {
|
'& > button': {
|
||||||
|
@ -112,12 +114,6 @@ const useStyles = makeStyles()(theme => {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
closeIcon: {
|
|
||||||
'&:focus': {
|
|
||||||
boxShadow: 'none'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
content: {
|
content: {
|
||||||
flexGrow: 1,
|
flexGrow: 1,
|
||||||
overflowY: 'auto',
|
overflowY: 'auto',
|
||||||
|
@ -129,8 +125,14 @@ const useStyles = makeStyles()(theme => {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
header: {
|
||||||
|
order: -1,
|
||||||
|
paddingBottom: theme.spacing(4)
|
||||||
|
},
|
||||||
|
|
||||||
footer: {
|
footer: {
|
||||||
justifyContent: 'flex-end',
|
justifyContent: 'flex-end',
|
||||||
|
paddingTop: theme.spacing(4),
|
||||||
|
|
||||||
'& button:last-child': {
|
'& button:last-child': {
|
||||||
marginLeft: '16px'
|
marginLeft: '16px'
|
||||||
|
@ -143,20 +145,21 @@ interface IObject {
|
||||||
[key: string]: string | string[] | boolean | number | number[] | {} | undefined;
|
[key: string]: string | string[] | boolean | number | number[] | {} | undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IDialogTab {
|
export interface IDialogTab<P> {
|
||||||
|
cancel?: Function;
|
||||||
className?: string;
|
className?: string;
|
||||||
component: ComponentType<any>;
|
component: ComponentType<any>;
|
||||||
icon: Function;
|
icon: Function;
|
||||||
labelKey: string;
|
labelKey: string;
|
||||||
name: string;
|
name: string;
|
||||||
props?: IObject;
|
props?: IObject;
|
||||||
propsUpdateFunction?: (tabState: IObject, newProps: IObject) => IObject;
|
propsUpdateFunction?: (tabState: IObject, newProps: P) => P;
|
||||||
submit?: Function;
|
submit?: Function;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface IProps extends IBaseProps {
|
interface IProps extends IBaseProps {
|
||||||
defaultTab?: string;
|
defaultTab?: string;
|
||||||
tabs: IDialogTab[];
|
tabs: IDialogTab<any>[];
|
||||||
}
|
}
|
||||||
|
|
||||||
const DialogWithTabs = ({
|
const DialogWithTabs = ({
|
||||||
|
@ -169,6 +172,7 @@ const DialogWithTabs = ({
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const [ selectedTab, setSelectedTab ] = useState<string | undefined>(defaultTab ?? tabs[0].name);
|
const [ selectedTab, setSelectedTab ] = useState<string | undefined>(defaultTab ?? tabs[0].name);
|
||||||
|
const [ userSelected, setUserSelected ] = useState(false);
|
||||||
const [ tabStates, setTabStates ] = useState(tabs.map(tab => tab.props));
|
const [ tabStates, setTabStates ] = useState(tabs.map(tab => tab.props));
|
||||||
const clientWidth = useSelector((state: IReduxState) => state['features/base/responsive-ui'].clientWidth);
|
const clientWidth = useSelector((state: IReduxState) => state['features/base/responsive-ui'].clientWidth);
|
||||||
const [ isMobile, setIsMobile ] = useState(false);
|
const [ isMobile, setIsMobile ] = useState(false);
|
||||||
|
@ -189,18 +193,63 @@ const DialogWithTabs = ({
|
||||||
}
|
}
|
||||||
}, [ isMobile ]);
|
}, [ isMobile ]);
|
||||||
|
|
||||||
const back = useCallback(() => {
|
const onUserSelection = useCallback((tabName?: string) => {
|
||||||
setSelectedTab(undefined);
|
setUserSelected(true);
|
||||||
|
setSelectedTab(tabName);
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const onClose = useCallback(() => {
|
const back = useCallback(() => {
|
||||||
|
onUserSelection(undefined);
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
|
||||||
|
// the userSelected state is used to prevent setting focus when the user
|
||||||
|
// didn't actually interact (for the first rendering for example)
|
||||||
|
useEffect(() => {
|
||||||
|
if (userSelected) {
|
||||||
|
document.querySelector<HTMLElement>(isMobile
|
||||||
|
? `.${classes.title}`
|
||||||
|
: `#${`dialogtab-button-${selectedTab}`}`
|
||||||
|
)?.focus();
|
||||||
|
setUserSelected(false);
|
||||||
|
}
|
||||||
|
}, [ isMobile, userSelected, selectedTab ]);
|
||||||
|
|
||||||
|
const onClose = useCallback((isCancel = true) => {
|
||||||
|
if (isCancel) {
|
||||||
|
tabs.forEach(({ cancel }) => {
|
||||||
|
cancel && dispatch(cancel());
|
||||||
|
});
|
||||||
|
}
|
||||||
dispatch(hideDialog());
|
dispatch(hideDialog());
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const onClick = useCallback((tabName: string) => () => {
|
const onClick = useCallback((tabName: string) => () => {
|
||||||
setSelectedTab(tabName);
|
onUserSelection(tabName);
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
const onTabKeyDown = useCallback((index: number) => (event: React.KeyboardEvent<HTMLDivElement>) => {
|
||||||
|
let newTab: IDialogTab<any> | null = null;
|
||||||
|
|
||||||
|
if (event.key === 'ArrowUp') {
|
||||||
|
newTab = index === 0 ? tabs[tabs.length - 1] : tabs[index - 1];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (event.key === 'ArrowDown') {
|
||||||
|
newTab = index === tabs.length - 1 ? tabs[0] : tabs[index + 1];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (newTab !== null) {
|
||||||
|
onUserSelection(newTab.name);
|
||||||
|
}
|
||||||
|
}, [ tabs.length ]);
|
||||||
|
|
||||||
|
const onMobileKeyDown = useCallback((tabName: string) => (event: React.KeyboardEvent<HTMLDivElement>) => {
|
||||||
|
if (event.key === ' ' || event.key === 'Enter') {
|
||||||
|
onUserSelection(tabName);
|
||||||
|
}
|
||||||
|
}, [ classes.contentContainer ]);
|
||||||
|
|
||||||
const getTabProps = (tabId: number) => {
|
const getTabProps = (tabId: number) => {
|
||||||
const tabConfiguration = tabs[tabId];
|
const tabConfiguration = tabs[tabId];
|
||||||
const currentTabState = tabStates[tabId];
|
const currentTabState = tabStates[tabId];
|
||||||
|
@ -225,7 +274,7 @@ const DialogWithTabs = ({
|
||||||
tabs.forEach(({ submit }, idx) => {
|
tabs.forEach(({ submit }, idx) => {
|
||||||
submit?.(tabStates[idx]);
|
submit?.(tabStates[idx]);
|
||||||
});
|
});
|
||||||
onClose();
|
onClose(false);
|
||||||
}, [ tabs, tabStates ]);
|
}, [ tabs, tabStates ]);
|
||||||
|
|
||||||
const selectedTabIndex = useMemo(() => {
|
const selectedTabIndex = useMemo(() => {
|
||||||
|
@ -257,8 +306,7 @@ const DialogWithTabs = ({
|
||||||
|
|
||||||
const closeIcon = useMemo(() => (
|
const closeIcon = useMemo(() => (
|
||||||
<ClickableIcon
|
<ClickableIcon
|
||||||
accessibilityLabel = { t('dialog.close') }
|
accessibilityLabel = { t('dialog.accessibilityLabel.close') }
|
||||||
className = { classes.closeIcon }
|
|
||||||
icon = { IconCloseLarge }
|
icon = { IconCloseLarge }
|
||||||
id = 'modal-header-close-button'
|
id = 'modal-header-close-button'
|
||||||
onClick = { onClose } />
|
onClick = { onClose } />
|
||||||
|
@ -270,21 +318,39 @@ const DialogWithTabs = ({
|
||||||
onClose = { onClose }
|
onClose = { onClose }
|
||||||
size = 'large'>
|
size = 'large'>
|
||||||
{(!isMobile || !selectedTab) && (
|
{(!isMobile || !selectedTab) && (
|
||||||
<div className = { classes.sidebar }>
|
<div
|
||||||
|
aria-orientation = 'vertical'
|
||||||
|
className = { classes.sidebar }
|
||||||
|
role = { isMobile ? undefined : 'tablist' }>
|
||||||
<div className = { classes.titleContainer }>
|
<div className = { classes.titleContainer }>
|
||||||
<h2 className = { classes.title }>{t(titleKey ?? '')}</h2>
|
<MoveFocusInside>
|
||||||
|
<h2
|
||||||
|
className = { classes.title }
|
||||||
|
tabIndex = { -1 }>
|
||||||
|
{t(titleKey ?? '')}
|
||||||
|
</h2>
|
||||||
|
</MoveFocusInside>
|
||||||
{isMobile && closeIcon}
|
{isMobile && closeIcon}
|
||||||
</div>
|
</div>
|
||||||
{tabs.map(tab => {
|
{tabs.map((tab, index) => {
|
||||||
const label = t(tab.labelKey);
|
const label = t(tab.labelKey);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* When not on mobile, the items behave as tabs,
|
||||||
|
* that's why we set `controls`, `role` and `selected` attributes
|
||||||
|
* only when not on mobile, they are useful only for the tab behavior.
|
||||||
|
*/
|
||||||
return (
|
return (
|
||||||
<ContextMenuItem
|
<ContextMenuItem
|
||||||
accessibilityLabel = { label }
|
accessibilityLabel = { label }
|
||||||
className = { cx(isMobile && classes.menuItemMobile) }
|
className = { cx(isMobile && classes.menuItemMobile) }
|
||||||
|
controls = { isMobile ? undefined : `dialogtab-content-${tab.name}` }
|
||||||
icon = { tab.icon }
|
icon = { tab.icon }
|
||||||
|
id = { `dialogtab-button-${tab.name}` }
|
||||||
key = { tab.name }
|
key = { tab.name }
|
||||||
onClick = { onClick(tab.name) }
|
onClick = { onClick(tab.name) }
|
||||||
|
onKeyDown = { isMobile ? onMobileKeyDown(tab.name) : onTabKeyDown(index) }
|
||||||
|
role = { isMobile ? undefined : 'tab' }
|
||||||
selected = { tab.name === selectedTab }
|
selected = { tab.name === selectedTab }
|
||||||
text = { label } />
|
text = { label } />
|
||||||
);
|
);
|
||||||
|
@ -292,26 +358,45 @@ const DialogWithTabs = ({
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{(!isMobile || selectedTab) && (
|
{(!isMobile || selectedTab) && (
|
||||||
<div className = { classes.contentContainer }>
|
<div
|
||||||
<div className = { classes.buttonContainer }>
|
className = { classes.contentContainer }
|
||||||
{isMobile && (
|
tabIndex = { isMobile ? -1 : undefined }>
|
||||||
|
{/* DOM order is important for keyboard users: show whole heading first when on mobile… */}
|
||||||
|
{isMobile && (
|
||||||
|
<div className = { cx(classes.buttonContainer, classes.header) }>
|
||||||
<span className = { classes.backContainer }>
|
<span className = { classes.backContainer }>
|
||||||
|
<h2
|
||||||
|
className = { classes.title }
|
||||||
|
tabIndex = { -1 }>
|
||||||
|
{(selectedTabIndex !== null) && t(tabs[selectedTabIndex].labelKey)}
|
||||||
|
</h2>
|
||||||
<ClickableIcon
|
<ClickableIcon
|
||||||
accessibilityLabel = { t('dialog.Back') }
|
accessibilityLabel = { t('dialog.Back') }
|
||||||
className = { classes.closeIcon }
|
|
||||||
icon = { IconArrowBack }
|
icon = { IconArrowBack }
|
||||||
id = 'modal-header-back-button'
|
id = 'modal-header-back-button'
|
||||||
onClick = { back } />
|
onClick = { back } />
|
||||||
<h2 className = { classes.title }>
|
|
||||||
{(selectedTabIndex !== null) && t(tabs[selectedTabIndex].labelKey)}
|
|
||||||
</h2>
|
|
||||||
</span>
|
</span>
|
||||||
)}
|
{closeIcon}
|
||||||
{closeIcon}
|
</div>
|
||||||
</div>
|
)}
|
||||||
<div className = { classes.content }>
|
{tabs.map(tab => (
|
||||||
{selectedTabComponent}
|
<div
|
||||||
</div>
|
aria-labelledby = { isMobile ? undefined : `${tab.name}-button` }
|
||||||
|
className = { cx(classes.content, tab.name !== selectedTab && 'hide') }
|
||||||
|
id = { `dialogtab-content-${tab.name}` }
|
||||||
|
key = { tab.name }
|
||||||
|
role = { isMobile ? undefined : 'tabpanel' }
|
||||||
|
tabIndex = { isMobile ? -1 : 0 }>
|
||||||
|
{ tab.name === selectedTab && selectedTabComponent }
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
{/* But show the close button *after* tab panels when not on mobile (using tabs).
|
||||||
|
This is so that we can tab back and forth tab buttons and tab panels easily. */}
|
||||||
|
{!isMobile && (
|
||||||
|
<div className = { cx(classes.buttonContainer, classes.header) }>
|
||||||
|
{closeIcon}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
<div
|
<div
|
||||||
className = { cx(classes.buttonContainer, classes.footer) }>
|
className = { cx(classes.buttonContainer, classes.footer) }>
|
||||||
<Button
|
<Button
|
||||||
|
|
|
@ -79,7 +79,7 @@ const useStyles = makeStyles()(theme => {
|
||||||
width: '100%',
|
width: '100%',
|
||||||
...withPixelLineHeight(theme.typography.bodyShortRegular),
|
...withPixelLineHeight(theme.typography.bodyShortRegular),
|
||||||
color: theme.palette.text01,
|
color: theme.palette.text01,
|
||||||
padding: '8px 16px',
|
padding: '10px 16px',
|
||||||
paddingRight: '42px',
|
paddingRight: '42px',
|
||||||
border: 0,
|
border: 0,
|
||||||
appearance: 'none',
|
appearance: 'none',
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import React, { useCallback } from 'react';
|
import React, { useCallback, useEffect } from 'react';
|
||||||
import { makeStyles } from 'tss-react/mui';
|
import { makeStyles } from 'tss-react/mui';
|
||||||
|
|
||||||
import { isMobileBrowser } from '../../../environment/utils';
|
import { isMobileBrowser } from '../../../environment/utils';
|
||||||
|
@ -11,6 +11,7 @@ interface ITabProps {
|
||||||
selected: string;
|
selected: string;
|
||||||
tabs: Array<{
|
tabs: Array<{
|
||||||
accessibilityLabel: string;
|
accessibilityLabel: string;
|
||||||
|
controlsId: string;
|
||||||
countBadge?: number;
|
countBadge?: number;
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
id: string;
|
id: string;
|
||||||
|
@ -44,7 +45,7 @@ const useStyles = makeStyles()(theme => {
|
||||||
borderColor: theme.palette.ui10
|
borderColor: theme.palette.ui10
|
||||||
},
|
},
|
||||||
|
|
||||||
'&:focus': {
|
'&.focus-visible': {
|
||||||
outline: 0,
|
outline: 0,
|
||||||
boxShadow: `0px 0px 0px 2px ${theme.palette.focus01}`,
|
boxShadow: `0px 0px 0px 2px ${theme.palette.focus01}`,
|
||||||
border: 0,
|
border: 0,
|
||||||
|
@ -87,26 +88,52 @@ const Tabs = ({
|
||||||
}: ITabProps) => {
|
}: ITabProps) => {
|
||||||
const { classes, cx } = useStyles();
|
const { classes, cx } = useStyles();
|
||||||
const isMobile = isMobileBrowser();
|
const isMobile = isMobileBrowser();
|
||||||
|
const onClick = useCallback(id => () => {
|
||||||
const handleChange = useCallback((e: React.MouseEvent<HTMLButtonElement>) => {
|
onChange(id);
|
||||||
onChange(e.currentTarget.id);
|
|
||||||
}, []);
|
}, []);
|
||||||
|
const onKeyDown = useCallback((index: number) => (event: React.KeyboardEvent<HTMLButtonElement>) => {
|
||||||
|
let newIndex: number | null = null;
|
||||||
|
|
||||||
|
if (event.key === 'ArrowLeft') {
|
||||||
|
event.preventDefault();
|
||||||
|
newIndex = index === 0 ? tabs.length - 1 : index - 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (event.key === 'ArrowRight') {
|
||||||
|
event.preventDefault();
|
||||||
|
newIndex = index === tabs.length - 1 ? 0 : index + 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (newIndex !== null) {
|
||||||
|
onChange(tabs[newIndex].id);
|
||||||
|
}
|
||||||
|
}, [ tabs ]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
// this test is needed to make sure the effect is triggered because of user actually changing tab
|
||||||
|
if (document.activeElement?.getAttribute('role') === 'tab') {
|
||||||
|
document.querySelector<HTMLButtonElement>(`#${selected}`)?.focus();
|
||||||
|
}
|
||||||
|
}, [ selected ]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
aria-label = { accessibilityLabel }
|
aria-label = { accessibilityLabel }
|
||||||
className = { cx(classes.container, className) }
|
className = { cx(classes.container, className) }
|
||||||
role = 'tablist'>
|
role = 'tablist'>
|
||||||
{tabs.map(tab => (
|
{tabs.map((tab, index) => (
|
||||||
<button
|
<button
|
||||||
|
aria-controls = { tab.controlsId }
|
||||||
aria-label = { tab.accessibilityLabel }
|
aria-label = { tab.accessibilityLabel }
|
||||||
aria-selected = { selected === tab.id }
|
aria-selected = { selected === tab.id }
|
||||||
className = { cx(classes.tab, selected === tab.id && 'selected', isMobile && 'is-mobile') }
|
className = { cx(classes.tab, selected === tab.id && 'selected', isMobile && 'is-mobile') }
|
||||||
disabled = { tab.disabled }
|
disabled = { tab.disabled }
|
||||||
id = { tab.id }
|
id = { tab.id }
|
||||||
key = { tab.id }
|
key = { tab.id }
|
||||||
onClick = { handleChange }
|
onClick = { onClick(tab.id) }
|
||||||
role = 'tab'>
|
onKeyDown = { onKeyDown(index) }
|
||||||
|
role = 'tab'
|
||||||
|
tabIndex = { selected === tab.id ? undefined : -1 }>
|
||||||
{tab.label}
|
{tab.label}
|
||||||
{tab.countBadge && <span className = { classes.badge }>{tab.countBadge}</span>}
|
{tab.countBadge && <span className = { classes.badge }>{tab.countBadge}</span>}
|
||||||
</button>
|
</button>
|
||||||
|
|
|
@ -0,0 +1,74 @@
|
||||||
|
import React, { ReactNode, useRef } from 'react';
|
||||||
|
import { keyframes } from 'styled-components';
|
||||||
|
import { makeStyles } from 'tss-react/mui';
|
||||||
|
|
||||||
|
import { TEXT_OVERFLOW_TYPES } from '../../constants.web';
|
||||||
|
|
||||||
|
interface ITextWithOverflowProps {
|
||||||
|
children: ReactNode;
|
||||||
|
className?: string;
|
||||||
|
overflowType?: TEXT_OVERFLOW_TYPES;
|
||||||
|
}
|
||||||
|
|
||||||
|
const useStyles = makeStyles<{ translateDiff: number; }>()((_, { translateDiff }) => {
|
||||||
|
return {
|
||||||
|
animation: {
|
||||||
|
'&:hover': {
|
||||||
|
animation: `${keyframes`
|
||||||
|
0%, 20% {
|
||||||
|
transform: translateX(0%);
|
||||||
|
left: 0%;
|
||||||
|
}
|
||||||
|
80%, 100% {
|
||||||
|
transform: translateX(-${translateDiff}px);
|
||||||
|
left: 100%;
|
||||||
|
}
|
||||||
|
`} ${Math.max(translateDiff * 50, 2000)}ms infinite alternate linear;`
|
||||||
|
}
|
||||||
|
},
|
||||||
|
textContainer: {
|
||||||
|
overflow: 'hidden'
|
||||||
|
},
|
||||||
|
[TEXT_OVERFLOW_TYPES.ELLIPSIS]: {
|
||||||
|
display: 'block',
|
||||||
|
overflow: 'hidden',
|
||||||
|
textOverflow: 'ellipsis',
|
||||||
|
whiteSpace: 'nowrap'
|
||||||
|
},
|
||||||
|
[TEXT_OVERFLOW_TYPES.SCROLL_ON_HOVER]: {
|
||||||
|
display: 'inline-block',
|
||||||
|
overflow: 'visible',
|
||||||
|
whiteSpace: 'nowrap'
|
||||||
|
}
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
const TextWithOverflow = ({
|
||||||
|
className,
|
||||||
|
overflowType = TEXT_OVERFLOW_TYPES.ELLIPSIS,
|
||||||
|
children
|
||||||
|
}: ITextWithOverflowProps) => {
|
||||||
|
const containerRef = useRef<HTMLDivElement>(null);
|
||||||
|
const contentRef = useRef<HTMLSpanElement>(null);
|
||||||
|
const shouldAnimateOnHover = overflowType === TEXT_OVERFLOW_TYPES.SCROLL_ON_HOVER
|
||||||
|
&& containerRef.current
|
||||||
|
&& contentRef.current
|
||||||
|
&& containerRef.current.clientWidth < contentRef.current.clientWidth;
|
||||||
|
|
||||||
|
const translateDiff = shouldAnimateOnHover ? contentRef.current.clientWidth - containerRef.current.clientWidth : 0;
|
||||||
|
const { classes: styles, cx } = useStyles({ translateDiff });
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div
|
||||||
|
className = { cx(className, styles.textContainer) }
|
||||||
|
ref = { containerRef }>
|
||||||
|
<span
|
||||||
|
className = { cx(styles[overflowType], shouldAnimateOnHover && styles.animation) }
|
||||||
|
ref = { contentRef }>
|
||||||
|
{children}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default TextWithOverflow;
|
|
@ -8,6 +8,14 @@ export enum BUTTON_TYPES {
|
||||||
TERTIARY = 'tertiary'
|
TERTIARY = 'tertiary'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Behaviour types for showing overflow text content.
|
||||||
|
*/
|
||||||
|
export enum TEXT_OVERFLOW_TYPES {
|
||||||
|
ELLIPSIS = 'ellipsis',
|
||||||
|
SCROLL_ON_HOVER = 'scroll-on-hover'
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The modes of the buttons.
|
* The modes of the buttons.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -202,7 +202,8 @@ class CalendarList extends AbstractPage<Props> {
|
||||||
className = 'meetings-list-empty-button'
|
className = 'meetings-list-empty-button'
|
||||||
onClick = { this._onOpenSettings }
|
onClick = { this._onOpenSettings }
|
||||||
onKeyPress = { this._onKeyPressOpenSettings }
|
onKeyPress = { this._onKeyPressOpenSettings }
|
||||||
role = 'button'>
|
role = 'button'
|
||||||
|
tabIndex = { 0 }>
|
||||||
<Icon
|
<Icon
|
||||||
className = 'meetings-list-empty-icon'
|
className = 'meetings-list-empty-icon'
|
||||||
src = { IconCalendar } />
|
src = { IconCalendar } />
|
||||||
|
|
|
@ -134,35 +134,38 @@ class Chat extends AbstractChat<Props> {
|
||||||
_renderChat() {
|
_renderChat() {
|
||||||
const { _isPollsEnabled, _isPollsTabFocused } = this.props;
|
const { _isPollsEnabled, _isPollsTabFocused } = this.props;
|
||||||
|
|
||||||
if (_isPollsTabFocused) {
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
{ _isPollsEnabled && this._renderTabs() }
|
|
||||||
<div
|
|
||||||
aria-labelledby = { CHAT_TABS.POLLS }
|
|
||||||
id = 'polls-panel'
|
|
||||||
role = 'tabpanel'>
|
|
||||||
<PollsPane />
|
|
||||||
</div>
|
|
||||||
<KeyboardAvoider />
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{ _isPollsEnabled && this._renderTabs() }
|
{ _isPollsEnabled && this._renderTabs() }
|
||||||
<div
|
<div
|
||||||
aria-labelledby = { CHAT_TABS.CHAT }
|
aria-labelledby = { CHAT_TABS.CHAT }
|
||||||
className = { clsx('chat-panel', !_isPollsEnabled && 'chat-panel-no-tabs') }
|
className = { clsx(
|
||||||
id = 'chat-panel'
|
'chat-panel',
|
||||||
role = 'tabpanel'>
|
!_isPollsEnabled && 'chat-panel-no-tabs',
|
||||||
|
_isPollsTabFocused && 'hide'
|
||||||
|
) }
|
||||||
|
id = { `${CHAT_TABS.CHAT}-panel` }
|
||||||
|
role = 'tabpanel'
|
||||||
|
tabIndex = { 0 }>
|
||||||
<MessageContainer
|
<MessageContainer
|
||||||
messages = { this.props._messages } />
|
messages = { this.props._messages } />
|
||||||
<MessageRecipient />
|
<MessageRecipient />
|
||||||
<ChatInput
|
<ChatInput
|
||||||
onSend = { this._onSendMessage } />
|
onSend = { this._onSendMessage } />
|
||||||
</div>
|
</div>
|
||||||
|
{ _isPollsEnabled && (
|
||||||
|
<>
|
||||||
|
<div
|
||||||
|
aria-labelledby = { CHAT_TABS.POLLS }
|
||||||
|
className = { clsx('polls-panel', !_isPollsTabFocused && 'hide') }
|
||||||
|
id = { `${CHAT_TABS.POLLS}-panel` }
|
||||||
|
role = 'tabpanel'
|
||||||
|
tabIndex = { 0 }>
|
||||||
|
<PollsPane />
|
||||||
|
</div>
|
||||||
|
<KeyboardAvoider />
|
||||||
|
</>
|
||||||
|
)}
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -185,11 +188,13 @@ class Chat extends AbstractChat<Props> {
|
||||||
accessibilityLabel: t('chat.tabs.chat'),
|
accessibilityLabel: t('chat.tabs.chat'),
|
||||||
countBadge: _isPollsTabFocused && _nbUnreadMessages > 0 ? _nbUnreadMessages : undefined,
|
countBadge: _isPollsTabFocused && _nbUnreadMessages > 0 ? _nbUnreadMessages : undefined,
|
||||||
id: CHAT_TABS.CHAT,
|
id: CHAT_TABS.CHAT,
|
||||||
|
controlsId: `${CHAT_TABS.CHAT}-panel`,
|
||||||
label: t('chat.tabs.chat')
|
label: t('chat.tabs.chat')
|
||||||
}, {
|
}, {
|
||||||
accessibilityLabel: t('chat.tabs.polls'),
|
accessibilityLabel: t('chat.tabs.polls'),
|
||||||
countBadge: !_isPollsTabFocused && _nbUnreadPolls > 0 ? _nbUnreadPolls : undefined,
|
countBadge: !_isPollsTabFocused && _nbUnreadPolls > 0 ? _nbUnreadPolls : undefined,
|
||||||
id: CHAT_TABS.POLLS,
|
id: CHAT_TABS.POLLS,
|
||||||
|
controlsId: `${CHAT_TABS.POLLS}-panel`,
|
||||||
label: t('chat.tabs.polls')
|
label: t('chat.tabs.polls')
|
||||||
}
|
}
|
||||||
] } />
|
] } />
|
||||||
|
|
|
@ -46,9 +46,12 @@ function Header({ onCancel, className, isPollsEnabled, t }: Props) {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className = { className || 'chat-dialog-header' }
|
className = { className || 'chat-dialog-header' }>
|
||||||
role = 'heading'>
|
<span
|
||||||
{ t(isPollsEnabled ? 'chat.titleWithPolls' : 'chat.title') }
|
aria-level = { 1 }
|
||||||
|
role = 'heading'>
|
||||||
|
{ t(isPollsEnabled ? 'chat.titleWithPolls' : 'chat.title') }
|
||||||
|
</span>
|
||||||
<Icon
|
<Icon
|
||||||
ariaLabel = { t('toolbar.closeChat') }
|
ariaLabel = { t('toolbar.closeChat') }
|
||||||
onClick = { onCancel }
|
onClick = { onCancel }
|
||||||
|
|
|
@ -115,7 +115,6 @@ class ChatInput extends Component<IProps, IState> {
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<Input
|
<Input
|
||||||
autoFocus = { true }
|
|
||||||
className = 'chat-input'
|
className = 'chat-input'
|
||||||
icon = { this.props._areSmileysDisabled ? undefined : IconFaceSmile }
|
icon = { this.props._areSmileysDisabled ? undefined : IconFaceSmile }
|
||||||
iconClick = { this._toggleSmileysPanel }
|
iconClick = { this._toggleSmileysPanel }
|
||||||
|
|
|
@ -210,7 +210,8 @@ class Conference extends AbstractConference<Props, *> {
|
||||||
_notificationsVisible,
|
_notificationsVisible,
|
||||||
_overflowDrawer,
|
_overflowDrawer,
|
||||||
_showLobby,
|
_showLobby,
|
||||||
_showPrejoin
|
_showPrejoin,
|
||||||
|
t
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -240,7 +241,17 @@ class Conference extends AbstractConference<Props, *> {
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{ _showPrejoin || _showLobby || <Toolbox /> }
|
{ _showPrejoin || _showLobby || (
|
||||||
|
<>
|
||||||
|
<span
|
||||||
|
aria-level = { 1 }
|
||||||
|
className = 'sr-only'
|
||||||
|
role = 'heading'>
|
||||||
|
{ t('toolbar.accessibilityLabel.heading') }
|
||||||
|
</span>
|
||||||
|
<Toolbox />
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
|
||||||
{_notificationsVisible && !_isAnyOverlayVisible && (_overflowDrawer
|
{_notificationsVisible && !_isAnyOverlayVisible && (_overflowDrawer
|
||||||
? <JitsiPortal className = 'notification-portal'>
|
? <JitsiPortal className = 'notification-portal'>
|
||||||
|
|
|
@ -9,6 +9,7 @@ import { connect } from '../../../base/redux';
|
||||||
import E2EELabel from '../../../e2ee/components/E2EELabel';
|
import E2EELabel from '../../../e2ee/components/E2EELabel';
|
||||||
import HighlightButton from '../../../recording/components/Recording/web/HighlightButton';
|
import HighlightButton from '../../../recording/components/Recording/web/HighlightButton';
|
||||||
import RecordingLabel from '../../../recording/components/web/RecordingLabel';
|
import RecordingLabel from '../../../recording/components/web/RecordingLabel';
|
||||||
|
import { showToolbox } from '../../../toolbox/actions';
|
||||||
import { isToolboxVisible } from '../../../toolbox/functions.web';
|
import { isToolboxVisible } from '../../../toolbox/functions.web';
|
||||||
import TranscribingLabel from '../../../transcribing/components/TranscribingLabel.web';
|
import TranscribingLabel from '../../../transcribing/components/TranscribingLabel.web';
|
||||||
import VideoQualityLabel from '../../../video-quality/components/VideoQualityLabel.web';
|
import VideoQualityLabel from '../../../video-quality/components/VideoQualityLabel.web';
|
||||||
|
@ -33,6 +34,11 @@ type Props = {
|
||||||
*/
|
*/
|
||||||
_conferenceInfo: Object,
|
_conferenceInfo: Object,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Invoked to active other features of the app.
|
||||||
|
*/
|
||||||
|
dispatch: Function;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicates whether the component should be visible or not.
|
* Indicates whether the component should be visible or not.
|
||||||
*/
|
*/
|
||||||
|
@ -113,6 +119,21 @@ class ConferenceInfo extends Component<Props> {
|
||||||
|
|
||||||
this._renderAutoHide = this._renderAutoHide.bind(this);
|
this._renderAutoHide = this._renderAutoHide.bind(this);
|
||||||
this._renderAlwaysVisible = this._renderAlwaysVisible.bind(this);
|
this._renderAlwaysVisible = this._renderAlwaysVisible.bind(this);
|
||||||
|
this._onTabIn = this._onTabIn.bind(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
_onTabIn: () => void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Callback invoked when the component is focused to show the conference
|
||||||
|
* info if necessary.
|
||||||
|
*
|
||||||
|
* @returns {void}
|
||||||
|
*/
|
||||||
|
_onTabIn() {
|
||||||
|
if (this.props._conferenceInfo.autoHide?.length && !this.props._visible) {
|
||||||
|
this.props.dispatch(showToolbox());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_renderAutoHide: () => void;
|
_renderAutoHide: () => void;
|
||||||
|
@ -181,7 +202,9 @@ class ConferenceInfo extends Component<Props> {
|
||||||
*/
|
*/
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div className = 'details-container' >
|
<div
|
||||||
|
className = 'details-container'
|
||||||
|
onFocus = { this._onTabIn }>
|
||||||
{ this._renderAlwaysVisible() }
|
{ this._renderAlwaysVisible() }
|
||||||
{ this._renderAutoHide() }
|
{ this._renderAutoHide() }
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -216,7 +216,7 @@ class ConnectionIndicator extends AbstractConnectionIndicator<Props, IState> {
|
||||||
*/
|
*/
|
||||||
render() {
|
render() {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
const { enableStatsDisplay, participantId, statsPopoverPosition, classes } = this.props;
|
const { enableStatsDisplay, participantId, statsPopoverPosition, classes, t } = this.props;
|
||||||
const visibilityClass = this._getVisibilityClass();
|
const visibilityClass = this._getVisibilityClass();
|
||||||
|
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
|
@ -233,6 +233,7 @@ class ConnectionIndicator extends AbstractConnectionIndicator<Props, IState> {
|
||||||
inheritedStats = { this.state.stats }
|
inheritedStats = { this.state.stats }
|
||||||
participantId = { participantId } /> }
|
participantId = { participantId } /> }
|
||||||
disablePopover = { !enableStatsDisplay }
|
disablePopover = { !enableStatsDisplay }
|
||||||
|
headingLabel = { t('videothumbnail.connectionInfo') }
|
||||||
id = 'participant-connection-indicator'
|
id = 'participant-connection-indicator'
|
||||||
onPopoverClose = { this._onHidePopover }
|
onPopoverClose = { this._onHidePopover }
|
||||||
onPopoverOpen = { this._onShowPopover }
|
onPopoverOpen = { this._onShowPopover }
|
||||||
|
|
|
@ -191,7 +191,7 @@ class DesktopPicker extends PureComponent<IProps, IState> {
|
||||||
* @inheritdoc
|
* @inheritdoc
|
||||||
*/
|
*/
|
||||||
render() {
|
render() {
|
||||||
const { selectedTab, selectedSource, sources } = this.state;
|
const { selectedTab, selectedSource, sources, types } = this.state;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Dialog
|
<Dialog
|
||||||
|
@ -204,14 +204,27 @@ class DesktopPicker extends PureComponent<IProps, IState> {
|
||||||
size = 'large'
|
size = 'large'
|
||||||
titleKey = 'dialog.shareYourScreen'>
|
titleKey = 'dialog.shareYourScreen'>
|
||||||
{ this._renderTabs() }
|
{ this._renderTabs() }
|
||||||
<DesktopPickerPane
|
{types.map(type => (
|
||||||
key = { selectedTab }
|
<div
|
||||||
onClick = { this._onPreviewClick }
|
aria-labelledby = { `${type}-button` }
|
||||||
onDoubleClick = { this._onSubmit }
|
className = { selectedTab === type ? undefined : 'hide' }
|
||||||
onShareAudioChecked = { this._onShareAudioChecked }
|
id = { `${type}-panel` }
|
||||||
selectedSourceId = { selectedSource.id }
|
key = { type }
|
||||||
sources = { sources[selectedTab as keyof typeof sources] }
|
role = 'tabpanel'
|
||||||
type = { selectedTab } />
|
tabIndex = { 0 }>
|
||||||
|
{selectedTab === type && (
|
||||||
|
<DesktopPickerPane
|
||||||
|
key = { selectedTab }
|
||||||
|
onClick = { this._onPreviewClick }
|
||||||
|
onDoubleClick = { this._onSubmit }
|
||||||
|
onShareAudioChecked = { this._onShareAudioChecked }
|
||||||
|
selectedSourceId = { selectedSource.id }
|
||||||
|
sources = { sources[selectedTab as keyof typeof sources] }
|
||||||
|
type = { selectedTab } />
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
|
||||||
</Dialog>
|
</Dialog>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -348,17 +361,18 @@ class DesktopPicker extends PureComponent<IProps, IState> {
|
||||||
type => {
|
type => {
|
||||||
return {
|
return {
|
||||||
accessibilityLabel: t(TAB_LABELS[type as keyof typeof TAB_LABELS]),
|
accessibilityLabel: t(TAB_LABELS[type as keyof typeof TAB_LABELS]),
|
||||||
id: type,
|
id: `${type}-tab`,
|
||||||
|
controlsId: `${type}-panel`,
|
||||||
label: t(TAB_LABELS[type as keyof typeof TAB_LABELS])
|
label: t(TAB_LABELS[type as keyof typeof TAB_LABELS])
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Tabs
|
<Tabs
|
||||||
accessibilityLabel = ''
|
accessibilityLabel = { t('dialog.sharingTabs') }
|
||||||
className = 'desktop-picker-tabs-container'
|
className = 'desktop-picker-tabs-container'
|
||||||
onChange = { this._onTabSelected }
|
onChange = { this._onTabSelected }
|
||||||
selected = { this.state.selectedTab }
|
selected = { `${this.state.selectedTab}-tab` }
|
||||||
tabs = { tabs } />);
|
tabs = { tabs } />);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,31 +7,23 @@ import {
|
||||||
} from '../base/devices/actions';
|
} from '../base/devices/actions';
|
||||||
import { getDeviceLabelById, setAudioOutputDeviceId } from '../base/devices/functions';
|
import { getDeviceLabelById, setAudioOutputDeviceId } from '../base/devices/functions';
|
||||||
import { updateSettings } from '../base/settings/actions';
|
import { updateSettings } from '../base/settings/actions';
|
||||||
|
import { toggleNoiseSuppression } from '../noise-suppression/actions';
|
||||||
|
import { setScreenshareFramerate } from '../screen-share/actions';
|
||||||
|
|
||||||
import { getDeviceSelectionDialogProps } from './functions';
|
import { getAudioDeviceSelectionDialogProps, getVideoDeviceSelectionDialogProps } from './functions';
|
||||||
import logger from './logger';
|
import logger from './logger';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Submits the settings related to device selection.
|
* Submits the settings related to audio device selection.
|
||||||
*
|
*
|
||||||
* @param {Object} newState - The new settings.
|
* @param {Object} newState - The new settings.
|
||||||
* @param {boolean} isDisplayedOnWelcomePage - Indicates whether the device selection dialog is displayed on the
|
* @param {boolean} isDisplayedOnWelcomePage - Indicates whether the device selection dialog is displayed on the
|
||||||
* welcome page or not.
|
* welcome page or not.
|
||||||
* @returns {Function}
|
* @returns {Function}
|
||||||
*/
|
*/
|
||||||
export function submitDeviceSelectionTab(newState: any, isDisplayedOnWelcomePage: boolean) {
|
export function submitAudioDeviceSelectionTab(newState: any, isDisplayedOnWelcomePage: boolean) {
|
||||||
return (dispatch: IStore['dispatch'], getState: IStore['getState']) => {
|
return (dispatch: IStore['dispatch'], getState: IStore['getState']) => {
|
||||||
const currentState = getDeviceSelectionDialogProps(getState(), isDisplayedOnWelcomePage);
|
const currentState = getAudioDeviceSelectionDialogProps(getState(), isDisplayedOnWelcomePage);
|
||||||
|
|
||||||
if (newState.selectedVideoInputId && (newState.selectedVideoInputId !== currentState.selectedVideoInputId)) {
|
|
||||||
dispatch(updateSettings({
|
|
||||||
userSelectedCameraDeviceId: newState.selectedVideoInputId,
|
|
||||||
userSelectedCameraDeviceLabel:
|
|
||||||
getDeviceLabelById(getState(), newState.selectedVideoInputId, 'videoInput')
|
|
||||||
}));
|
|
||||||
|
|
||||||
dispatch(setVideoInputDevice(newState.selectedVideoInputId));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (newState.selectedAudioInputId && newState.selectedAudioInputId !== currentState.selectedAudioInputId) {
|
if (newState.selectedAudioInputId && newState.selectedAudioInputId !== currentState.selectedAudioInputId) {
|
||||||
dispatch(updateSettings({
|
dispatch(updateSettings({
|
||||||
|
@ -44,8 +36,8 @@ export function submitDeviceSelectionTab(newState: any, isDisplayedOnWelcomePage
|
||||||
}
|
}
|
||||||
|
|
||||||
if (newState.selectedAudioOutputId
|
if (newState.selectedAudioOutputId
|
||||||
&& newState.selectedAudioOutputId
|
&& newState.selectedAudioOutputId
|
||||||
!== currentState.selectedAudioOutputId) {
|
!== currentState.selectedAudioOutputId) {
|
||||||
sendAnalytics(createDeviceChangedEvent('audio', 'output'));
|
sendAnalytics(createDeviceChangedEvent('audio', 'output'));
|
||||||
|
|
||||||
setAudioOutputDeviceId(
|
setAudioOutputDeviceId(
|
||||||
|
@ -62,5 +54,45 @@ export function submitDeviceSelectionTab(newState: any, isDisplayedOnWelcomePage
|
||||||
err);
|
err);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (newState.noiseSuppressionEnabled !== currentState.noiseSuppressionEnabled) {
|
||||||
|
dispatch(toggleNoiseSuppression());
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Submits the settings related to device selection.
|
||||||
|
*
|
||||||
|
* @param {Object} newState - The new settings.
|
||||||
|
* @param {boolean} isDisplayedOnWelcomePage - Indicates whether the device selection dialog is displayed on the
|
||||||
|
* welcome page or not.
|
||||||
|
* @returns {Function}
|
||||||
|
*/
|
||||||
|
export function submitVideoDeviceSelectionTab(newState: any, isDisplayedOnWelcomePage: boolean) {
|
||||||
|
return (dispatch: IStore['dispatch'], getState: IStore['getState']) => {
|
||||||
|
const currentState = getVideoDeviceSelectionDialogProps(getState(), isDisplayedOnWelcomePage);
|
||||||
|
|
||||||
|
if (newState.selectedVideoInputId && (newState.selectedVideoInputId !== currentState.selectedVideoInputId)) {
|
||||||
|
dispatch(updateSettings({
|
||||||
|
userSelectedCameraDeviceId: newState.selectedVideoInputId,
|
||||||
|
userSelectedCameraDeviceLabel:
|
||||||
|
getDeviceLabelById(getState(), newState.selectedVideoInputId, 'videoInput')
|
||||||
|
}));
|
||||||
|
|
||||||
|
dispatch(setVideoInputDevice(newState.selectedVideoInputId));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (newState.localFlipX !== currentState.localFlipX) {
|
||||||
|
dispatch(updateSettings({
|
||||||
|
localFlipX: newState.localFlipX
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (newState.currentFramerate !== currentState.currentFramerate) {
|
||||||
|
const frameRate = parseInt(newState.currentFramerate, 10);
|
||||||
|
|
||||||
|
dispatch(setScreenshareFramerate(frameRate));
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,387 @@
|
||||||
|
import { Theme } from '@mui/material';
|
||||||
|
import { withStyles } from '@mui/styles';
|
||||||
|
import React from 'react';
|
||||||
|
import { WithTranslation } from 'react-i18next';
|
||||||
|
import { connect } from 'react-redux';
|
||||||
|
|
||||||
|
import { IReduxState, IStore } from '../../app/types';
|
||||||
|
import { getAvailableDevices } from '../../base/devices/actions.web';
|
||||||
|
import AbstractDialogTab, {
|
||||||
|
type IProps as AbstractDialogTabProps
|
||||||
|
} from '../../base/dialog/components/web/AbstractDialogTab';
|
||||||
|
import { translate } from '../../base/i18n/functions';
|
||||||
|
import { createLocalTrack } from '../../base/lib-jitsi-meet/functions.web';
|
||||||
|
import Checkbox from '../../base/ui/components/web/Checkbox';
|
||||||
|
import logger from '../logger';
|
||||||
|
|
||||||
|
import AudioInputPreview from './AudioInputPreview';
|
||||||
|
import AudioOutputPreview from './AudioOutputPreview';
|
||||||
|
import DeviceHidContainer from './DeviceHidContainer.web';
|
||||||
|
import DeviceSelector from './DeviceSelector.web';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The type of the React {@code Component} props of {@link AudioDevicesSelection}.
|
||||||
|
*/
|
||||||
|
interface IProps extends AbstractDialogTabProps, WithTranslation {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* All known audio and video devices split by type. This prop comes from
|
||||||
|
* the app state.
|
||||||
|
*/
|
||||||
|
availableDevices: {
|
||||||
|
audioInput?: MediaDeviceInfo[];
|
||||||
|
audioOutput?: MediaDeviceInfo[];
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CSS classes object.
|
||||||
|
*/
|
||||||
|
classes: any;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether or not the audio selector can be interacted with. If true,
|
||||||
|
* the audio input selector will be rendered as disabled. This is
|
||||||
|
* specifically used to prevent audio device changing in Firefox, which
|
||||||
|
* currently does not work due to a browser-side regression.
|
||||||
|
*/
|
||||||
|
disableAudioInputChange: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* True if device changing is configured to be disallowed. Selectors
|
||||||
|
* will display as disabled.
|
||||||
|
*/
|
||||||
|
disableDeviceChange: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Redux dispatch function.
|
||||||
|
*/
|
||||||
|
dispatch: IStore['dispatch'];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether or not the audio permission was granted.
|
||||||
|
*/
|
||||||
|
hasAudioPermission: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If true, the audio meter will not display. Necessary for browsers or
|
||||||
|
* configurations that do not support local stats to prevent a
|
||||||
|
* non-responsive mic preview from displaying.
|
||||||
|
*/
|
||||||
|
hideAudioInputPreview: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If true, the button to play a test sound on the selected speaker will not be displayed.
|
||||||
|
* This needs to be hidden on browsers that do not support selecting an audio output device.
|
||||||
|
*/
|
||||||
|
hideAudioOutputPreview: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether or not the audio output source selector should display. If
|
||||||
|
* true, the audio output selector and test audio link will not be
|
||||||
|
* rendered.
|
||||||
|
*/
|
||||||
|
hideAudioOutputSelect: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether or not the hid device container should display.
|
||||||
|
*/
|
||||||
|
hideDeviceHIDContainer: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether to hide noise suppression checkbox or not.
|
||||||
|
*/
|
||||||
|
hideNoiseSuppression: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Wether noise suppression is on or not.
|
||||||
|
*/
|
||||||
|
noiseSuppressionEnabled: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The id of the audio input device to preview.
|
||||||
|
*/
|
||||||
|
selectedAudioInputId: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The id of the audio output device to preview.
|
||||||
|
*/
|
||||||
|
selectedAudioOutputId: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The type of the React {@code Component} state of {@link AudioDevicesSelection}.
|
||||||
|
*/
|
||||||
|
type State = {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The JitsiTrack to use for previewing audio input.
|
||||||
|
*/
|
||||||
|
previewAudioTrack?: any | null;
|
||||||
|
};
|
||||||
|
|
||||||
|
const styles = (theme: Theme) => {
|
||||||
|
return {
|
||||||
|
container: {
|
||||||
|
display: 'flex',
|
||||||
|
flexDirection: 'column' as const,
|
||||||
|
padding: '0 2px',
|
||||||
|
width: '100%'
|
||||||
|
},
|
||||||
|
|
||||||
|
inputContainer: {
|
||||||
|
marginBottom: theme.spacing(3)
|
||||||
|
},
|
||||||
|
|
||||||
|
outputContainer: {
|
||||||
|
margin: `${theme.spacing(5)} 0`,
|
||||||
|
display: 'flex',
|
||||||
|
alignItems: 'flex-end'
|
||||||
|
},
|
||||||
|
|
||||||
|
outputButton: {
|
||||||
|
marginLeft: theme.spacing(3)
|
||||||
|
},
|
||||||
|
|
||||||
|
noiseSuppressionContainer: {
|
||||||
|
marginBottom: theme.spacing(5)
|
||||||
|
}
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* React {@code Component} for previewing audio and video input/output devices.
|
||||||
|
*
|
||||||
|
* @augments Component
|
||||||
|
*/
|
||||||
|
class AudioDevicesSelection extends AbstractDialogTab<IProps, State> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether current component is mounted or not.
|
||||||
|
*
|
||||||
|
* In component did mount we start a Promise to create tracks and
|
||||||
|
* set the tracks in the state, if we unmount the component in the meanwhile
|
||||||
|
* tracks will be created and will never been disposed (dispose tracks is
|
||||||
|
* in componentWillUnmount). When tracks are created and component is
|
||||||
|
* unmounted we dispose the tracks.
|
||||||
|
*/
|
||||||
|
_unMounted: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initializes a new DeviceSelection instance.
|
||||||
|
*
|
||||||
|
* @param {Object} props - The read-only React Component props with which
|
||||||
|
* the new instance is to be initialized.
|
||||||
|
*/
|
||||||
|
constructor(props: IProps) {
|
||||||
|
super(props);
|
||||||
|
|
||||||
|
this.state = {
|
||||||
|
previewAudioTrack: null
|
||||||
|
};
|
||||||
|
this._unMounted = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generate the initial previews for audio input and video input.
|
||||||
|
*
|
||||||
|
* @inheritdoc
|
||||||
|
*/
|
||||||
|
componentDidMount() {
|
||||||
|
this._unMounted = false;
|
||||||
|
Promise.all([
|
||||||
|
this._createAudioInputTrack(this.props.selectedAudioInputId)
|
||||||
|
])
|
||||||
|
.catch(err => logger.warn('Failed to initialize preview tracks', err))
|
||||||
|
.then(() => {
|
||||||
|
this.props.dispatch(getAvailableDevices());
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if audio / video permissions were granted. Updates audio input and
|
||||||
|
* video input previews.
|
||||||
|
*
|
||||||
|
* @param {Object} prevProps - Previous props this component received.
|
||||||
|
* @returns {void}
|
||||||
|
*/
|
||||||
|
componentDidUpdate(prevProps: IProps) {
|
||||||
|
if (prevProps.selectedAudioInputId
|
||||||
|
!== this.props.selectedAudioInputId) {
|
||||||
|
this._createAudioInputTrack(this.props.selectedAudioInputId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Ensure preview tracks are destroyed to prevent continued use.
|
||||||
|
*
|
||||||
|
* @inheritdoc
|
||||||
|
*/
|
||||||
|
componentWillUnmount() {
|
||||||
|
this._unMounted = true;
|
||||||
|
this._disposeAudioInputPreview();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Implements React's {@link Component#render()}.
|
||||||
|
*
|
||||||
|
* @inheritdoc
|
||||||
|
*/
|
||||||
|
render() {
|
||||||
|
const {
|
||||||
|
classes,
|
||||||
|
hasAudioPermission,
|
||||||
|
hideAudioInputPreview,
|
||||||
|
hideAudioOutputPreview,
|
||||||
|
hideDeviceHIDContainer,
|
||||||
|
hideNoiseSuppression,
|
||||||
|
noiseSuppressionEnabled,
|
||||||
|
selectedAudioOutputId,
|
||||||
|
t
|
||||||
|
} = this.props;
|
||||||
|
const { audioInput, audioOutput } = this._getSelectors();
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className = { classes.container }>
|
||||||
|
<div
|
||||||
|
aria-live = 'polite'
|
||||||
|
className = { classes.inputContainer }>
|
||||||
|
{this._renderSelector(audioInput)}
|
||||||
|
</div>
|
||||||
|
{!hideAudioInputPreview && hasAudioPermission
|
||||||
|
&& <AudioInputPreview
|
||||||
|
track = { this.state.previewAudioTrack } />}
|
||||||
|
<div
|
||||||
|
aria-live = 'polite'
|
||||||
|
className = { classes.outputContainer }>
|
||||||
|
{this._renderSelector(audioOutput)}
|
||||||
|
{!hideAudioOutputPreview && hasAudioPermission
|
||||||
|
&& <AudioOutputPreview
|
||||||
|
className = { classes.outputButton }
|
||||||
|
deviceId = { selectedAudioOutputId } />}
|
||||||
|
</div>
|
||||||
|
{!hideNoiseSuppression && (
|
||||||
|
<div className = { classes.noiseSuppressionContainer }>
|
||||||
|
<Checkbox
|
||||||
|
checked = { noiseSuppressionEnabled }
|
||||||
|
label = { t('toolbar.enableNoiseSuppression') }
|
||||||
|
// eslint-disable-next-line react/jsx-no-bind
|
||||||
|
onChange = { () => super._onChange({
|
||||||
|
noiseSuppressionEnabled: !noiseSuppressionEnabled
|
||||||
|
}) } />
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
{!hideDeviceHIDContainer
|
||||||
|
&& <DeviceHidContainer />}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates the JitsiTrack for the audio input preview.
|
||||||
|
*
|
||||||
|
* @param {string} deviceId - The id of audio input device to preview.
|
||||||
|
* @private
|
||||||
|
* @returns {void}
|
||||||
|
*/
|
||||||
|
_createAudioInputTrack(deviceId: string) {
|
||||||
|
const { hideAudioInputPreview } = this.props;
|
||||||
|
|
||||||
|
if (hideAudioInputPreview) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
return this._disposeAudioInputPreview()
|
||||||
|
.then(() => createLocalTrack('audio', deviceId, 5000))
|
||||||
|
.then(jitsiLocalTrack => {
|
||||||
|
if (this._unMounted) {
|
||||||
|
jitsiLocalTrack.dispose();
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.setState({
|
||||||
|
previewAudioTrack: jitsiLocalTrack
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.setState({
|
||||||
|
previewAudioTrack: null
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Utility function for disposing the current audio input preview.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @returns {Promise}
|
||||||
|
*/
|
||||||
|
_disposeAudioInputPreview(): Promise<any> {
|
||||||
|
return this.state.previewAudioTrack
|
||||||
|
? this.state.previewAudioTrack.dispose() : Promise.resolve();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a DeviceSelector instance based on the passed in configuration.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Object} deviceSelectorProps - The props for the DeviceSelector.
|
||||||
|
* @returns {ReactElement}
|
||||||
|
*/
|
||||||
|
_renderSelector(deviceSelectorProps: any) {
|
||||||
|
return deviceSelectorProps ? (
|
||||||
|
<DeviceSelector
|
||||||
|
{ ...deviceSelectorProps }
|
||||||
|
key = { deviceSelectorProps.id } />
|
||||||
|
) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns object configurations for audio input and output.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @returns {Object} Configurations.
|
||||||
|
*/
|
||||||
|
_getSelectors() {
|
||||||
|
const { availableDevices, hasAudioPermission } = this.props;
|
||||||
|
|
||||||
|
const audioInput = {
|
||||||
|
devices: availableDevices.audioInput,
|
||||||
|
hasPermission: hasAudioPermission,
|
||||||
|
icon: 'icon-microphone',
|
||||||
|
isDisabled: this.props.disableAudioInputChange || this.props.disableDeviceChange,
|
||||||
|
key: 'audioInput',
|
||||||
|
id: 'audioInput',
|
||||||
|
label: 'settings.selectMic',
|
||||||
|
onSelect: (selectedAudioInputId: string) => super._onChange({ selectedAudioInputId }),
|
||||||
|
selectedDeviceId: this.state.previewAudioTrack
|
||||||
|
? this.state.previewAudioTrack.getDeviceId() : this.props.selectedAudioInputId
|
||||||
|
};
|
||||||
|
let audioOutput;
|
||||||
|
|
||||||
|
if (!this.props.hideAudioOutputSelect) {
|
||||||
|
audioOutput = {
|
||||||
|
devices: availableDevices.audioOutput,
|
||||||
|
hasPermission: hasAudioPermission,
|
||||||
|
icon: 'icon-speaker',
|
||||||
|
isDisabled: this.props.disableDeviceChange,
|
||||||
|
key: 'audioOutput',
|
||||||
|
id: 'audioOutput',
|
||||||
|
label: 'settings.selectAudioOutput',
|
||||||
|
onSelect: (selectedAudioOutputId: string) => super._onChange({ selectedAudioOutputId }),
|
||||||
|
selectedDeviceId: this.props.selectedAudioOutputId
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
return { audioInput,
|
||||||
|
audioOutput };
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const mapStateToProps = (state: IReduxState) => {
|
||||||
|
return {
|
||||||
|
availableDevices: state['features/base/devices'].availableDevices ?? {}
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
export default connect(mapStateToProps)(withStyles(styles)(translate(AudioDevicesSelection)));
|
|
@ -1,150 +0,0 @@
|
||||||
/* @flow */
|
|
||||||
|
|
||||||
import React, { Component } from 'react';
|
|
||||||
|
|
||||||
import JitsiMeetJS from '../../base/lib-jitsi-meet/_';
|
|
||||||
|
|
||||||
const JitsiTrackEvents = JitsiMeetJS.events.track;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The type of the React {@code Component} props of {@link AudioInputPreview}.
|
|
||||||
*/
|
|
||||||
type Props = {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The JitsiLocalTrack to show an audio level meter for.
|
|
||||||
*/
|
|
||||||
track: Object
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The type of the React {@code Component} props of {@link AudioInputPreview}.
|
|
||||||
*/
|
|
||||||
type State = {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The current audio input level being received, from 0 to 1.
|
|
||||||
*/
|
|
||||||
audioLevel: number
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* React component for displaying a audio level meter for a JitsiLocalTrack.
|
|
||||||
*/
|
|
||||||
class AudioInputPreview extends Component<Props, State> {
|
|
||||||
/**
|
|
||||||
* Initializes a new AudioInputPreview instance.
|
|
||||||
*
|
|
||||||
* @param {Object} props - The read-only React Component props with which
|
|
||||||
* the new instance is to be initialized.
|
|
||||||
*/
|
|
||||||
constructor(props: Props) {
|
|
||||||
super(props);
|
|
||||||
|
|
||||||
this.state = {
|
|
||||||
audioLevel: 0
|
|
||||||
};
|
|
||||||
|
|
||||||
this._updateAudioLevel = this._updateAudioLevel.bind(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Starts listening for audio level updates after the initial render.
|
|
||||||
*
|
|
||||||
* @inheritdoc
|
|
||||||
* @returns {void}
|
|
||||||
*/
|
|
||||||
componentDidMount() {
|
|
||||||
this._listenForAudioUpdates(this.props.track);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Stops listening for audio level updates on the old track and starts
|
|
||||||
* listening instead on the new track.
|
|
||||||
*
|
|
||||||
* @inheritdoc
|
|
||||||
* @returns {void}
|
|
||||||
*/
|
|
||||||
componentDidUpdate(prevProps: Props) {
|
|
||||||
if (prevProps.track !== this.props.track) {
|
|
||||||
this._listenForAudioUpdates(this.props.track);
|
|
||||||
this._updateAudioLevel(0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Unsubscribe from audio level updates.
|
|
||||||
*
|
|
||||||
* @inheritdoc
|
|
||||||
* @returns {void}
|
|
||||||
*/
|
|
||||||
componentWillUnmount() {
|
|
||||||
this._stopListeningForAudioUpdates();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Implements React's {@link Component#render()}.
|
|
||||||
*
|
|
||||||
* @inheritdoc
|
|
||||||
* @returns {ReactElement}
|
|
||||||
*/
|
|
||||||
render() {
|
|
||||||
const audioMeterFill = {
|
|
||||||
width: `${Math.floor(this.state.audioLevel * 100)}%`
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className = 'audio-input-preview' >
|
|
||||||
<div
|
|
||||||
className = 'audio-input-preview-level'
|
|
||||||
style = { audioMeterFill } />
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Starts listening for audio level updates from the library.
|
|
||||||
*
|
|
||||||
* @param {JitstiLocalTrack} track - The track to listen to for audio level
|
|
||||||
* updates.
|
|
||||||
* @private
|
|
||||||
* @returns {void}
|
|
||||||
*/
|
|
||||||
_listenForAudioUpdates(track) {
|
|
||||||
this._stopListeningForAudioUpdates();
|
|
||||||
|
|
||||||
track && track.on(
|
|
||||||
JitsiTrackEvents.TRACK_AUDIO_LEVEL_CHANGED,
|
|
||||||
this._updateAudioLevel);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Stops listening to further updates from the current track.
|
|
||||||
*
|
|
||||||
* @private
|
|
||||||
* @returns {void}
|
|
||||||
*/
|
|
||||||
_stopListeningForAudioUpdates() {
|
|
||||||
this.props.track && this.props.track.off(
|
|
||||||
JitsiTrackEvents.TRACK_AUDIO_LEVEL_CHANGED,
|
|
||||||
this._updateAudioLevel);
|
|
||||||
}
|
|
||||||
|
|
||||||
_updateAudioLevel: (number) => void;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Updates the internal state of the last know audio level. The level should
|
|
||||||
* be between 0 and 1, as the level will be used as a percentage out of 1.
|
|
||||||
*
|
|
||||||
* @param {number} audioLevel - The new audio level for the track.
|
|
||||||
* @private
|
|
||||||
* @returns {void}
|
|
||||||
*/
|
|
||||||
_updateAudioLevel(audioLevel) {
|
|
||||||
this.setState({
|
|
||||||
audioLevel
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default AudioInputPreview;
|
|
|
@ -0,0 +1,103 @@
|
||||||
|
import React, { useEffect, useState } from 'react';
|
||||||
|
import { makeStyles } from 'tss-react/mui';
|
||||||
|
|
||||||
|
// @ts-ignore
|
||||||
|
import JitsiMeetJS from '../../base/lib-jitsi-meet/_.web';
|
||||||
|
|
||||||
|
const JitsiTrackEvents = JitsiMeetJS.events.track;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The type of the React {@code Component} props of {@link AudioInputPreview}.
|
||||||
|
*/
|
||||||
|
interface IProps {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The JitsiLocalTrack to show an audio level meter for.
|
||||||
|
*/
|
||||||
|
track: any;
|
||||||
|
}
|
||||||
|
|
||||||
|
const useStyles = makeStyles()(theme => {
|
||||||
|
return {
|
||||||
|
container: {
|
||||||
|
display: 'flex'
|
||||||
|
},
|
||||||
|
|
||||||
|
section: {
|
||||||
|
flex: 1,
|
||||||
|
height: '4px',
|
||||||
|
borderRadius: '1px',
|
||||||
|
backgroundColor: theme.palette.ui04,
|
||||||
|
marginRight: theme.spacing(1),
|
||||||
|
|
||||||
|
'&:last-of-type': {
|
||||||
|
marginRight: 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
activeSection: {
|
||||||
|
backgroundColor: theme.palette.success01
|
||||||
|
}
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
const NO_OF_PREVIEW_SECTIONS = 11;
|
||||||
|
|
||||||
|
const AudioInputPreview = (props: IProps) => {
|
||||||
|
const [ audioLevel, setAudioLevel ] = useState(0);
|
||||||
|
const { classes, cx } = useStyles();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Starts listening for audio level updates from the library.
|
||||||
|
*
|
||||||
|
* @param {JitsiLocalTrack} track - The track to listen to for audio level
|
||||||
|
* updates.
|
||||||
|
* @private
|
||||||
|
* @returns {void}
|
||||||
|
*/
|
||||||
|
function _listenForAudioUpdates(track: any) {
|
||||||
|
_stopListeningForAudioUpdates();
|
||||||
|
|
||||||
|
track?.on(
|
||||||
|
JitsiTrackEvents.TRACK_AUDIO_LEVEL_CHANGED,
|
||||||
|
setAudioLevel);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Stops listening to further updates from the current track.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @returns {void}
|
||||||
|
*/
|
||||||
|
function _stopListeningForAudioUpdates() {
|
||||||
|
props.track?.off(
|
||||||
|
JitsiTrackEvents.TRACK_AUDIO_LEVEL_CHANGED,
|
||||||
|
setAudioLevel);
|
||||||
|
}
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
_listenForAudioUpdates(props.track);
|
||||||
|
|
||||||
|
return _stopListeningForAudioUpdates;
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
_listenForAudioUpdates(props.track);
|
||||||
|
setAudioLevel(0);
|
||||||
|
}, [ props.track ]);
|
||||||
|
|
||||||
|
const audioMeterFill = Math.ceil(Math.floor(audioLevel * 100) / (100 / NO_OF_PREVIEW_SECTIONS));
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className = { classes.container } >
|
||||||
|
{new Array(NO_OF_PREVIEW_SECTIONS).fill(0)
|
||||||
|
.map((_, idx) =>
|
||||||
|
(<div
|
||||||
|
className = { cx(classes.section, idx < audioMeterFill && classes.activeSection) }
|
||||||
|
key = { idx } />)
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default AudioInputPreview;
|
|
@ -1,35 +1,38 @@
|
||||||
/* @flow */
|
|
||||||
|
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
|
import { WithTranslation } from 'react-i18next';
|
||||||
|
|
||||||
import { translate } from '../../base/i18n/functions';
|
import { translate } from '../../base/i18n/functions';
|
||||||
import Audio from '../../base/media/components/Audio';
|
// eslint-disable-next-line lines-around-comment
|
||||||
|
// @ts-ignore
|
||||||
|
import Audio from '../../base/media/components/Audio.web';
|
||||||
|
import Button from '../../base/ui/components/web/Button';
|
||||||
|
import { BUTTON_TYPES } from '../../base/ui/constants.any';
|
||||||
|
|
||||||
const TEST_SOUND_PATH = 'sounds/ring.mp3';
|
const TEST_SOUND_PATH = 'sounds/ring.mp3';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The type of the React {@code Component} props of {@link AudioOutputPreview}.
|
* The type of the React {@code Component} props of {@link AudioOutputPreview}.
|
||||||
*/
|
*/
|
||||||
type Props = {
|
interface IProps extends WithTranslation {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Button className.
|
||||||
|
*/
|
||||||
|
className?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The device id of the audio output device to use.
|
* The device id of the audio output device to use.
|
||||||
*/
|
*/
|
||||||
deviceId: string,
|
deviceId: string;
|
||||||
|
}
|
||||||
/**
|
|
||||||
* Invoked to obtain translated strings.
|
|
||||||
*/
|
|
||||||
t: Function
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* React component for playing a test sound through a specified audio device.
|
* React component for playing a test sound through a specified audio device.
|
||||||
*
|
*
|
||||||
* @augments Component
|
* @augments Component
|
||||||
*/
|
*/
|
||||||
class AudioOutputPreview extends Component<Props> {
|
class AudioOutputPreview extends Component<IProps> {
|
||||||
_audioElement: ?Object;
|
_audioElement: HTMLAudioElement | null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initializes a new AudioOutputPreview instance.
|
* Initializes a new AudioOutputPreview instance.
|
||||||
|
@ -37,7 +40,7 @@ class AudioOutputPreview extends Component<Props> {
|
||||||
* @param {Object} props - The read-only React Component props with which
|
* @param {Object} props - The read-only React Component props with which
|
||||||
* the new instance is to be initialized.
|
* the new instance is to be initialized.
|
||||||
*/
|
*/
|
||||||
constructor(props: Props) {
|
constructor(props: IProps) {
|
||||||
super(props);
|
super(props);
|
||||||
|
|
||||||
this._audioElement = null;
|
this._audioElement = null;
|
||||||
|
@ -66,24 +69,21 @@ class AudioOutputPreview extends Component<Props> {
|
||||||
*/
|
*/
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div className = 'audio-output-preview'>
|
<>
|
||||||
<a
|
<Button
|
||||||
aria-label = { this.props.t('deviceSelection.testAudio') }
|
accessibilityLabel = { this.props.t('deviceSelection.testAudio') }
|
||||||
|
className = { this.props.className }
|
||||||
|
labelKey = 'deviceSelection.testAudio'
|
||||||
onClick = { this._onClick }
|
onClick = { this._onClick }
|
||||||
onKeyPress = { this._onKeyPress }
|
onKeyPress = { this._onKeyPress }
|
||||||
role = 'button'
|
type = { BUTTON_TYPES.SECONDARY } />
|
||||||
tabIndex = { 0 }>
|
|
||||||
{ this.props.t('deviceSelection.testAudio') }
|
|
||||||
</a>
|
|
||||||
<Audio
|
<Audio
|
||||||
setRef = { this._audioElementReady }
|
setRef = { this._audioElementReady }
|
||||||
src = { TEST_SOUND_PATH } />
|
src = { TEST_SOUND_PATH } />
|
||||||
</div>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
_audioElementReady: (Object) => void;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the instance variable for the component's audio element so it can be
|
* Sets the instance variable for the component's audio element so it can be
|
||||||
* accessed directly.
|
* accessed directly.
|
||||||
|
@ -92,14 +92,12 @@ class AudioOutputPreview extends Component<Props> {
|
||||||
* @private
|
* @private
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
_audioElementReady(element: Object) {
|
_audioElementReady(element: HTMLAudioElement) {
|
||||||
this._audioElement = element;
|
this._audioElement = element;
|
||||||
|
|
||||||
this._setAudioSink();
|
this._setAudioSink();
|
||||||
}
|
}
|
||||||
|
|
||||||
_onClick: () => void;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Plays a test sound.
|
* Plays a test sound.
|
||||||
*
|
*
|
||||||
|
@ -107,12 +105,9 @@ class AudioOutputPreview extends Component<Props> {
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
_onClick() {
|
_onClick() {
|
||||||
this._audioElement
|
this._audioElement?.play();
|
||||||
&& this._audioElement.play();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_onKeyPress: (Object) => void;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* KeyPress handler for accessibility.
|
* KeyPress handler for accessibility.
|
||||||
*
|
*
|
||||||
|
@ -120,7 +115,7 @@ class AudioOutputPreview extends Component<Props> {
|
||||||
*
|
*
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
_onKeyPress(e) {
|
_onKeyPress(e: React.KeyboardEvent) {
|
||||||
if (e.key === ' ' || e.key === 'Enter') {
|
if (e.key === ' ' || e.key === 'Enter') {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
this._onClick();
|
this._onClick();
|
||||||
|
@ -135,7 +130,7 @@ class AudioOutputPreview extends Component<Props> {
|
||||||
*/
|
*/
|
||||||
_setAudioSink() {
|
_setAudioSink() {
|
||||||
this._audioElement
|
this._audioElement
|
||||||
&& this.props.deviceId
|
&& this.props.deviceId // @ts-ignore
|
||||||
&& this._audioElement.setSinkId(this.props.deviceId);
|
&& this._audioElement.setSinkId(this.props.deviceId);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -5,33 +5,40 @@ import { makeStyles } from 'tss-react/mui';
|
||||||
|
|
||||||
import Icon from '../../base/icons/components/Icon';
|
import Icon from '../../base/icons/components/Icon';
|
||||||
import { IconTrash } from '../../base/icons/svg';
|
import { IconTrash } from '../../base/icons/svg';
|
||||||
|
import { withPixelLineHeight } from '../../base/styles/functions.web';
|
||||||
import Button from '../../base/ui/components/web/Button';
|
import Button from '../../base/ui/components/web/Button';
|
||||||
import { BUTTON_TYPES } from '../../base/ui/constants.any';
|
import { BUTTON_TYPES } from '../../base/ui/constants.any';
|
||||||
import { closeHidDevice, requestHidDevice } from '../../web-hid/actions';
|
import { closeHidDevice, requestHidDevice } from '../../web-hid/actions';
|
||||||
import { getDeviceInfo, shouldRequestHIDDevice } from '../../web-hid/functions';
|
import { getDeviceInfo, shouldRequestHIDDevice } from '../../web-hid/functions';
|
||||||
|
|
||||||
const useStyles = makeStyles()(() => {
|
const useStyles = makeStyles()(theme => {
|
||||||
return {
|
return {
|
||||||
callControlContainer: {
|
callControlContainer: {
|
||||||
marginTop: '8px',
|
display: 'flex',
|
||||||
marginBottom: '16px',
|
flexDirection: 'column',
|
||||||
fontSize: '14px',
|
alignItems: 'flex-start'
|
||||||
'> label': {
|
|
||||||
display: 'block',
|
|
||||||
marginBottom: '20px'
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
label: {
|
||||||
|
...withPixelLineHeight(theme.typography.bodyShortRegular),
|
||||||
|
color: theme.palette.text01,
|
||||||
|
marginBottom: theme.spacing(2)
|
||||||
|
},
|
||||||
|
|
||||||
deviceRow: {
|
deviceRow: {
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
justifyContent: 'space-between'
|
justifyContent: 'space-between'
|
||||||
},
|
},
|
||||||
|
|
||||||
deleteDevice: {
|
deleteDevice: {
|
||||||
cursor: 'pointer',
|
cursor: 'pointer',
|
||||||
textAlign: 'center'
|
textAlign: 'center'
|
||||||
},
|
},
|
||||||
|
|
||||||
headerConnectedDevice: {
|
headerConnectedDevice: {
|
||||||
fontWeight: 600
|
fontWeight: 600
|
||||||
},
|
},
|
||||||
|
|
||||||
hidContainer: {
|
hidContainer: {
|
||||||
'> span': {
|
'> span': {
|
||||||
marginLeft: '16px'
|
marginLeft: '16px'
|
||||||
|
@ -66,7 +73,7 @@ function DeviceHidContainer() {
|
||||||
className = { classes.callControlContainer }
|
className = { classes.callControlContainer }
|
||||||
key = 'callControl'>
|
key = 'callControl'>
|
||||||
<label
|
<label
|
||||||
className = 'device-selector-label'
|
className = { classes.label }
|
||||||
htmlFor = 'callControl'>
|
htmlFor = 'callControl'>
|
||||||
{t('deviceSelection.hid.callControl')}
|
{t('deviceSelection.hid.callControl')}
|
||||||
</label>
|
</label>
|
||||||
|
@ -77,7 +84,6 @@ function DeviceHidContainer() {
|
||||||
key = 'request-control-btn'
|
key = 'request-control-btn'
|
||||||
label = { t('deviceSelection.hid.pairDevice') }
|
label = { t('deviceSelection.hid.pairDevice') }
|
||||||
onClick = { onRequestControl }
|
onClick = { onRequestControl }
|
||||||
size = 'small'
|
|
||||||
type = { BUTTON_TYPES.SECONDARY } />
|
type = { BUTTON_TYPES.SECONDARY } />
|
||||||
)}
|
)}
|
||||||
{!showRequestDeviceInfo && (
|
{!showRequestDeviceInfo && (
|
||||||
|
|
|
@ -1,429 +0,0 @@
|
||||||
// @flow
|
|
||||||
|
|
||||||
import React from 'react';
|
|
||||||
|
|
||||||
import { getAvailableDevices } from '../../base/devices/actions.web';
|
|
||||||
import AbstractDialogTab, {
|
|
||||||
type Props as AbstractDialogTabProps
|
|
||||||
} from '../../base/dialog/components/web/AbstractDialogTab';
|
|
||||||
import { translate } from '../../base/i18n/functions';
|
|
||||||
import { createLocalTrack } from '../../base/lib-jitsi-meet/functions';
|
|
||||||
import logger from '../logger';
|
|
||||||
|
|
||||||
import AudioInputPreview from './AudioInputPreview';
|
|
||||||
import AudioOutputPreview from './AudioOutputPreview';
|
|
||||||
import DeviceHidContainer from './DeviceHidContainer.web';
|
|
||||||
import DeviceSelector from './DeviceSelector';
|
|
||||||
import VideoInputPreview from './VideoInputPreview';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The type of the React {@code Component} props of {@link DeviceSelection}.
|
|
||||||
*/
|
|
||||||
export type Props = {
|
|
||||||
...$Exact<AbstractDialogTabProps>,
|
|
||||||
|
|
||||||
/**
|
|
||||||
* All known audio and video devices split by type. This prop comes from
|
|
||||||
* the app state.
|
|
||||||
*/
|
|
||||||
availableDevices: Object,
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Whether or not the audio selector can be interacted with. If true,
|
|
||||||
* the audio input selector will be rendered as disabled. This is
|
|
||||||
* specifically used to prevent audio device changing in Firefox, which
|
|
||||||
* currently does not work due to a browser-side regression.
|
|
||||||
*/
|
|
||||||
disableAudioInputChange: boolean,
|
|
||||||
|
|
||||||
/**
|
|
||||||
* True if device changing is configured to be disallowed. Selectors
|
|
||||||
* will display as disabled.
|
|
||||||
*/
|
|
||||||
disableDeviceChange: boolean,
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Whether video input dropdown should be enabled or not.
|
|
||||||
*/
|
|
||||||
disableVideoInputSelect: boolean,
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Whether or not the audio permission was granted.
|
|
||||||
*/
|
|
||||||
hasAudioPermission: boolean,
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Whether or not the audio permission was granted.
|
|
||||||
*/
|
|
||||||
hasVideoPermission: boolean,
|
|
||||||
|
|
||||||
/**
|
|
||||||
* If true, the audio meter will not display. Necessary for browsers or
|
|
||||||
* configurations that do not support local stats to prevent a
|
|
||||||
* non-responsive mic preview from displaying.
|
|
||||||
*/
|
|
||||||
hideAudioInputPreview: boolean,
|
|
||||||
|
|
||||||
/**
|
|
||||||
* If true, the button to play a test sound on the selected speaker will not be displayed.
|
|
||||||
* This needs to be hidden on browsers that do not support selecting an audio output device.
|
|
||||||
*/
|
|
||||||
hideAudioOutputPreview: boolean,
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Whether or not the audio output source selector should display. If
|
|
||||||
* true, the audio output selector and test audio link will not be
|
|
||||||
* rendered.
|
|
||||||
*/
|
|
||||||
hideAudioOutputSelect: boolean,
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Whether or not the hid device container should display.
|
|
||||||
*/
|
|
||||||
hideDeviceHIDContainer: boolean,
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Whether video input preview should be displayed or not.
|
|
||||||
* (In the case of iOS Safari).
|
|
||||||
*/
|
|
||||||
hideVideoInputPreview: boolean,
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The id of the audio input device to preview.
|
|
||||||
*/
|
|
||||||
selectedAudioInputId: string,
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The id of the audio output device to preview.
|
|
||||||
*/
|
|
||||||
selectedAudioOutputId: string,
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The id of the video input device to preview.
|
|
||||||
*/
|
|
||||||
selectedVideoInputId: string,
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Invoked to obtain translated strings.
|
|
||||||
*/
|
|
||||||
t: Function
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The type of the React {@code Component} state of {@link DeviceSelection}.
|
|
||||||
*/
|
|
||||||
type State = {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The JitsiTrack to use for previewing audio input.
|
|
||||||
*/
|
|
||||||
previewAudioTrack: ?Object,
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The JitsiTrack to use for previewing video input.
|
|
||||||
*/
|
|
||||||
previewVideoTrack: ?Object,
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The error message from trying to use a video input device.
|
|
||||||
*/
|
|
||||||
previewVideoTrackError: ?string
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* React {@code Component} for previewing audio and video input/output devices.
|
|
||||||
*
|
|
||||||
* @augments Component
|
|
||||||
*/
|
|
||||||
class DeviceSelection extends AbstractDialogTab<Props, State> {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Whether current component is mounted or not.
|
|
||||||
*
|
|
||||||
* In component did mount we start a Promise to create tracks and
|
|
||||||
* set the tracks in the state, if we unmount the component in the meanwhile
|
|
||||||
* tracks will be created and will never been disposed (dispose tracks is
|
|
||||||
* in componentWillUnmount). When tracks are created and component is
|
|
||||||
* unmounted we dispose the tracks.
|
|
||||||
*/
|
|
||||||
_unMounted: boolean;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Initializes a new DeviceSelection instance.
|
|
||||||
*
|
|
||||||
* @param {Object} props - The read-only React Component props with which
|
|
||||||
* the new instance is to be initialized.
|
|
||||||
*/
|
|
||||||
constructor(props: Props) {
|
|
||||||
super(props);
|
|
||||||
|
|
||||||
this.state = {
|
|
||||||
previewAudioTrack: null,
|
|
||||||
previewVideoTrack: null,
|
|
||||||
previewVideoTrackError: null
|
|
||||||
};
|
|
||||||
this._unMounted = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Generate the initial previews for audio input and video input.
|
|
||||||
*
|
|
||||||
* @inheritdoc
|
|
||||||
*/
|
|
||||||
componentDidMount() {
|
|
||||||
this._unMounted = false;
|
|
||||||
Promise.all([
|
|
||||||
this._createAudioInputTrack(this.props.selectedAudioInputId),
|
|
||||||
this._createVideoInputTrack(this.props.selectedVideoInputId)
|
|
||||||
])
|
|
||||||
.catch(err => logger.warn('Failed to initialize preview tracks', err))
|
|
||||||
.then(() => getAvailableDevices());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Checks if audio / video permissions were granted. Updates audio input and
|
|
||||||
* video input previews.
|
|
||||||
*
|
|
||||||
* @param {Object} prevProps - Previous props this component received.
|
|
||||||
* @returns {void}
|
|
||||||
*/
|
|
||||||
componentDidUpdate(prevProps) {
|
|
||||||
if (prevProps.selectedAudioInputId
|
|
||||||
!== this.props.selectedAudioInputId) {
|
|
||||||
this._createAudioInputTrack(this.props.selectedAudioInputId);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (prevProps.selectedVideoInputId
|
|
||||||
!== this.props.selectedVideoInputId) {
|
|
||||||
this._createVideoInputTrack(this.props.selectedVideoInputId);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Ensure preview tracks are destroyed to prevent continued use.
|
|
||||||
*
|
|
||||||
* @inheritdoc
|
|
||||||
*/
|
|
||||||
componentWillUnmount() {
|
|
||||||
this._unMounted = true;
|
|
||||||
this._disposeAudioInputPreview();
|
|
||||||
this._disposeVideoInputPreview();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Implements React's {@link Component#render()}.
|
|
||||||
*
|
|
||||||
* @inheritdoc
|
|
||||||
*/
|
|
||||||
render() {
|
|
||||||
const {
|
|
||||||
hideAudioInputPreview,
|
|
||||||
hideAudioOutputPreview,
|
|
||||||
hideDeviceHIDContainer,
|
|
||||||
hideVideoInputPreview,
|
|
||||||
selectedAudioOutputId
|
|
||||||
} = this.props;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className = { `device-selection${hideVideoInputPreview ? ' video-hidden' : ''}` }>
|
|
||||||
<div className = 'device-selection-column column-video'>
|
|
||||||
{ !hideVideoInputPreview
|
|
||||||
&& <div className = 'device-selection-video-container'>
|
|
||||||
<VideoInputPreview
|
|
||||||
error = { this.state.previewVideoTrackError }
|
|
||||||
track = { this.state.previewVideoTrack } />
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
{ !hideAudioInputPreview
|
|
||||||
&& <AudioInputPreview
|
|
||||||
track = { this.state.previewAudioTrack } /> }
|
|
||||||
</div>
|
|
||||||
<div className = 'device-selection-column column-selectors'>
|
|
||||||
<div
|
|
||||||
aria-live = 'polite all'
|
|
||||||
className = 'device-selectors'>
|
|
||||||
{ this._renderSelectors() }
|
|
||||||
</div>
|
|
||||||
{ !hideAudioOutputPreview
|
|
||||||
&& <AudioOutputPreview
|
|
||||||
deviceId = { selectedAudioOutputId } /> }
|
|
||||||
{ !hideDeviceHIDContainer
|
|
||||||
&& <DeviceHidContainer /> }
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates the JitiTrack for the audio input preview.
|
|
||||||
*
|
|
||||||
* @param {string} deviceId - The id of audio input device to preview.
|
|
||||||
* @private
|
|
||||||
* @returns {void}
|
|
||||||
*/
|
|
||||||
_createAudioInputTrack(deviceId) {
|
|
||||||
const { hideAudioInputPreview } = this.props;
|
|
||||||
|
|
||||||
if (hideAudioInputPreview) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
return this._disposeAudioInputPreview()
|
|
||||||
.then(() => createLocalTrack('audio', deviceId, 5000))
|
|
||||||
.then(jitsiLocalTrack => {
|
|
||||||
if (this._unMounted) {
|
|
||||||
jitsiLocalTrack.dispose();
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.setState({
|
|
||||||
previewAudioTrack: jitsiLocalTrack
|
|
||||||
});
|
|
||||||
})
|
|
||||||
.catch(() => {
|
|
||||||
this.setState({
|
|
||||||
previewAudioTrack: null
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates the JitiTrack for the video input preview.
|
|
||||||
*
|
|
||||||
* @param {string} deviceId - The id of video device to preview.
|
|
||||||
* @private
|
|
||||||
* @returns {void}
|
|
||||||
*/
|
|
||||||
_createVideoInputTrack(deviceId) {
|
|
||||||
const { hideVideoInputPreview } = this.props;
|
|
||||||
|
|
||||||
if (hideVideoInputPreview) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
return this._disposeVideoInputPreview()
|
|
||||||
.then(() => createLocalTrack('video', deviceId, 5000))
|
|
||||||
.then(jitsiLocalTrack => {
|
|
||||||
if (!jitsiLocalTrack) {
|
|
||||||
return Promise.reject();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this._unMounted) {
|
|
||||||
jitsiLocalTrack.dispose();
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.setState({
|
|
||||||
previewVideoTrack: jitsiLocalTrack,
|
|
||||||
previewVideoTrackError: null
|
|
||||||
});
|
|
||||||
})
|
|
||||||
.catch(() => {
|
|
||||||
this.setState({
|
|
||||||
previewVideoTrack: null,
|
|
||||||
previewVideoTrackError:
|
|
||||||
this.props.t('deviceSelection.previewUnavailable')
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Utility function for disposing the current audio input preview.
|
|
||||||
*
|
|
||||||
* @private
|
|
||||||
* @returns {Promise}
|
|
||||||
*/
|
|
||||||
_disposeAudioInputPreview(): Promise<*> {
|
|
||||||
return this.state.previewAudioTrack
|
|
||||||
? this.state.previewAudioTrack.dispose() : Promise.resolve();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Utility function for disposing the current video input preview.
|
|
||||||
*
|
|
||||||
* @private
|
|
||||||
* @returns {Promise}
|
|
||||||
*/
|
|
||||||
_disposeVideoInputPreview(): Promise<*> {
|
|
||||||
return this.state.previewVideoTrack
|
|
||||||
? this.state.previewVideoTrack.dispose() : Promise.resolve();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates a DeviceSelector instance based on the passed in configuration.
|
|
||||||
*
|
|
||||||
* @private
|
|
||||||
* @param {Object} deviceSelectorProps - The props for the DeviceSelector.
|
|
||||||
* @returns {ReactElement}
|
|
||||||
*/
|
|
||||||
_renderSelector(deviceSelectorProps) {
|
|
||||||
return (
|
|
||||||
<div key = { deviceSelectorProps.label }>
|
|
||||||
<label
|
|
||||||
className = 'device-selector-label'
|
|
||||||
htmlFor = { deviceSelectorProps.id }>
|
|
||||||
{ this.props.t(deviceSelectorProps.label) }
|
|
||||||
</label>
|
|
||||||
<DeviceSelector { ...deviceSelectorProps } />
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates DeviceSelector instances for video output, audio input, and audio
|
|
||||||
* output.
|
|
||||||
*
|
|
||||||
* @private
|
|
||||||
* @returns {Array<ReactElement>} DeviceSelector instances.
|
|
||||||
*/
|
|
||||||
_renderSelectors() {
|
|
||||||
const { availableDevices, hasAudioPermission, hasVideoPermission } = this.props;
|
|
||||||
|
|
||||||
const configurations = [
|
|
||||||
{
|
|
||||||
devices: availableDevices.audioInput,
|
|
||||||
hasPermission: hasAudioPermission,
|
|
||||||
icon: 'icon-microphone',
|
|
||||||
isDisabled: this.props.disableAudioInputChange || this.props.disableDeviceChange,
|
|
||||||
key: 'audioInput',
|
|
||||||
id: 'audioInput',
|
|
||||||
label: 'settings.selectMic',
|
|
||||||
onSelect: selectedAudioInputId => super._onChange({ selectedAudioInputId }),
|
|
||||||
selectedDeviceId: this.state.previewAudioTrack
|
|
||||||
? this.state.previewAudioTrack.getDeviceId() : this.props.selectedAudioInputId
|
|
||||||
},
|
|
||||||
{
|
|
||||||
devices: availableDevices.videoInput,
|
|
||||||
hasPermission: hasVideoPermission,
|
|
||||||
icon: 'icon-camera',
|
|
||||||
isDisabled: this.props.disableVideoInputSelect || this.props.disableDeviceChange,
|
|
||||||
key: 'videoInput',
|
|
||||||
id: 'videoInput',
|
|
||||||
label: 'settings.selectCamera',
|
|
||||||
onSelect: selectedVideoInputId => super._onChange({ selectedVideoInputId }),
|
|
||||||
selectedDeviceId: this.state.previewVideoTrack
|
|
||||||
? this.state.previewVideoTrack.getDeviceId() : this.props.selectedVideoInputId
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
if (!this.props.hideAudioOutputSelect) {
|
|
||||||
configurations.push({
|
|
||||||
devices: availableDevices.audioOutput,
|
|
||||||
hasPermission: hasAudioPermission || hasVideoPermission,
|
|
||||||
icon: 'icon-speaker',
|
|
||||||
isDisabled: this.props.disableDeviceChange,
|
|
||||||
key: 'audioOutput',
|
|
||||||
id: 'audioOutput',
|
|
||||||
label: 'settings.selectAudioOutput',
|
|
||||||
onSelect: selectedAudioOutputId => super._onChange({ selectedAudioOutputId }),
|
|
||||||
selectedDeviceId: this.props.selectedAudioOutputId
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
return configurations.map(config => this._renderSelector(config));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default translate(DeviceSelection);
|
|
|
@ -1,58 +1,76 @@
|
||||||
/* @flow */
|
import { Theme } from '@mui/material';
|
||||||
|
import { withStyles } from '@mui/styles';
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
|
import { WithTranslation } from 'react-i18next';
|
||||||
|
|
||||||
import { translate } from '../../base/i18n/functions';
|
import { translate } from '../../base/i18n/functions';
|
||||||
|
import { withPixelLineHeight } from '../../base/styles/functions.web';
|
||||||
import Select from '../../base/ui/components/web/Select';
|
import Select from '../../base/ui/components/web/Select';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The type of the React {@code Component} props of {@link DeviceSelector}.
|
* The type of the React {@code Component} props of {@link DeviceSelector}.
|
||||||
*/
|
*/
|
||||||
type Props = {
|
interface IProps extends WithTranslation {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CSS classes object.
|
||||||
|
*/
|
||||||
|
classes: any;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* MediaDeviceInfos used for display in the select element.
|
* MediaDeviceInfos used for display in the select element.
|
||||||
*/
|
*/
|
||||||
devices: Array<Object>,
|
devices: Array<MediaDeviceInfo> | undefined;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If false, will return a selector with no selection options.
|
* If false, will return a selector with no selection options.
|
||||||
*/
|
*/
|
||||||
hasPermission: boolean,
|
hasPermission: boolean;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* CSS class for the icon to the left of the dropdown trigger.
|
* CSS class for the icon to the left of the dropdown trigger.
|
||||||
*/
|
*/
|
||||||
icon: string,
|
icon: string;
|
||||||
|
|
||||||
/**
|
|
||||||
* If true, will render the selector disabled with a default selection.
|
|
||||||
*/
|
|
||||||
isDisabled: boolean,
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The translation key to display as a menu label.
|
|
||||||
*/
|
|
||||||
label: string,
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The callback to invoke when a selection is made.
|
|
||||||
*/
|
|
||||||
onSelect: Function,
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The default device to display as selected.
|
|
||||||
*/
|
|
||||||
selectedDeviceId: string,
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Invoked to obtain translated strings.
|
|
||||||
*/
|
|
||||||
t: Function,
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The id of the dropdown element.
|
* The id of the dropdown element.
|
||||||
*/
|
*/
|
||||||
id: string
|
id: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If true, will render the selector disabled with a default selection.
|
||||||
|
*/
|
||||||
|
isDisabled: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The translation key to display as a menu label.
|
||||||
|
*/
|
||||||
|
label: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The callback to invoke when a selection is made.
|
||||||
|
*/
|
||||||
|
onSelect: Function;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The default device to display as selected.
|
||||||
|
*/
|
||||||
|
selectedDeviceId: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
const styles = (theme: Theme) => {
|
||||||
|
return {
|
||||||
|
textSelector: {
|
||||||
|
width: '100%',
|
||||||
|
boxSizing: 'border-box',
|
||||||
|
borderRadius: theme.shape.borderRadius,
|
||||||
|
backgroundColor: theme.palette.uiBackground,
|
||||||
|
padding: '10px 16px',
|
||||||
|
textAlign: 'center',
|
||||||
|
...withPixelLineHeight(theme.typography.bodyShortRegular),
|
||||||
|
border: `1px solid ${theme.palette.ui03}`
|
||||||
|
}
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -61,17 +79,18 @@ type Props = {
|
||||||
*
|
*
|
||||||
* @augments Component
|
* @augments Component
|
||||||
*/
|
*/
|
||||||
class DeviceSelector extends Component<Props> {
|
class DeviceSelector extends Component<IProps> {
|
||||||
/**
|
/**
|
||||||
* Initializes a new DeviceSelector instance.
|
* Initializes a new DeviceSelector instance.
|
||||||
*
|
*
|
||||||
* @param {Object} props - The read-only React Component props with which
|
* @param {Object} props - The read-only React Component props with which
|
||||||
* the new instance is to be initialized.
|
* the new instance is to be initialized.
|
||||||
*/
|
*/
|
||||||
constructor(props) {
|
constructor(props: IProps) {
|
||||||
super(props);
|
super(props);
|
||||||
|
|
||||||
this._onSelect = this._onSelect.bind(this);
|
this._onSelect = this._onSelect.bind(this);
|
||||||
|
this._createDropdown = this._createDropdown.bind(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -111,25 +130,6 @@ class DeviceSelector extends Component<Props> {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates a React Element for displaying the passed in text surrounded by
|
|
||||||
* two icons. The left icon is the icon class passed in through props and
|
|
||||||
* the right icon is AtlasKit ExpandIcon.
|
|
||||||
*
|
|
||||||
* @param {string} triggerText - The text to display within the element.
|
|
||||||
* @private
|
|
||||||
* @returns {ReactElement}
|
|
||||||
*/
|
|
||||||
_createDropdownTrigger(triggerText) {
|
|
||||||
return (
|
|
||||||
<div className = 'device-selector-trigger'>
|
|
||||||
<span className = 'device-selector-trigger-text'>
|
|
||||||
{ triggerText }
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a AKDropdownMenu Component using passed in props and options. If
|
* Creates a AKDropdownMenu Component using passed in props and options. If
|
||||||
* the dropdown needs to be disabled, then only the AKDropdownMenu trigger
|
* the dropdown needs to be disabled, then only the AKDropdownMenu trigger
|
||||||
|
@ -146,32 +146,30 @@ class DeviceSelector extends Component<Props> {
|
||||||
* @private
|
* @private
|
||||||
* @returns {ReactElement}
|
* @returns {ReactElement}
|
||||||
*/
|
*/
|
||||||
_createDropdown(options) {
|
_createDropdown(options: { defaultSelected?: MediaDeviceInfo; isDisabled: boolean;
|
||||||
|
items?: Array<{ label: string; value: string; }>; placeholder: string; }) {
|
||||||
const triggerText
|
const triggerText
|
||||||
= (options.defaultSelected && (options.defaultSelected.label || options.defaultSelected.deviceId))
|
= (options.defaultSelected && (options.defaultSelected.label || options.defaultSelected.deviceId))
|
||||||
|| options.placeholder;
|
|| options.placeholder;
|
||||||
const trigger = this._createDropdownTrigger(triggerText);
|
const { classes } = this.props;
|
||||||
|
|
||||||
if (options.isDisabled || !options.items.length) {
|
if (options.isDisabled || !options.items?.length) {
|
||||||
return (
|
return (
|
||||||
<div className = 'device-selector-trigger-disabled'>
|
<div className = { classes.textSelector }>
|
||||||
{ trigger }
|
{triggerText}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className = 'dropdown-menu'>
|
<Select
|
||||||
<Select
|
label = { this.props.t(this.props.label) }
|
||||||
onChange = { this._onSelect }
|
onChange = { this._onSelect }
|
||||||
options = { options.items }
|
options = { options.items }
|
||||||
value = { this.props.selectedDeviceId } />
|
value = { this.props.selectedDeviceId } />
|
||||||
</div>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
_onSelect: (Object) => void;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Invokes the passed in callback to notify of selection changes.
|
* Invokes the passed in callback to notify of selection changes.
|
||||||
*
|
*
|
||||||
|
@ -180,7 +178,7 @@ class DeviceSelector extends Component<Props> {
|
||||||
* @private
|
* @private
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
_onSelect(e) {
|
_onSelect(e: React.ChangeEvent<HTMLSelectElement>) {
|
||||||
const deviceId = e.target.value;
|
const deviceId = e.target.value;
|
||||||
|
|
||||||
if (this.props.selectedDeviceId !== deviceId) {
|
if (this.props.selectedDeviceId !== deviceId) {
|
||||||
|
@ -217,4 +215,4 @@ class DeviceSelector extends Component<Props> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default translate(DeviceSelector);
|
export default withStyles(styles)(translate(DeviceSelector));
|
|
@ -0,0 +1,368 @@
|
||||||
|
import { Theme } from '@mui/material';
|
||||||
|
import { withStyles } from '@mui/styles';
|
||||||
|
import React from 'react';
|
||||||
|
import { WithTranslation } from 'react-i18next';
|
||||||
|
import { connect } from 'react-redux';
|
||||||
|
|
||||||
|
import { IReduxState, IStore } from '../../app/types';
|
||||||
|
import { getAvailableDevices } from '../../base/devices/actions.web';
|
||||||
|
import AbstractDialogTab, {
|
||||||
|
type IProps as AbstractDialogTabProps
|
||||||
|
} from '../../base/dialog/components/web/AbstractDialogTab';
|
||||||
|
import { translate } from '../../base/i18n/functions';
|
||||||
|
import { createLocalTrack } from '../../base/lib-jitsi-meet/functions.web';
|
||||||
|
import Checkbox from '../../base/ui/components/web/Checkbox';
|
||||||
|
import Select from '../../base/ui/components/web/Select';
|
||||||
|
import { SS_DEFAULT_FRAME_RATE } from '../../settings/constants';
|
||||||
|
import logger from '../logger';
|
||||||
|
|
||||||
|
import DeviceSelector from './DeviceSelector.web';
|
||||||
|
import VideoInputPreview from './VideoInputPreview';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The type of the React {@code Component} props of {@link VideoDeviceSelection}.
|
||||||
|
*/
|
||||||
|
export interface IProps extends AbstractDialogTabProps, WithTranslation {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* All known audio and video devices split by type. This prop comes from
|
||||||
|
* the app state.
|
||||||
|
*/
|
||||||
|
availableDevices: { videoInput?: MediaDeviceInfo[]; };
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CSS classes object.
|
||||||
|
*/
|
||||||
|
classes: any;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The currently selected desktop share frame rate in the frame rate select dropdown.
|
||||||
|
*/
|
||||||
|
currentFramerate: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* All available desktop capture frame rates.
|
||||||
|
*/
|
||||||
|
desktopShareFramerates: Array<number>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* True if device changing is configured to be disallowed. Selectors
|
||||||
|
* will display as disabled.
|
||||||
|
*/
|
||||||
|
disableDeviceChange: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether video input dropdown should be enabled or not.
|
||||||
|
*/
|
||||||
|
disableVideoInputSelect: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Redux dispatch.
|
||||||
|
*/
|
||||||
|
dispatch: IStore['dispatch'];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether or not the audio permission was granted.
|
||||||
|
*/
|
||||||
|
hasVideoPermission: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether to hide the additional settings or not.
|
||||||
|
*/
|
||||||
|
hideAdditionalSettings: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether video input preview should be displayed or not.
|
||||||
|
* (In the case of iOS Safari).
|
||||||
|
*/
|
||||||
|
hideVideoInputPreview: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether or not the local video is flipped.
|
||||||
|
*/
|
||||||
|
localFlipX: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The id of the video input device to preview.
|
||||||
|
*/
|
||||||
|
selectedVideoInputId: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The type of the React {@code Component} state of {@link VideoDeviceSelection}.
|
||||||
|
*/
|
||||||
|
type State = {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The JitsiTrack to use for previewing video input.
|
||||||
|
*/
|
||||||
|
previewVideoTrack: any | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The error message from trying to use a video input device.
|
||||||
|
*/
|
||||||
|
previewVideoTrackError: string | null;
|
||||||
|
};
|
||||||
|
|
||||||
|
const styles = (theme: Theme) => {
|
||||||
|
return {
|
||||||
|
container: {
|
||||||
|
display: 'flex',
|
||||||
|
flexDirection: 'column' as const,
|
||||||
|
padding: '0 2px',
|
||||||
|
width: '100%'
|
||||||
|
},
|
||||||
|
|
||||||
|
checkboxContainer: {
|
||||||
|
margin: `${theme.spacing(4)} 0`
|
||||||
|
}
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* React {@code Component} for previewing audio and video input/output devices.
|
||||||
|
*
|
||||||
|
* @augments Component
|
||||||
|
*/
|
||||||
|
class VideoDeviceSelection extends AbstractDialogTab<IProps, State> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether current component is mounted or not.
|
||||||
|
*
|
||||||
|
* In component did mount we start a Promise to create tracks and
|
||||||
|
* set the tracks in the state, if we unmount the component in the meanwhile
|
||||||
|
* tracks will be created and will never been disposed (dispose tracks is
|
||||||
|
* in componentWillUnmount). When tracks are created and component is
|
||||||
|
* unmounted we dispose the tracks.
|
||||||
|
*/
|
||||||
|
_unMounted: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initializes a new DeviceSelection instance.
|
||||||
|
*
|
||||||
|
* @param {Object} props - The read-only React Component props with which
|
||||||
|
* the new instance is to be initialized.
|
||||||
|
*/
|
||||||
|
constructor(props: IProps) {
|
||||||
|
super(props);
|
||||||
|
|
||||||
|
this.state = {
|
||||||
|
previewVideoTrack: null,
|
||||||
|
previewVideoTrackError: null
|
||||||
|
};
|
||||||
|
this._unMounted = true;
|
||||||
|
|
||||||
|
this._onFramerateItemSelect = this._onFramerateItemSelect.bind(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generate the initial previews for audio input and video input.
|
||||||
|
*
|
||||||
|
* @inheritdoc
|
||||||
|
*/
|
||||||
|
componentDidMount() {
|
||||||
|
this._unMounted = false;
|
||||||
|
Promise.all([
|
||||||
|
this._createVideoInputTrack(this.props.selectedVideoInputId)
|
||||||
|
])
|
||||||
|
.catch(err => logger.warn('Failed to initialize preview tracks', err))
|
||||||
|
.then(() => {
|
||||||
|
this.props.dispatch(getAvailableDevices());
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if audio / video permissions were granted. Updates audio input and
|
||||||
|
* video input previews.
|
||||||
|
*
|
||||||
|
* @param {Object} prevProps - Previous props this component received.
|
||||||
|
* @returns {void}
|
||||||
|
*/
|
||||||
|
componentDidUpdate(prevProps: IProps) {
|
||||||
|
|
||||||
|
if (prevProps.selectedVideoInputId
|
||||||
|
!== this.props.selectedVideoInputId) {
|
||||||
|
this._createVideoInputTrack(this.props.selectedVideoInputId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Ensure preview tracks are destroyed to prevent continued use.
|
||||||
|
*
|
||||||
|
* @inheritdoc
|
||||||
|
*/
|
||||||
|
componentWillUnmount() {
|
||||||
|
this._unMounted = true;
|
||||||
|
this._disposeVideoInputPreview();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Implements React's {@link Component#render()}.
|
||||||
|
*
|
||||||
|
* @inheritdoc
|
||||||
|
*/
|
||||||
|
render() {
|
||||||
|
const {
|
||||||
|
classes,
|
||||||
|
hideAdditionalSettings,
|
||||||
|
hideVideoInputPreview,
|
||||||
|
localFlipX,
|
||||||
|
t
|
||||||
|
} = this.props;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className = { classes.container }>
|
||||||
|
{ !hideVideoInputPreview
|
||||||
|
&& <VideoInputPreview
|
||||||
|
error = { this.state.previewVideoTrackError }
|
||||||
|
localFlipX = { localFlipX }
|
||||||
|
track = { this.state.previewVideoTrack } />
|
||||||
|
}
|
||||||
|
<div
|
||||||
|
aria-live = 'polite'>
|
||||||
|
{this._renderVideoSelector()}
|
||||||
|
</div>
|
||||||
|
{!hideAdditionalSettings && (
|
||||||
|
<>
|
||||||
|
<div className = { classes.checkboxContainer }>
|
||||||
|
<Checkbox
|
||||||
|
checked = { localFlipX }
|
||||||
|
label = { t('videothumbnail.mirrorVideo') }
|
||||||
|
// eslint-disable-next-line react/jsx-no-bind
|
||||||
|
onChange = { () => super._onChange({ localFlipX: !localFlipX }) } />
|
||||||
|
</div>
|
||||||
|
{this._renderFramerateSelect()}
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates the JitsiTrack for the video input preview.
|
||||||
|
*
|
||||||
|
* @param {string} deviceId - The id of video device to preview.
|
||||||
|
* @private
|
||||||
|
* @returns {void}
|
||||||
|
*/
|
||||||
|
_createVideoInputTrack(deviceId: string) {
|
||||||
|
const { hideVideoInputPreview } = this.props;
|
||||||
|
|
||||||
|
if (hideVideoInputPreview) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
return this._disposeVideoInputPreview()
|
||||||
|
.then(() => createLocalTrack('video', deviceId, 5000))
|
||||||
|
.then(jitsiLocalTrack => {
|
||||||
|
if (!jitsiLocalTrack) {
|
||||||
|
return Promise.reject();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this._unMounted) {
|
||||||
|
jitsiLocalTrack.dispose();
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.setState({
|
||||||
|
previewVideoTrack: jitsiLocalTrack,
|
||||||
|
previewVideoTrackError: null
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.setState({
|
||||||
|
previewVideoTrack: null,
|
||||||
|
previewVideoTrackError:
|
||||||
|
this.props.t('deviceSelection.previewUnavailable')
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Utility function for disposing the current video input preview.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @returns {Promise}
|
||||||
|
*/
|
||||||
|
_disposeVideoInputPreview(): Promise<any> {
|
||||||
|
return this.state.previewVideoTrack
|
||||||
|
? this.state.previewVideoTrack.dispose() : Promise.resolve();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a DeviceSelector instance based on the passed in configuration.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @returns {ReactElement}
|
||||||
|
*/
|
||||||
|
_renderVideoSelector() {
|
||||||
|
const { availableDevices, hasVideoPermission } = this.props;
|
||||||
|
|
||||||
|
const videoConfig = {
|
||||||
|
devices: availableDevices.videoInput,
|
||||||
|
hasPermission: hasVideoPermission,
|
||||||
|
icon: 'icon-camera',
|
||||||
|
isDisabled: this.props.disableVideoInputSelect || this.props.disableDeviceChange,
|
||||||
|
key: 'videoInput',
|
||||||
|
id: 'videoInput',
|
||||||
|
label: 'settings.selectCamera',
|
||||||
|
onSelect: (selectedVideoInputId: string) => super._onChange({ selectedVideoInputId }),
|
||||||
|
selectedDeviceId: this.state.previewVideoTrack
|
||||||
|
? this.state.previewVideoTrack.getDeviceId() : this.props.selectedVideoInputId
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<DeviceSelector
|
||||||
|
{ ...videoConfig }
|
||||||
|
key = { videoConfig.id } />
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Callback invoked to select a frame rate from the select dropdown.
|
||||||
|
*
|
||||||
|
* @param {Object} e - The key event to handle.
|
||||||
|
* @private
|
||||||
|
* @returns {void}
|
||||||
|
*/
|
||||||
|
_onFramerateItemSelect(e: React.ChangeEvent<HTMLSelectElement>) {
|
||||||
|
const frameRate = e.target.value;
|
||||||
|
|
||||||
|
super._onChange({ currentFramerate: frameRate });
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the React Element for the desktop share frame rate dropdown.
|
||||||
|
*
|
||||||
|
* @returns {JSX}
|
||||||
|
*/
|
||||||
|
_renderFramerateSelect() {
|
||||||
|
const { currentFramerate, desktopShareFramerates, t } = this.props;
|
||||||
|
const frameRateItems = desktopShareFramerates.map((frameRate: number) => {
|
||||||
|
return {
|
||||||
|
value: frameRate,
|
||||||
|
label: `${frameRate} ${t('settings.framesPerSecond')}`
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Select
|
||||||
|
bottomLabel = { parseInt(currentFramerate, 10) > SS_DEFAULT_FRAME_RATE
|
||||||
|
? t('settings.desktopShareHighFpsWarning')
|
||||||
|
: t('settings.desktopShareWarning') }
|
||||||
|
label = { t('settings.desktopShareFramerate') }
|
||||||
|
onChange = { this._onFramerateItemSelect }
|
||||||
|
options = { frameRateItems }
|
||||||
|
value = { currentFramerate } />
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const mapStateToProps = (state: IReduxState) => {
|
||||||
|
return {
|
||||||
|
availableDevices: state['features/base/devices'].availableDevices ?? {}
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
export default connect(mapStateToProps)(withStyles(styles)(translate(VideoDeviceSelection)));
|
|
@ -1,58 +0,0 @@
|
||||||
/* @flow */
|
|
||||||
|
|
||||||
import React, { Component } from 'react';
|
|
||||||
|
|
||||||
import Video from '../../base/media/components/Video';
|
|
||||||
|
|
||||||
const VIDEO_ERROR_CLASS = 'video-preview-has-error';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The type of the React {@code Component} props of {@link VideoInputPreview}.
|
|
||||||
*/
|
|
||||||
type Props = {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* An error message to display instead of a preview. Displaying an error
|
|
||||||
* will take priority over displaying a video preview.
|
|
||||||
*/
|
|
||||||
error: ?string,
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The JitsiLocalTrack to display.
|
|
||||||
*/
|
|
||||||
track: Object
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* React component for displaying video. This component defers to lib-jitsi-meet
|
|
||||||
* logic for rendering the video.
|
|
||||||
*
|
|
||||||
* @augments Component
|
|
||||||
*/
|
|
||||||
class VideoInputPreview extends Component<Props> {
|
|
||||||
/**
|
|
||||||
* Implements React's {@link Component#render()}.
|
|
||||||
*
|
|
||||||
* @inheritdoc
|
|
||||||
* @returns {ReactElement}
|
|
||||||
*/
|
|
||||||
render() {
|
|
||||||
const { error } = this.props;
|
|
||||||
const errorClass = error ? VIDEO_ERROR_CLASS : '';
|
|
||||||
const className = `video-input-preview ${errorClass}`;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className = { className }>
|
|
||||||
<Video
|
|
||||||
className = 'video-input-preview-display flipVideoX'
|
|
||||||
playsinline = { true }
|
|
||||||
videoTrack = {{ jitsiTrack: this.props.track }} />
|
|
||||||
<div className = 'video-input-preview-error'>
|
|
||||||
{ error || '' }
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default VideoInputPreview;
|
|
|
@ -0,0 +1,73 @@
|
||||||
|
import React from 'react';
|
||||||
|
import { makeStyles } from 'tss-react/mui';
|
||||||
|
|
||||||
|
import Video from '../../base/media/components/Video.web';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The type of the React {@code Component} props of {@link VideoInputPreview}.
|
||||||
|
*/
|
||||||
|
interface IProps {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An error message to display instead of a preview. Displaying an error
|
||||||
|
* will take priority over displaying a video preview.
|
||||||
|
*/
|
||||||
|
error: string | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether or not the local video is flipped.
|
||||||
|
*/
|
||||||
|
localFlipX: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The JitsiLocalTrack to display.
|
||||||
|
*/
|
||||||
|
track: Object;
|
||||||
|
}
|
||||||
|
|
||||||
|
const useStyles = makeStyles()(theme => {
|
||||||
|
return {
|
||||||
|
container: {
|
||||||
|
position: 'relative',
|
||||||
|
borderRadius: '3px',
|
||||||
|
overflow: 'hidden',
|
||||||
|
marginBottom: theme.spacing(4),
|
||||||
|
backgroundColor: theme.palette.uiBackground
|
||||||
|
},
|
||||||
|
|
||||||
|
video: {
|
||||||
|
height: 'auto',
|
||||||
|
width: '100%',
|
||||||
|
overflow: 'hidden'
|
||||||
|
},
|
||||||
|
|
||||||
|
errorText: {
|
||||||
|
color: theme.palette.text01,
|
||||||
|
left: 0,
|
||||||
|
position: 'absolute',
|
||||||
|
right: 0,
|
||||||
|
textAlign: 'center',
|
||||||
|
top: '50%'
|
||||||
|
}
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
const VideoInputPreview = ({ error, localFlipX, track }: IProps) => {
|
||||||
|
const { classes, cx } = useStyles();
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className = { classes.container }>
|
||||||
|
<Video
|
||||||
|
className = { cx(classes.video, localFlipX && 'flipVideoX') }
|
||||||
|
playsinline = { true }
|
||||||
|
videoTrack = {{ jitsiTrack: track }} />
|
||||||
|
{error && (
|
||||||
|
<div className = { classes.errorText }>
|
||||||
|
{error}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default VideoInputPreview;
|
|
@ -1,4 +0,0 @@
|
||||||
// @flow
|
|
||||||
|
|
||||||
export { default as DeviceSelection } from './DeviceSelection';
|
|
||||||
export type { Props as DeviceSelectionProps } from './DeviceSelection';
|
|
|
@ -21,8 +21,69 @@ import {
|
||||||
getUserSelectedMicDeviceId,
|
getUserSelectedMicDeviceId,
|
||||||
getUserSelectedOutputDeviceId
|
getUserSelectedOutputDeviceId
|
||||||
} from '../base/settings/functions.web';
|
} from '../base/settings/functions.web';
|
||||||
|
import { isNoiseSuppressionEnabled } from '../noise-suppression/functions';
|
||||||
|
import { isPrejoinPageVisible } from '../prejoin/functions';
|
||||||
|
import { SS_DEFAULT_FRAME_RATE, SS_SUPPORTED_FRAMERATES } from '../settings/constants';
|
||||||
import { isDeviceHidSupported } from '../web-hid/functions';
|
import { isDeviceHidSupported } from '../web-hid/functions';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the properties for the audio device selection dialog from Redux state.
|
||||||
|
*
|
||||||
|
* @param {IStateful} stateful -The (whole) redux state, or redux's
|
||||||
|
* {@code getState} function to be used to retrieve the state.
|
||||||
|
* @param {boolean} isDisplayedOnWelcomePage - Indicates whether the device selection dialog is displayed on the
|
||||||
|
* welcome page or not.
|
||||||
|
* @returns {Object} - The properties for the audio device selection dialog.
|
||||||
|
*/
|
||||||
|
export function getAudioDeviceSelectionDialogProps(stateful: IStateful, isDisplayedOnWelcomePage: boolean) {
|
||||||
|
// On mobile Safari because of https://bugs.webkit.org/show_bug.cgi?id=179363#c30, the old track is stopped
|
||||||
|
// by the browser when a new track is created for preview. That's why we are disabling all previews.
|
||||||
|
const disablePreviews = isIosMobileBrowser();
|
||||||
|
|
||||||
|
const state = toState(stateful);
|
||||||
|
const settings = state['features/base/settings'];
|
||||||
|
const { permissions } = state['features/base/devices'];
|
||||||
|
const inputDeviceChangeSupported = JitsiMeetJS.mediaDevices.isDeviceChangeAvailable('input');
|
||||||
|
const speakerChangeSupported = JitsiMeetJS.mediaDevices.isDeviceChangeAvailable('output');
|
||||||
|
const userSelectedMic = getUserSelectedMicDeviceId(state);
|
||||||
|
const deviceHidSupported = isDeviceHidSupported();
|
||||||
|
const noiseSuppressionEnabled = isNoiseSuppressionEnabled(state);
|
||||||
|
const hideNoiseSuppression = isPrejoinPageVisible(state) || isDisplayedOnWelcomePage;
|
||||||
|
|
||||||
|
// When the previews are disabled we don't need multiple audio input support in order to change the mic. This is the
|
||||||
|
// case for Safari on iOS.
|
||||||
|
let disableAudioInputChange
|
||||||
|
= !JitsiMeetJS.mediaDevices.isMultipleAudioInputSupported() && !(disablePreviews && inputDeviceChangeSupported);
|
||||||
|
let selectedAudioInputId = settings.micDeviceId;
|
||||||
|
let selectedAudioOutputId = getAudioOutputDeviceId();
|
||||||
|
|
||||||
|
// audio input change will be a problem only when we are in a
|
||||||
|
// conference and this is not supported, when we open device selection on
|
||||||
|
// welcome page changing input devices will not be a problem
|
||||||
|
// on welcome page we also show only what we have saved as user selected devices
|
||||||
|
if (isDisplayedOnWelcomePage) {
|
||||||
|
disableAudioInputChange = false;
|
||||||
|
selectedAudioInputId = userSelectedMic;
|
||||||
|
selectedAudioOutputId = getUserSelectedOutputDeviceId(state);
|
||||||
|
}
|
||||||
|
|
||||||
|
// we fill the device selection dialog with the devices that are currently
|
||||||
|
// used or if none are currently used with what we have in settings(user selected)
|
||||||
|
return {
|
||||||
|
disableAudioInputChange,
|
||||||
|
disableDeviceChange: !JitsiMeetJS.mediaDevices.isDeviceChangeAvailable(),
|
||||||
|
hasAudioPermission: permissions.audio,
|
||||||
|
hideAudioInputPreview: disableAudioInputChange || !JitsiMeetJS.isCollectingLocalStats() || disablePreviews,
|
||||||
|
hideAudioOutputPreview: !speakerChangeSupported || disablePreviews,
|
||||||
|
hideAudioOutputSelect: !speakerChangeSupported,
|
||||||
|
hideDeviceHIDContainer: !deviceHidSupported,
|
||||||
|
hideNoiseSuppression,
|
||||||
|
noiseSuppressionEnabled,
|
||||||
|
selectedAudioInputId,
|
||||||
|
selectedAudioOutputId
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the properties for the device selection dialog from Redux state.
|
* Returns the properties for the device selection dialog from Redux state.
|
||||||
*
|
*
|
||||||
|
@ -32,7 +93,7 @@ import { isDeviceHidSupported } from '../web-hid/functions';
|
||||||
* welcome page or not.
|
* welcome page or not.
|
||||||
* @returns {Object} - The properties for the device selection dialog.
|
* @returns {Object} - The properties for the device selection dialog.
|
||||||
*/
|
*/
|
||||||
export function getDeviceSelectionDialogProps(stateful: IStateful, isDisplayedOnWelcomePage: boolean) {
|
export function getVideoDeviceSelectionDialogProps(stateful: IStateful, isDisplayedOnWelcomePage: boolean) {
|
||||||
// On mobile Safari because of https://bugs.webkit.org/show_bug.cgi?id=179363#c30, the old track is stopped
|
// On mobile Safari because of https://bugs.webkit.org/show_bug.cgi?id=179363#c30, the old track is stopped
|
||||||
// by the browser when a new track is created for preview. That's why we are disabling all previews.
|
// by the browser when a new track is created for preview. That's why we are disabling all previews.
|
||||||
const disablePreviews = isIosMobileBrowser();
|
const disablePreviews = isIosMobileBrowser();
|
||||||
|
@ -41,18 +102,12 @@ export function getDeviceSelectionDialogProps(stateful: IStateful, isDisplayedOn
|
||||||
const settings = state['features/base/settings'];
|
const settings = state['features/base/settings'];
|
||||||
const { permissions } = state['features/base/devices'];
|
const { permissions } = state['features/base/devices'];
|
||||||
const inputDeviceChangeSupported = JitsiMeetJS.mediaDevices.isDeviceChangeAvailable('input');
|
const inputDeviceChangeSupported = JitsiMeetJS.mediaDevices.isDeviceChangeAvailable('input');
|
||||||
const speakerChangeSupported = JitsiMeetJS.mediaDevices.isDeviceChangeAvailable('output');
|
|
||||||
const userSelectedCamera = getUserSelectedCameraDeviceId(state);
|
const userSelectedCamera = getUserSelectedCameraDeviceId(state);
|
||||||
const userSelectedMic = getUserSelectedMicDeviceId(state);
|
const { localFlipX } = state['features/base/settings'];
|
||||||
const deviceHidSupported = isDeviceHidSupported();
|
const hideAdditionalSettings = isPrejoinPageVisible(state) || isDisplayedOnWelcomePage;
|
||||||
|
const framerate = state['features/screen-share'].captureFrameRate ?? SS_DEFAULT_FRAME_RATE;
|
||||||
|
|
||||||
// When the previews are disabled we don't need multiple audio input support in order to change the mic. This is the
|
|
||||||
// case for Safari on iOS.
|
|
||||||
let disableAudioInputChange
|
|
||||||
= !JitsiMeetJS.mediaDevices.isMultipleAudioInputSupported() && !(disablePreviews && inputDeviceChangeSupported);
|
|
||||||
let disableVideoInputSelect = !inputDeviceChangeSupported;
|
let disableVideoInputSelect = !inputDeviceChangeSupported;
|
||||||
let selectedAudioInputId = settings.micDeviceId;
|
|
||||||
let selectedAudioOutputId = getAudioOutputDeviceId();
|
|
||||||
let selectedVideoInputId = settings.cameraDeviceId;
|
let selectedVideoInputId = settings.cameraDeviceId;
|
||||||
|
|
||||||
// audio input change will be a problem only when we are in a
|
// audio input change will be a problem only when we are in a
|
||||||
|
@ -60,29 +115,21 @@ export function getDeviceSelectionDialogProps(stateful: IStateful, isDisplayedOn
|
||||||
// welcome page changing input devices will not be a problem
|
// welcome page changing input devices will not be a problem
|
||||||
// on welcome page we also show only what we have saved as user selected devices
|
// on welcome page we also show only what we have saved as user selected devices
|
||||||
if (isDisplayedOnWelcomePage) {
|
if (isDisplayedOnWelcomePage) {
|
||||||
disableAudioInputChange = false;
|
|
||||||
disableVideoInputSelect = false;
|
disableVideoInputSelect = false;
|
||||||
selectedAudioInputId = userSelectedMic;
|
|
||||||
selectedAudioOutputId = getUserSelectedOutputDeviceId(state);
|
|
||||||
selectedVideoInputId = userSelectedCamera;
|
selectedVideoInputId = userSelectedCamera;
|
||||||
}
|
}
|
||||||
|
|
||||||
// we fill the device selection dialog with the devices that are currently
|
// we fill the device selection dialog with the devices that are currently
|
||||||
// used or if none are currently used with what we have in settings(user selected)
|
// used or if none are currently used with what we have in settings(user selected)
|
||||||
return {
|
return {
|
||||||
availableDevices: state['features/base/devices'].availableDevices,
|
currentFramerate: framerate,
|
||||||
disableAudioInputChange,
|
desktopShareFramerates: SS_SUPPORTED_FRAMERATES,
|
||||||
disableDeviceChange: !JitsiMeetJS.mediaDevices.isDeviceChangeAvailable(),
|
disableDeviceChange: !JitsiMeetJS.mediaDevices.isDeviceChangeAvailable(),
|
||||||
disableVideoInputSelect,
|
disableVideoInputSelect,
|
||||||
hasAudioPermission: permissions.audio,
|
|
||||||
hasVideoPermission: permissions.video,
|
hasVideoPermission: permissions.video,
|
||||||
hideAudioInputPreview: disableAudioInputChange || !JitsiMeetJS.isCollectingLocalStats() || disablePreviews,
|
hideAdditionalSettings,
|
||||||
hideAudioOutputPreview: !speakerChangeSupported || disablePreviews,
|
|
||||||
hideAudioOutputSelect: !speakerChangeSupported,
|
|
||||||
hideDeviceHIDContainer: !deviceHidSupported,
|
|
||||||
hideVideoInputPreview: !inputDeviceChangeSupported || disablePreviews,
|
hideVideoInputPreview: !inputDeviceChangeSupported || disablePreviews,
|
||||||
selectedAudioInputId,
|
localFlipX: Boolean(localFlipX),
|
||||||
selectedAudioOutputId,
|
|
||||||
selectedVideoInputId
|
selectedVideoInputId
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,25 +7,6 @@
|
||||||
*/
|
*/
|
||||||
export const TOGGLE_E2EE = 'TOGGLE_E2EE';
|
export const TOGGLE_E2EE = 'TOGGLE_E2EE';
|
||||||
|
|
||||||
/**
|
|
||||||
* The type of the action which signals to set new value whether everyone has E2EE enabled.
|
|
||||||
*
|
|
||||||
* {
|
|
||||||
* type: SET_EVERYONE_ENABLED_E2EE,
|
|
||||||
* everyoneEnabledE2EE: boolean
|
|
||||||
* }
|
|
||||||
*/
|
|
||||||
export const SET_EVERYONE_ENABLED_E2EE = 'SET_EVERYONE_ENABLED_E2EE';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The type of the action which signals to set new value whether everyone supports E2EE.
|
|
||||||
*
|
|
||||||
* {
|
|
||||||
* type: SET_EVERYONE_SUPPORT_E2EE
|
|
||||||
* }
|
|
||||||
*/
|
|
||||||
export const SET_EVERYONE_SUPPORT_E2EE = 'SET_EVERYONE_SUPPORT_E2EE';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The type of the action which signals to set new value E2EE maxMode.
|
* The type of the action which signals to set new value E2EE maxMode.
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
import {
|
import {
|
||||||
PARTICIPANT_VERIFIED,
|
PARTICIPANT_VERIFIED,
|
||||||
SET_EVERYONE_ENABLED_E2EE,
|
|
||||||
SET_EVERYONE_SUPPORT_E2EE,
|
|
||||||
SET_MAX_MODE,
|
SET_MAX_MODE,
|
||||||
SET_MEDIA_ENCRYPTION_KEY,
|
SET_MEDIA_ENCRYPTION_KEY,
|
||||||
START_VERIFICATION,
|
START_VERIFICATION,
|
||||||
|
@ -20,38 +18,6 @@ export function toggleE2EE(enabled: boolean) {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Set new value whether everyone has E2EE enabled.
|
|
||||||
*
|
|
||||||
* @param {boolean} everyoneEnabledE2EE - The new value.
|
|
||||||
* @returns {{
|
|
||||||
* type: SET_EVERYONE_ENABLED_E2EE,
|
|
||||||
* everyoneEnabledE2EE: boolean
|
|
||||||
* }}
|
|
||||||
*/
|
|
||||||
export function setEveryoneEnabledE2EE(everyoneEnabledE2EE: boolean) {
|
|
||||||
return {
|
|
||||||
type: SET_EVERYONE_ENABLED_E2EE,
|
|
||||||
everyoneEnabledE2EE
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Set new value whether everyone support E2EE.
|
|
||||||
*
|
|
||||||
* @param {boolean} everyoneSupportE2EE - The new value.
|
|
||||||
* @returns {{
|
|
||||||
* type: SET_EVERYONE_SUPPORT_E2EE,
|
|
||||||
* everyoneSupportE2EE: boolean
|
|
||||||
* }}
|
|
||||||
*/
|
|
||||||
export function setEveryoneSupportE2EE(everyoneSupportE2EE: boolean) {
|
|
||||||
return {
|
|
||||||
type: SET_EVERYONE_SUPPORT_E2EE,
|
|
||||||
everyoneSupportE2EE
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dispatches an action to set E2EE maxMode.
|
* Dispatches an action to set E2EE maxMode.
|
||||||
*
|
*
|
||||||
|
|
|
@ -27,6 +27,6 @@ export function _mapStateToProps(state: IReduxState) {
|
||||||
|
|
||||||
return {
|
return {
|
||||||
_e2eeLabels: e2ee.labels,
|
_e2eeLabels: e2ee.labels,
|
||||||
_showLabel: state['features/e2ee'].everyoneEnabledE2EE
|
_showLabel: state['features/base/participants'].numberOfParticipantsDisabledE2EE === 0
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { IReduxState } from '../app/types';
|
import { IReduxState } from '../app/types';
|
||||||
import { IStateful } from '../base/app/types';
|
import { IStateful } from '../base/app/types';
|
||||||
import { getParticipantById, getParticipantCount } from '../base/participants/functions';
|
import { getParticipantById, getParticipantCount, getParticipantCountWithFake } from '../base/participants/functions';
|
||||||
import { toState } from '../base/redux/functions';
|
import { toState } from '../base/redux/functions';
|
||||||
|
|
||||||
|
|
||||||
|
@ -19,17 +19,17 @@ import { MAX_MODE_LIMIT, MAX_MODE_THRESHOLD } from './constants';
|
||||||
*/
|
*/
|
||||||
export function doesEveryoneSupportE2EE(stateful: IStateful) {
|
export function doesEveryoneSupportE2EE(stateful: IStateful) {
|
||||||
const state = toState(stateful);
|
const state = toState(stateful);
|
||||||
const { everyoneSupportE2EE } = state['features/e2ee'];
|
const { numberOfParticipantsNotSupportingE2EE } = state['features/base/participants'];
|
||||||
const { e2eeSupported } = state['features/base/conference'];
|
const { e2eeSupported } = state['features/base/conference'];
|
||||||
const participantCount = getParticipantCount(state);
|
const participantCount = getParticipantCountWithFake(state);
|
||||||
|
|
||||||
if (typeof everyoneSupportE2EE === 'undefined' && participantCount === 1) {
|
if (participantCount === 1) {
|
||||||
// This will happen if we are alone.
|
// This will happen if we are alone.
|
||||||
|
|
||||||
return e2eeSupported;
|
return e2eeSupported;
|
||||||
}
|
}
|
||||||
|
|
||||||
return everyoneSupportE2EE;
|
return numberOfParticipantsNotSupportingE2EE === 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import { batch } from 'react-redux';
|
|
||||||
|
|
||||||
import { IStore } from '../app/types';
|
import { IStore } from '../app/types';
|
||||||
import { APP_WILL_MOUNT, APP_WILL_UNMOUNT } from '../base/app/actionTypes';
|
import { APP_WILL_MOUNT, APP_WILL_UNMOUNT } from '../base/app/actionTypes';
|
||||||
|
@ -6,13 +5,11 @@ import { CONFERENCE_JOINED } from '../base/conference/actionTypes';
|
||||||
import { getCurrentConference } from '../base/conference/functions';
|
import { getCurrentConference } from '../base/conference/functions';
|
||||||
import { openDialog } from '../base/dialog/actions';
|
import { openDialog } from '../base/dialog/actions';
|
||||||
import { JitsiConferenceEvents } from '../base/lib-jitsi-meet';
|
import { JitsiConferenceEvents } from '../base/lib-jitsi-meet';
|
||||||
import { PARTICIPANT_JOINED, PARTICIPANT_LEFT, PARTICIPANT_UPDATED } from '../base/participants/actionTypes';
|
import { PARTICIPANT_JOINED, PARTICIPANT_LEFT } from '../base/participants/actionTypes';
|
||||||
import { participantUpdated } from '../base/participants/actions';
|
import { participantUpdated } from '../base/participants/actions';
|
||||||
import {
|
import {
|
||||||
getLocalParticipant,
|
getLocalParticipant,
|
||||||
getParticipantById,
|
getParticipantById,
|
||||||
getParticipantCount,
|
|
||||||
getRemoteParticipants,
|
|
||||||
isScreenShareParticipant
|
isScreenShareParticipant
|
||||||
} from '../base/participants/functions';
|
} from '../base/participants/functions';
|
||||||
import MiddlewareRegistry from '../base/redux/MiddlewareRegistry';
|
import MiddlewareRegistry from '../base/redux/MiddlewareRegistry';
|
||||||
|
@ -20,7 +17,7 @@ import StateListenerRegistry from '../base/redux/StateListenerRegistry';
|
||||||
import { playSound, registerSound, unregisterSound } from '../base/sounds/actions';
|
import { playSound, registerSound, unregisterSound } from '../base/sounds/actions';
|
||||||
|
|
||||||
import { PARTICIPANT_VERIFIED, SET_MEDIA_ENCRYPTION_KEY, START_VERIFICATION, TOGGLE_E2EE } from './actionTypes';
|
import { PARTICIPANT_VERIFIED, SET_MEDIA_ENCRYPTION_KEY, START_VERIFICATION, TOGGLE_E2EE } from './actionTypes';
|
||||||
import { setE2EEMaxMode, setEveryoneEnabledE2EE, setEveryoneSupportE2EE, toggleE2EE } from './actions';
|
import { setE2EEMaxMode, toggleE2EE } from './actions';
|
||||||
import ParticipantVerificationDialog from './components/ParticipantVerificationDialog';
|
import ParticipantVerificationDialog from './components/ParticipantVerificationDialog';
|
||||||
import { E2EE_OFF_SOUND_ID, E2EE_ON_SOUND_ID, MAX_MODE } from './constants';
|
import { E2EE_OFF_SOUND_ID, E2EE_ON_SOUND_ID, MAX_MODE } from './constants';
|
||||||
import { isMaxModeReached, isMaxModeThresholdReached } from './functions';
|
import { isMaxModeReached, isMaxModeThresholdReached } from './functions';
|
||||||
|
@ -58,137 +55,24 @@ MiddlewareRegistry.register(({ dispatch, getState }) => next => action => {
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PARTICIPANT_UPDATED: {
|
|
||||||
const { id, e2eeEnabled, e2eeSupported } = action.participant;
|
|
||||||
const oldParticipant = getParticipantById(getState(), id);
|
|
||||||
const result = next(action);
|
|
||||||
|
|
||||||
if (e2eeEnabled !== oldParticipant?.e2eeEnabled
|
|
||||||
|| e2eeSupported !== oldParticipant?.e2eeSupported) {
|
|
||||||
const state = getState();
|
|
||||||
let newEveryoneSupportE2EE = true;
|
|
||||||
let newEveryoneEnabledE2EE = true;
|
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
||||||
for (const [ key, p ] of getRemoteParticipants(state)) {
|
|
||||||
if (!p.e2eeEnabled) {
|
|
||||||
newEveryoneEnabledE2EE = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!p.e2eeSupported) {
|
|
||||||
newEveryoneSupportE2EE = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!newEveryoneEnabledE2EE && !newEveryoneSupportE2EE) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!getLocalParticipant(state)?.e2eeEnabled) {
|
|
||||||
newEveryoneEnabledE2EE = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
batch(() => {
|
|
||||||
dispatch(setEveryoneEnabledE2EE(newEveryoneEnabledE2EE));
|
|
||||||
dispatch(setEveryoneSupportE2EE(newEveryoneSupportE2EE));
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
case PARTICIPANT_JOINED: {
|
case PARTICIPANT_JOINED: {
|
||||||
const result = next(action);
|
const result = next(action);
|
||||||
const { e2eeEnabled, e2eeSupported, local } = action.participant;
|
|
||||||
const { everyoneEnabledE2EE } = getState()['features/e2ee'];
|
|
||||||
const participantCount = getParticipantCount(getState);
|
|
||||||
|
|
||||||
if (isScreenShareParticipant(action.participant)) {
|
if (!isScreenShareParticipant(action.participant) && !action.participant.local) {
|
||||||
return result;
|
_updateMaxMode(dispatch, getState);
|
||||||
}
|
}
|
||||||
|
|
||||||
// the initial values
|
|
||||||
if (participantCount === 1) {
|
|
||||||
batch(() => {
|
|
||||||
dispatch(setEveryoneEnabledE2EE(e2eeEnabled));
|
|
||||||
dispatch(setEveryoneSupportE2EE(e2eeSupported));
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// if all had it enabled and this one disabled it, change value in store
|
|
||||||
// otherwise there is no change in the value we store
|
|
||||||
if (everyoneEnabledE2EE && !e2eeEnabled) {
|
|
||||||
dispatch(setEveryoneEnabledE2EE(false));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (local) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
const { everyoneSupportE2EE } = getState()['features/e2ee'];
|
|
||||||
|
|
||||||
// if all supported it and this one does not, change value in store
|
|
||||||
// otherwise there is no change in the value we store
|
|
||||||
if (everyoneSupportE2EE && !e2eeSupported) {
|
|
||||||
dispatch(setEveryoneSupportE2EE(false));
|
|
||||||
}
|
|
||||||
|
|
||||||
_updateMaxMode(dispatch, getState);
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
case PARTICIPANT_LEFT: {
|
case PARTICIPANT_LEFT: {
|
||||||
const previosState = getState();
|
const participant = getParticipantById(getState(), action.participant?.id);
|
||||||
const participant = getParticipantById(previosState, action.participant?.id);
|
|
||||||
const result = next(action);
|
const result = next(action);
|
||||||
const newState = getState();
|
|
||||||
const { e2eeEnabled = false, e2eeSupported = false } = participant ?? {};
|
|
||||||
|
|
||||||
if (isScreenShareParticipant(participant)) {
|
if (!isScreenShareParticipant(participant)) {
|
||||||
return result;
|
_updateMaxMode(dispatch, getState);
|
||||||
}
|
}
|
||||||
|
|
||||||
const { everyoneEnabledE2EE, everyoneSupportE2EE } = newState['features/e2ee'];
|
|
||||||
|
|
||||||
|
|
||||||
// if it was not enabled by everyone, and the participant leaving had it disabled, or if it was not supported
|
|
||||||
// by everyone, and the participant leaving had it not supported let's check is it enabled for all that stay
|
|
||||||
if ((!everyoneEnabledE2EE && !e2eeEnabled) || (!everyoneSupportE2EE && !e2eeSupported)) {
|
|
||||||
let latestEveryoneEnabledE2EE = true;
|
|
||||||
let latestEveryoneSupportE2EE = true;
|
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
||||||
for (const [ key, p ] of getRemoteParticipants(newState)) {
|
|
||||||
if (!p.e2eeEnabled) {
|
|
||||||
latestEveryoneEnabledE2EE = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!p.e2eeSupported) {
|
|
||||||
latestEveryoneSupportE2EE = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!latestEveryoneEnabledE2EE && !latestEveryoneSupportE2EE) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!getLocalParticipant(newState)?.e2eeEnabled) {
|
|
||||||
latestEveryoneEnabledE2EE = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
batch(() => {
|
|
||||||
if (!everyoneEnabledE2EE && latestEveryoneEnabledE2EE) {
|
|
||||||
dispatch(setEveryoneEnabledE2EE(true));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!everyoneSupportE2EE && latestEveryoneSupportE2EE) {
|
|
||||||
dispatch(setEveryoneSupportE2EE(true));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
_updateMaxMode(dispatch, getState);
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -314,12 +198,23 @@ function _updateMaxMode(dispatch: IStore['dispatch'], getState: IStore['getState
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isMaxModeThresholdReached(state)) {
|
const { maxMode, enabled } = state['features/e2ee'];
|
||||||
dispatch(setE2EEMaxMode(MAX_MODE.THRESHOLD_EXCEEDED));
|
const isMaxModeThresholdReachedValue = isMaxModeThresholdReached(state);
|
||||||
dispatch(toggleE2EE(false));
|
let newMaxMode: string;
|
||||||
|
|
||||||
|
if (isMaxModeThresholdReachedValue) {
|
||||||
|
newMaxMode = MAX_MODE.THRESHOLD_EXCEEDED;
|
||||||
} else if (isMaxModeReached(state)) {
|
} else if (isMaxModeReached(state)) {
|
||||||
dispatch(setE2EEMaxMode(MAX_MODE.ENABLED));
|
newMaxMode = MAX_MODE.ENABLED;
|
||||||
} else {
|
} else {
|
||||||
dispatch(setE2EEMaxMode(MAX_MODE.DISABLED));
|
newMaxMode = MAX_MODE.DISABLED;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (maxMode !== newMaxMode) {
|
||||||
|
dispatch(setE2EEMaxMode(newMaxMode));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isMaxModeThresholdReachedValue && !enabled) {
|
||||||
|
dispatch(toggleE2EE(false));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
import ReducerRegistry from '../base/redux/ReducerRegistry';
|
import ReducerRegistry from '../base/redux/ReducerRegistry';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
SET_EVERYONE_ENABLED_E2EE,
|
|
||||||
SET_EVERYONE_SUPPORT_E2EE,
|
|
||||||
SET_MAX_MODE,
|
SET_MAX_MODE,
|
||||||
TOGGLE_E2EE
|
TOGGLE_E2EE
|
||||||
} from './actionTypes';
|
} from './actionTypes';
|
||||||
|
@ -15,8 +13,6 @@ const DEFAULT_STATE = {
|
||||||
|
|
||||||
export interface IE2EEState {
|
export interface IE2EEState {
|
||||||
enabled: boolean;
|
enabled: boolean;
|
||||||
everyoneEnabledE2EE?: boolean;
|
|
||||||
everyoneSupportE2EE?: boolean;
|
|
||||||
maxMode: string;
|
maxMode: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,16 +30,6 @@ ReducerRegistry.register<IE2EEState>('features/e2ee', (state = DEFAULT_STATE, ac
|
||||||
...state,
|
...state,
|
||||||
enabled: action.enabled
|
enabled: action.enabled
|
||||||
};
|
};
|
||||||
case SET_EVERYONE_ENABLED_E2EE:
|
|
||||||
return {
|
|
||||||
...state,
|
|
||||||
everyoneEnabledE2EE: action.everyoneEnabledE2EE
|
|
||||||
};
|
|
||||||
case SET_EVERYONE_SUPPORT_E2EE:
|
|
||||||
return {
|
|
||||||
...state,
|
|
||||||
everyoneSupportE2EE: action.everyoneSupportE2EE
|
|
||||||
};
|
|
||||||
|
|
||||||
case SET_MAX_MODE: {
|
case SET_MAX_MODE: {
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -1,23 +1,74 @@
|
||||||
// @flow
|
import { Theme } from '@mui/material';
|
||||||
|
import { ClassNameMap, withStyles } from '@mui/styles';
|
||||||
import StarIcon from '@atlaskit/icon/glyph/star';
|
|
||||||
import StarFilledIcon from '@atlaskit/icon/glyph/star-filled';
|
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import type { Dispatch } from 'redux';
|
import { WithTranslation } from 'react-i18next';
|
||||||
|
import { connect } from 'react-redux';
|
||||||
|
|
||||||
import {
|
import { createFeedbackOpenEvent } from '../../analytics/AnalyticsEvents';
|
||||||
createFeedbackOpenEvent,
|
import { sendAnalytics } from '../../analytics/functions';
|
||||||
sendAnalytics
|
import { IReduxState, IStore } from '../../app/types';
|
||||||
} from '../../analytics';
|
import { IJitsiConference } from '../../base/conference/reducer';
|
||||||
import { isMobileBrowser } from '../../base/environment/utils';
|
import { isMobileBrowser } from '../../base/environment/utils';
|
||||||
import { translate } from '../../base/i18n';
|
import { translate } from '../../base/i18n/functions';
|
||||||
import { connect } from '../../base/redux';
|
import Icon from '../../base/icons/components/Icon';
|
||||||
|
import { IconFavorite, IconFavoriteSolid } from '../../base/icons/svg';
|
||||||
|
import { withPixelLineHeight } from '../../base/styles/functions.web';
|
||||||
import Dialog from '../../base/ui/components/web/Dialog';
|
import Dialog from '../../base/ui/components/web/Dialog';
|
||||||
import Input from '../../base/ui/components/web/Input';
|
import Input from '../../base/ui/components/web/Input';
|
||||||
import { cancelFeedback, submitFeedback } from '../actions';
|
import { cancelFeedback, submitFeedback } from '../actions';
|
||||||
|
|
||||||
declare var APP: Object;
|
const styles = (theme: Theme) => {
|
||||||
declare var interfaceConfig: Object;
|
return {
|
||||||
|
dialog: {
|
||||||
|
marginBottom: theme.spacing(1)
|
||||||
|
},
|
||||||
|
|
||||||
|
rating: {
|
||||||
|
display: 'flex',
|
||||||
|
flexDirection: 'column' as const,
|
||||||
|
alignItems: 'center',
|
||||||
|
justifyContent: 'center',
|
||||||
|
marginTop: theme.spacing(4),
|
||||||
|
marginBottom: theme.spacing(3)
|
||||||
|
},
|
||||||
|
|
||||||
|
ratingLabel: {
|
||||||
|
...withPixelLineHeight(theme.typography.bodyShortBold),
|
||||||
|
color: theme.palette.text01,
|
||||||
|
marginBottom: theme.spacing(2),
|
||||||
|
height: '20px'
|
||||||
|
},
|
||||||
|
|
||||||
|
stars: {
|
||||||
|
display: 'flex'
|
||||||
|
},
|
||||||
|
|
||||||
|
starBtn: {
|
||||||
|
display: 'inline-block',
|
||||||
|
cursor: 'pointer',
|
||||||
|
marginRight: theme.spacing(3),
|
||||||
|
|
||||||
|
'&:last-of-type': {
|
||||||
|
marginRight: 0
|
||||||
|
},
|
||||||
|
|
||||||
|
'&.active svg': {
|
||||||
|
fill: theme.palette.success01
|
||||||
|
},
|
||||||
|
|
||||||
|
'&:focus': {
|
||||||
|
outline: `1px solid ${theme.palette.action01}`,
|
||||||
|
borderRadius: '4px'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
details: {
|
||||||
|
'& textarea': {
|
||||||
|
minHeight: '122px'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
const scoreAnimationClass
|
const scoreAnimationClass
|
||||||
= interfaceConfig.ENABLE_FEEDBACK_ANIMATION ? 'shake-rotate' : '';
|
= interfaceConfig.ENABLE_FEEDBACK_ANIMATION ? 'shake-rotate' : '';
|
||||||
|
@ -34,49 +85,51 @@ const SCORES = [
|
||||||
'feedback.veryGood'
|
'feedback.veryGood'
|
||||||
];
|
];
|
||||||
|
|
||||||
|
const ICON_SIZE = 32;
|
||||||
|
|
||||||
type Scrollable = {
|
type Scrollable = {
|
||||||
scroll: Function
|
scroll: Function;
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The type of the React {@code Component} props of {@link FeedbackDialog}.
|
* The type of the React {@code Component} props of {@link FeedbackDialog}.
|
||||||
*/
|
*/
|
||||||
type Props = {
|
interface IProps extends WithTranslation {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The cached feedback message, if any, that was set when closing a previous
|
* The cached feedback message, if any, that was set when closing a previous
|
||||||
* instance of {@code FeedbackDialog}.
|
* instance of {@code FeedbackDialog}.
|
||||||
*/
|
*/
|
||||||
_message: string,
|
_message: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The cached feedback score, if any, that was set when closing a previous
|
* The cached feedback score, if any, that was set when closing a previous
|
||||||
* instance of {@code FeedbackDialog}.
|
* instance of {@code FeedbackDialog}.
|
||||||
*/
|
*/
|
||||||
_score: number,
|
_score: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An object containing the CSS classes.
|
||||||
|
*/
|
||||||
|
classes: ClassNameMap<string>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The JitsiConference that is being rated. The conference is passed in
|
* The JitsiConference that is being rated. The conference is passed in
|
||||||
* because feedback can occur after a conference has been left, so
|
* because feedback can occur after a conference has been left, so
|
||||||
* references to it may no longer exist in redux.
|
* references to it may no longer exist in redux.
|
||||||
*/
|
*/
|
||||||
conference: Object,
|
conference: IJitsiConference;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Invoked to signal feedback submission or canceling.
|
* Invoked to signal feedback submission or canceling.
|
||||||
*/
|
*/
|
||||||
dispatch: Dispatch<any>,
|
dispatch: IStore['dispatch'];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Callback invoked when {@code FeedbackDialog} is unmounted.
|
* Callback invoked when {@code FeedbackDialog} is unmounted.
|
||||||
*/
|
*/
|
||||||
onClose: Function,
|
onClose: Function;
|
||||||
|
}
|
||||||
/**
|
|
||||||
* Invoked to obtain translated strings.
|
|
||||||
*/
|
|
||||||
t: Function
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The type of the React {@code Component} state of {@link FeedbackDialog}.
|
* The type of the React {@code Component} state of {@link FeedbackDialog}.
|
||||||
|
@ -86,20 +139,20 @@ type State = {
|
||||||
/**
|
/**
|
||||||
* The currently entered feedback message.
|
* The currently entered feedback message.
|
||||||
*/
|
*/
|
||||||
message: string,
|
message: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The score selection index which is currently being hovered. The value -1
|
* The score selection index which is currently being hovered. The value -1
|
||||||
* is used as a sentinel value to match store behavior of using -1 for no
|
* is used as a sentinel value to match store behavior of using -1 for no
|
||||||
* score having been selected.
|
* score having been selected.
|
||||||
*/
|
*/
|
||||||
mousedOverScore: number,
|
mousedOverScore: number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The currently selected score selection index. The score will not be 0
|
* The currently selected score selection index. The score will not be 0
|
||||||
* indexed so subtract one to map with SCORES.
|
* indexed so subtract one to map with SCORES.
|
||||||
*/
|
*/
|
||||||
score: number
|
score: number;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -109,13 +162,19 @@ type State = {
|
||||||
*
|
*
|
||||||
* @augments Component
|
* @augments Component
|
||||||
*/
|
*/
|
||||||
class FeedbackDialog extends Component<Props, State> {
|
class FeedbackDialog extends Component<IProps, State> {
|
||||||
/**
|
/**
|
||||||
* An array of objects with click handlers for each of the scores listed in
|
* An array of objects with click handlers for each of the scores listed in
|
||||||
* the constant SCORES. This pattern is used for binding event handlers only
|
* the constant SCORES. This pattern is used for binding event handlers only
|
||||||
* once for each score selection icon.
|
* once for each score selection icon.
|
||||||
*/
|
*/
|
||||||
_scoreClickConfigurations: Array<Object>;
|
_scoreClickConfigurations: Array<{
|
||||||
|
_onClick: (e: React.MouseEvent) => void;
|
||||||
|
_onKeyDown: (e: React.KeyboardEvent) => void;
|
||||||
|
_onMouseOver: (e: React.MouseEvent) => void;
|
||||||
|
}>;
|
||||||
|
|
||||||
|
_onScrollTop: (node: Scrollable | null) => void;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initializes a new {@code FeedbackDialog} instance.
|
* Initializes a new {@code FeedbackDialog} instance.
|
||||||
|
@ -123,7 +182,7 @@ class FeedbackDialog extends Component<Props, State> {
|
||||||
* @param {Object} props - The read-only React {@code Component} props with
|
* @param {Object} props - The read-only React {@code Component} props with
|
||||||
* which the new instance is to be initialized.
|
* which the new instance is to be initialized.
|
||||||
*/
|
*/
|
||||||
constructor(props: Props) {
|
constructor(props: IProps) {
|
||||||
super(props);
|
super(props);
|
||||||
|
|
||||||
const { _message, _score } = this.props;
|
const { _message, _score } = this.props;
|
||||||
|
@ -157,8 +216,9 @@ class FeedbackDialog extends Component<Props, State> {
|
||||||
this._scoreClickConfigurations = SCORES.map((textKey, index) => {
|
this._scoreClickConfigurations = SCORES.map((textKey, index) => {
|
||||||
return {
|
return {
|
||||||
_onClick: () => this._onScoreSelect(index),
|
_onClick: () => this._onScoreSelect(index),
|
||||||
_onKeyPres: e => {
|
_onKeyDown: (e: React.KeyboardEvent) => {
|
||||||
if (e.key === ' ' || e.key === 'Enter') {
|
if (e.key === ' ' || e.key === 'Enter') {
|
||||||
|
e.stopPropagation();
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
this._onScoreSelect(index);
|
this._onScoreSelect(index);
|
||||||
}
|
}
|
||||||
|
@ -176,8 +236,8 @@ class FeedbackDialog extends Component<Props, State> {
|
||||||
|
|
||||||
// On some mobile browsers opening Feedback dialog scrolls down the whole content because of the keyboard.
|
// On some mobile browsers opening Feedback dialog scrolls down the whole content because of the keyboard.
|
||||||
// By scrolling to the top we prevent hiding the feedback stars so the user knows those exist.
|
// By scrolling to the top we prevent hiding the feedback stars so the user knows those exist.
|
||||||
this._onScrollTop = (node: ?Scrollable) => {
|
this._onScrollTop = (node: Scrollable | null) => {
|
||||||
node && node.scroll && node.scroll(0, 0);
|
node?.scroll?.(0, 0);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -215,14 +275,14 @@ class FeedbackDialog extends Component<Props, State> {
|
||||||
const scoreToDisplayAsSelected
|
const scoreToDisplayAsSelected
|
||||||
= mousedOverScore > -1 ? mousedOverScore : score;
|
= mousedOverScore > -1 ? mousedOverScore : score;
|
||||||
|
|
||||||
const { t } = this.props;
|
const { classes, t } = this.props;
|
||||||
|
|
||||||
const scoreIcons = this._scoreClickConfigurations.map(
|
const scoreIcons = this._scoreClickConfigurations.map(
|
||||||
(config, index) => {
|
(config, index) => {
|
||||||
const isFilled = index <= scoreToDisplayAsSelected;
|
const isFilled = index <= scoreToDisplayAsSelected;
|
||||||
const activeClass = isFilled ? 'active' : '';
|
const activeClass = isFilled ? 'active' : '';
|
||||||
const className
|
const className
|
||||||
= `star-btn ${scoreAnimationClass} ${activeClass}`;
|
= `${classes.starBtn} ${scoreAnimationClass} ${activeClass}`;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<span
|
<span
|
||||||
|
@ -230,19 +290,19 @@ class FeedbackDialog extends Component<Props, State> {
|
||||||
className = { className }
|
className = { className }
|
||||||
key = { index }
|
key = { index }
|
||||||
onClick = { config._onClick }
|
onClick = { config._onClick }
|
||||||
onKeyPress = { config._onKeyPres }
|
onKeyDown = { config._onKeyDown }
|
||||||
role = 'button'
|
role = 'button'
|
||||||
tabIndex = { 0 }
|
tabIndex = { 0 }
|
||||||
{ ...(isMobileBrowser() ? {} : {
|
{ ...(isMobileBrowser() ? {} : {
|
||||||
onMouseOver: config._onMouseOver
|
onMouseOver: config._onMouseOver
|
||||||
}) }>
|
}) }>
|
||||||
{ isFilled
|
{ isFilled
|
||||||
? <StarFilledIcon
|
? <Icon
|
||||||
label = 'star-filled'
|
size = { ICON_SIZE }
|
||||||
size = 'xlarge' />
|
src = { IconFavoriteSolid } />
|
||||||
: <StarIcon
|
: <Icon
|
||||||
label = 'star'
|
size = { ICON_SIZE }
|
||||||
size = 'xlarge' /> }
|
src = { IconFavorite } /> }
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
@ -255,23 +315,24 @@ class FeedbackDialog extends Component<Props, State> {
|
||||||
}}
|
}}
|
||||||
onCancel = { this._onCancel }
|
onCancel = { this._onCancel }
|
||||||
onSubmit = { this._onSubmit }
|
onSubmit = { this._onSubmit }
|
||||||
|
size = 'large'
|
||||||
titleKey = 'feedback.rateExperience'>
|
titleKey = 'feedback.rateExperience'>
|
||||||
<div className = 'feedback-dialog'>
|
<div className = { classes.dialog }>
|
||||||
<div className = 'rating'>
|
<div className = { classes.rating }>
|
||||||
<div
|
<div
|
||||||
aria-label = { this.props.t('feedback.star') }
|
aria-label = { this.props.t('feedback.star') }
|
||||||
className = 'star-label' >
|
className = { classes.ratingLabel } >
|
||||||
<p id = 'starLabel'>
|
<p id = 'starLabel'>
|
||||||
{ t(SCORES[scoreToDisplayAsSelected]) }
|
{ t(SCORES[scoreToDisplayAsSelected]) }
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
className = 'stars'
|
className = { classes.stars }
|
||||||
onMouseLeave = { this._onScoreContainerMouseLeave }>
|
onMouseLeave = { this._onScoreContainerMouseLeave }>
|
||||||
{ scoreIcons }
|
{ scoreIcons }
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className = 'details'>
|
<div className = { classes.details }>
|
||||||
<Input
|
<Input
|
||||||
autoFocus = { true }
|
autoFocus = { true }
|
||||||
id = 'feedbackTextArea'
|
id = 'feedbackTextArea'
|
||||||
|
@ -285,8 +346,6 @@ class FeedbackDialog extends Component<Props, State> {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
_onCancel: () => boolean;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dispatches an action notifying feedback was not submitted. The submitted
|
* Dispatches an action notifying feedback was not submitted. The submitted
|
||||||
* score will have one added as the rest of the app does not expect 0
|
* score will have one added as the rest of the app does not expect 0
|
||||||
|
@ -304,8 +363,6 @@ class FeedbackDialog extends Component<Props, State> {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
_onMessageChange: (Object) => void;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Updates the known entered feedback message.
|
* Updates the known entered feedback message.
|
||||||
*
|
*
|
||||||
|
@ -314,7 +371,7 @@ class FeedbackDialog extends Component<Props, State> {
|
||||||
* @private
|
* @private
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
_onMessageChange(newValue) {
|
_onMessageChange(newValue: string) {
|
||||||
this.setState({ message: newValue });
|
this.setState({ message: newValue });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -325,12 +382,10 @@ class FeedbackDialog extends Component<Props, State> {
|
||||||
* @private
|
* @private
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
_onScoreSelect(score) {
|
_onScoreSelect(score: number) {
|
||||||
this.setState({ score });
|
this.setState({ score });
|
||||||
}
|
}
|
||||||
|
|
||||||
_onScoreContainerMouseLeave: () => void;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the currently hovered score to null to indicate no hover is
|
* Sets the currently hovered score to null to indicate no hover is
|
||||||
* occurring.
|
* occurring.
|
||||||
|
@ -350,12 +405,10 @@ class FeedbackDialog extends Component<Props, State> {
|
||||||
* @private
|
* @private
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
_onScoreMouseOver(mousedOverScore) {
|
_onScoreMouseOver(mousedOverScore: number) {
|
||||||
this.setState({ mousedOverScore });
|
this.setState({ mousedOverScore });
|
||||||
}
|
}
|
||||||
|
|
||||||
_onSubmit: () => void;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dispatches the entered feedback for submission. The submitted score will
|
* Dispatches the entered feedback for submission. The submitted score will
|
||||||
* have one added as the rest of the app does not expect 0 indexing.
|
* have one added as the rest of the app does not expect 0 indexing.
|
||||||
|
@ -373,8 +426,6 @@ class FeedbackDialog extends Component<Props, State> {
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
_onScrollTop: (node: ?Scrollable) => void;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -386,7 +437,7 @@ class FeedbackDialog extends Component<Props, State> {
|
||||||
* @returns {{
|
* @returns {{
|
||||||
* }}
|
* }}
|
||||||
*/
|
*/
|
||||||
function _mapStateToProps(state) {
|
function _mapStateToProps(state: IReduxState) {
|
||||||
const { message, score } = state['features/feedback'];
|
const { message, score } = state['features/feedback'];
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
@ -407,4 +458,4 @@ function _mapStateToProps(state) {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export default translate(connect(_mapStateToProps)(FeedbackDialog));
|
export default withStyles(styles)(translate(connect(_mapStateToProps)(FeedbackDialog)));
|
|
@ -13,7 +13,6 @@ import { isMobileBrowser } from '../../../base/environment/utils';
|
||||||
import { translate } from '../../../base/i18n/functions';
|
import { translate } from '../../../base/i18n/functions';
|
||||||
import Icon from '../../../base/icons/components/Icon';
|
import Icon from '../../../base/icons/components/Icon';
|
||||||
import { IconArrowDown, IconArrowUp } from '../../../base/icons/svg';
|
import { IconArrowDown, IconArrowUp } from '../../../base/icons/svg';
|
||||||
import { IParticipant } from '../../../base/participants/types';
|
|
||||||
import { connect } from '../../../base/redux/functions';
|
import { connect } from '../../../base/redux/functions';
|
||||||
import { getHideSelfView } from '../../../base/settings/functions.any';
|
import { getHideSelfView } from '../../../base/settings/functions.any';
|
||||||
import { showToolbox } from '../../../toolbox/actions.web';
|
import { showToolbox } from '../../../toolbox/actions.web';
|
||||||
|
@ -113,7 +112,7 @@ interface IProps extends WithTranslation {
|
||||||
/**
|
/**
|
||||||
* The local screen share participant. This prop is behind the sourceNameSignaling feature flag.
|
* The local screen share participant. This prop is behind the sourceNameSignaling feature flag.
|
||||||
*/
|
*/
|
||||||
_localScreenShare: IParticipant;
|
_localScreenShareId: string | undefined;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether or not the filmstrip videos should currently be displayed.
|
* Whether or not the filmstrip videos should currently be displayed.
|
||||||
|
@ -333,7 +332,7 @@ class Filmstrip extends PureComponent <IProps, IState> {
|
||||||
const {
|
const {
|
||||||
_currentLayout,
|
_currentLayout,
|
||||||
_disableSelfView,
|
_disableSelfView,
|
||||||
_localScreenShare,
|
_localScreenShareId,
|
||||||
_mainFilmstripVisible,
|
_mainFilmstripVisible,
|
||||||
_resizableFilmstrip,
|
_resizableFilmstrip,
|
||||||
_topPanelFilmstrip,
|
_topPanelFilmstrip,
|
||||||
|
@ -343,7 +342,8 @@ class Filmstrip extends PureComponent <IProps, IState> {
|
||||||
_verticalViewGrid,
|
_verticalViewGrid,
|
||||||
_verticalViewMaxWidth,
|
_verticalViewMaxWidth,
|
||||||
classes,
|
classes,
|
||||||
filmstripType
|
filmstripType,
|
||||||
|
t
|
||||||
} = this.props;
|
} = this.props;
|
||||||
const { isMouseDown } = this.state;
|
const { isMouseDown } = this.state;
|
||||||
const tileViewActive = _currentLayout === LAYOUTS.TILE_VIEW;
|
const tileViewActive = _currentLayout === LAYOUTS.TILE_VIEW;
|
||||||
|
@ -407,7 +407,7 @@ class Filmstrip extends PureComponent <IProps, IState> {
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{_localScreenShare && !_disableSelfView && !_verticalViewGrid && (
|
{_localScreenShareId && !_disableSelfView && !_verticalViewGrid && (
|
||||||
<div
|
<div
|
||||||
className = 'filmstrip__videos'
|
className = 'filmstrip__videos'
|
||||||
id = 'filmstripLocalScreenShare'>
|
id = 'filmstripLocalScreenShare'>
|
||||||
|
@ -415,7 +415,7 @@ class Filmstrip extends PureComponent <IProps, IState> {
|
||||||
{
|
{
|
||||||
!tileViewActive && filmstripType === FILMSTRIP_TYPE.MAIN && <Thumbnail
|
!tileViewActive && filmstripType === FILMSTRIP_TYPE.MAIN && <Thumbnail
|
||||||
key = 'localScreenShare'
|
key = 'localScreenShare'
|
||||||
participantID = { _localScreenShare.id } />
|
participantID = { _localScreenShareId } />
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -434,6 +434,12 @@ class Filmstrip extends PureComponent <IProps, IState> {
|
||||||
_verticalViewGrid && 'no-vertical-padding',
|
_verticalViewGrid && 'no-vertical-padding',
|
||||||
_verticalViewBackground && classes.filmstripBackground) }
|
_verticalViewBackground && classes.filmstripBackground) }
|
||||||
style = { filmstripStyle }>
|
style = { filmstripStyle }>
|
||||||
|
<span
|
||||||
|
aria-level = { 1 }
|
||||||
|
className = 'sr-only'
|
||||||
|
role = 'heading'>
|
||||||
|
{ t('filmstrip.accessibilityLabel.heading') }
|
||||||
|
</span>
|
||||||
{ toolbar }
|
{ toolbar }
|
||||||
{_resizableFilmstrip
|
{_resizableFilmstrip
|
||||||
? <div
|
? <div
|
||||||
|
@ -912,7 +918,7 @@ function _mapStateToProps(state: IReduxState, ownProps: Partial<IProps>) {
|
||||||
_isFilmstripButtonEnabled: isButtonEnabled('filmstrip', state),
|
_isFilmstripButtonEnabled: isButtonEnabled('filmstrip', state),
|
||||||
_isToolboxVisible: isToolboxVisible(state),
|
_isToolboxVisible: isToolboxVisible(state),
|
||||||
_isVerticalFilmstrip,
|
_isVerticalFilmstrip,
|
||||||
_localScreenShare: localScreenShare,
|
_localScreenShareId: localScreenShare?.id,
|
||||||
_mainFilmstripVisible: visible,
|
_mainFilmstripVisible: visible,
|
||||||
_maxFilmstripWidth: clientWidth - MIN_STAGE_VIEW_WIDTH,
|
_maxFilmstripWidth: clientWidth - MIN_STAGE_VIEW_WIDTH,
|
||||||
_maxTopPanelHeight: clientHeight - MIN_STAGE_VIEW_HEIGHT,
|
_maxTopPanelHeight: clientHeight - MIN_STAGE_VIEW_HEIGHT,
|
||||||
|
|
|
@ -3,7 +3,8 @@ import { Theme } from '@mui/material';
|
||||||
import { withStyles } from '@mui/styles';
|
import { withStyles } from '@mui/styles';
|
||||||
import clsx from 'clsx';
|
import clsx from 'clsx';
|
||||||
import debounce from 'lodash/debounce';
|
import debounce from 'lodash/debounce';
|
||||||
import React, { Component } from 'react';
|
import React, { Component, KeyboardEvent, RefObject, createRef } from 'react';
|
||||||
|
import { WithTranslation } from 'react-i18next';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
|
|
||||||
import { createScreenSharingIssueEvent } from '../../../analytics/AnalyticsEvents';
|
import { createScreenSharingIssueEvent } from '../../../analytics/AnalyticsEvents';
|
||||||
|
@ -12,6 +13,7 @@ import { IReduxState } from '../../../app/types';
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import { Avatar } from '../../../base/avatar';
|
import { Avatar } from '../../../base/avatar';
|
||||||
import { isMobileBrowser } from '../../../base/environment/utils';
|
import { isMobileBrowser } from '../../../base/environment/utils';
|
||||||
|
import { translate } from '../../../base/i18n/functions';
|
||||||
import { JitsiTrackEvents } from '../../../base/lib-jitsi-meet';
|
import { JitsiTrackEvents } from '../../../base/lib-jitsi-meet';
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import { VideoTrack } from '../../../base/media';
|
import { VideoTrack } from '../../../base/media';
|
||||||
|
@ -28,6 +30,8 @@ import {
|
||||||
import { IParticipant } from '../../../base/participants/types';
|
import { IParticipant } from '../../../base/participants/types';
|
||||||
import { ASPECT_RATIO_NARROW } from '../../../base/responsive-ui/constants';
|
import { ASPECT_RATIO_NARROW } from '../../../base/responsive-ui/constants';
|
||||||
import { isTestModeEnabled } from '../../../base/testing/functions';
|
import { isTestModeEnabled } from '../../../base/testing/functions';
|
||||||
|
// @ts-ignore
|
||||||
|
import { Tooltip } from '../../../base/tooltip';
|
||||||
import { trackStreamingStatusChanged, updateLastTrackVideoMediaEvent } from '../../../base/tracks/actions';
|
import { trackStreamingStatusChanged, updateLastTrackVideoMediaEvent } from '../../../base/tracks/actions';
|
||||||
import {
|
import {
|
||||||
getLocalAudioTrack,
|
getLocalAudioTrack,
|
||||||
|
@ -97,7 +101,7 @@ export interface IState {
|
||||||
/**
|
/**
|
||||||
* The type of the React {@code Component} props of {@link Thumbnail}.
|
* The type of the React {@code Component} props of {@link Thumbnail}.
|
||||||
*/
|
*/
|
||||||
export interface IProps {
|
export interface IProps extends WithTranslation {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The audio track related to the participant.
|
* The audio track related to the participant.
|
||||||
|
@ -372,6 +376,22 @@ const defaultStyles = (theme: Theme) => {
|
||||||
height: '100%',
|
height: '100%',
|
||||||
backgroundColor: `${theme.palette.uiBackground}`,
|
backgroundColor: `${theme.palette.uiBackground}`,
|
||||||
opacity: 0.8
|
opacity: 0.8
|
||||||
|
},
|
||||||
|
|
||||||
|
keyboardPinButton: {
|
||||||
|
position: 'absolute' as const,
|
||||||
|
zIndex: 10,
|
||||||
|
|
||||||
|
/* this button is only for keyboard/screen reader users,
|
||||||
|
an onClick handler is already set elsewhere for mouse users, so make sure
|
||||||
|
we can't click on it */
|
||||||
|
pointerEvents: 'none' as const,
|
||||||
|
|
||||||
|
// make room for the border to correctly show up
|
||||||
|
left: '3px',
|
||||||
|
right: '3px',
|
||||||
|
bottom: '3px',
|
||||||
|
top: '3px'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -387,6 +407,11 @@ class Thumbnail extends Component<IProps, IState> {
|
||||||
*/
|
*/
|
||||||
timeoutHandle?: number;
|
timeoutHandle?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Ref to the container of the thumbnail.
|
||||||
|
*/
|
||||||
|
containerRef?: RefObject<HTMLSpanElement>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Timeout used to detect double tapping.
|
* Timeout used to detect double tapping.
|
||||||
* It is active while user has tapped once.
|
* It is active while user has tapped once.
|
||||||
|
@ -414,10 +439,13 @@ class Thumbnail extends Component<IProps, IState> {
|
||||||
displayMode: computeDisplayModeFromInput(getDisplayModeInput(props, state))
|
displayMode: computeDisplayModeFromInput(getDisplayModeInput(props, state))
|
||||||
};
|
};
|
||||||
this.timeoutHandle = undefined;
|
this.timeoutHandle = undefined;
|
||||||
|
this.containerRef = createRef<HTMLSpanElement>();
|
||||||
this._clearDoubleClickTimeout = this._clearDoubleClickTimeout.bind(this);
|
this._clearDoubleClickTimeout = this._clearDoubleClickTimeout.bind(this);
|
||||||
this._onCanPlay = this._onCanPlay.bind(this);
|
this._onCanPlay = this._onCanPlay.bind(this);
|
||||||
this._onClick = this._onClick.bind(this);
|
this._onClick = this._onClick.bind(this);
|
||||||
|
this._onTogglePinButtonKeyDown = this._onTogglePinButtonKeyDown.bind(this);
|
||||||
|
this._onFocus = this._onFocus.bind(this);
|
||||||
|
this._onBlur = this._onBlur.bind(this);
|
||||||
this._onMouseEnter = this._onMouseEnter.bind(this);
|
this._onMouseEnter = this._onMouseEnter.bind(this);
|
||||||
this._onMouseMove = debounce(this._onMouseMove.bind(this), 100, {
|
this._onMouseMove = debounce(this._onMouseMove.bind(this), 100, {
|
||||||
leading: true,
|
leading: true,
|
||||||
|
@ -731,6 +759,53 @@ class Thumbnail extends Component<IProps, IState> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is called as a onKeydown handler on the keyboard-only button to toggle pin.
|
||||||
|
*
|
||||||
|
* @param {KeyboardEvent} event - The keydown event.
|
||||||
|
* @returns {void}
|
||||||
|
*/
|
||||||
|
_onTogglePinButtonKeyDown(event: KeyboardEvent) {
|
||||||
|
if (event.key === 'Enter' || event.key === ' ') {
|
||||||
|
this._onClick();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Keyboard focus handler.
|
||||||
|
*
|
||||||
|
* When navigating with keyboard, make things behave as we
|
||||||
|
* hover with the mouse, to make the UI show up.
|
||||||
|
*
|
||||||
|
* @returns {void}
|
||||||
|
*/
|
||||||
|
_onFocus() {
|
||||||
|
this.setState({ isHovered: true });
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Keyboard blur handler.
|
||||||
|
*
|
||||||
|
* When navigating with keyboard, make things behave as we
|
||||||
|
* hover with the mouse, to make the UI show up.
|
||||||
|
*
|
||||||
|
* @returns {void}
|
||||||
|
*/
|
||||||
|
_onBlur() {
|
||||||
|
// we need this timeout trick so that we get the actual document.activeElement value
|
||||||
|
// instead of document.body
|
||||||
|
setTimeout(() => {
|
||||||
|
// we also explicitly check for popovers, because the thumbnail can show popovers,
|
||||||
|
// and they are not rendered in the thumbnail DOM element
|
||||||
|
if (
|
||||||
|
!this.containerRef?.current?.contains(document.activeElement)
|
||||||
|
&& document.activeElement?.closest('.popover') === null
|
||||||
|
) {
|
||||||
|
this.setState({ isHovered: false });
|
||||||
|
}
|
||||||
|
}, 0);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Mouse enter handler.
|
* Mouse enter handler.
|
||||||
*
|
*
|
||||||
|
@ -808,21 +883,27 @@ class Thumbnail extends Component<IProps, IState> {
|
||||||
* @returns {ReactElement}
|
* @returns {ReactElement}
|
||||||
*/
|
*/
|
||||||
_renderFakeParticipant() {
|
_renderFakeParticipant() {
|
||||||
const { _isMobile, _participant: { avatarURL } } = this.props;
|
const { _isMobile, _participant: { avatarURL, pinned, name } } = this.props;
|
||||||
const styles = this._getStyles();
|
const styles = this._getStyles();
|
||||||
const containerClassName = this._getContainerClassName();
|
const containerClassName = this._getContainerClassName();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<span
|
<span
|
||||||
|
aria-label = { this.props.t(pinned ? 'unpinParticipant' : 'pinParticipant', {
|
||||||
|
participantName: name
|
||||||
|
}) }
|
||||||
className = { containerClassName }
|
className = { containerClassName }
|
||||||
id = 'sharedVideoContainer'
|
id = 'sharedVideoContainer'
|
||||||
onClick = { this._onClick }
|
onClick = { this._onClick }
|
||||||
|
onKeyDown = { this._onTogglePinButtonKeyDown }
|
||||||
{ ...(_isMobile ? {} : {
|
{ ...(_isMobile ? {} : {
|
||||||
onMouseEnter: this._onMouseEnter,
|
onMouseEnter: this._onMouseEnter,
|
||||||
onMouseMove: this._onMouseMove,
|
onMouseMove: this._onMouseMove,
|
||||||
onMouseLeave: this._onMouseLeave
|
onMouseLeave: this._onMouseLeave
|
||||||
}) }
|
}) }
|
||||||
style = { styles.thumbnail }>
|
role = 'button'
|
||||||
|
style = { styles.thumbnail }
|
||||||
|
tabIndex = { 0 }>
|
||||||
{avatarURL ? (
|
{avatarURL ? (
|
||||||
<img
|
<img
|
||||||
className = 'sharedVideoAvatar'
|
className = 'sharedVideoAvatar'
|
||||||
|
@ -981,9 +1062,10 @@ class Thumbnail extends Component<IProps, IState> {
|
||||||
_thumbnailType,
|
_thumbnailType,
|
||||||
_videoTrack,
|
_videoTrack,
|
||||||
classes,
|
classes,
|
||||||
filmstripType
|
filmstripType,
|
||||||
|
t
|
||||||
} = this.props;
|
} = this.props;
|
||||||
const { id } = _participant || {};
|
const { id, name, pinned } = _participant || {};
|
||||||
const { isHovered, popoverVisible } = this.state;
|
const { isHovered, popoverVisible } = this.state;
|
||||||
const styles = this._getStyles();
|
const styles = this._getStyles();
|
||||||
let containerClassName = this._getContainerClassName();
|
let containerClassName = this._getContainerClassName();
|
||||||
|
@ -992,6 +1074,9 @@ class Thumbnail extends Component<IProps, IState> {
|
||||||
const jitsiVideoTrack = _videoTrack?.jitsiTrack;
|
const jitsiVideoTrack = _videoTrack?.jitsiTrack;
|
||||||
const videoTrackId = jitsiVideoTrack?.getId();
|
const videoTrackId = jitsiVideoTrack?.getId();
|
||||||
const videoEventListeners: any = {};
|
const videoEventListeners: any = {};
|
||||||
|
const pinButtonLabel = t(pinned ? 'unpinParticipant' : 'pinParticipant', {
|
||||||
|
participantName: name
|
||||||
|
});
|
||||||
|
|
||||||
if (local) {
|
if (local) {
|
||||||
if (_isMobilePortrait) {
|
if (_isMobilePortrait) {
|
||||||
|
@ -1022,6 +1107,8 @@ class Thumbnail extends Component<IProps, IState> {
|
||||||
? `localVideoContainer${filmstripType === FILMSTRIP_TYPE.MAIN ? '' : `_${filmstripType}`}`
|
? `localVideoContainer${filmstripType === FILMSTRIP_TYPE.MAIN ? '' : `_${filmstripType}`}`
|
||||||
: `participant_${id}${filmstripType === FILMSTRIP_TYPE.MAIN ? '' : `_${filmstripType}`}`
|
: `participant_${id}${filmstripType === FILMSTRIP_TYPE.MAIN ? '' : `_${filmstripType}`}`
|
||||||
}
|
}
|
||||||
|
onBlur = { this._onBlur }
|
||||||
|
onFocus = { this._onFocus }
|
||||||
{ ...(_isMobile
|
{ ...(_isMobile
|
||||||
? {
|
? {
|
||||||
onTouchEnd: this._onTouchEnd,
|
onTouchEnd: this._onTouchEnd,
|
||||||
|
@ -1035,7 +1122,19 @@ class Thumbnail extends Component<IProps, IState> {
|
||||||
onMouseLeave: this._onMouseLeave
|
onMouseLeave: this._onMouseLeave
|
||||||
}
|
}
|
||||||
) }
|
) }
|
||||||
|
ref = { this.containerRef }
|
||||||
style = { styles.thumbnail }>
|
style = { styles.thumbnail }>
|
||||||
|
{/* this "button" is invisible, only here so that
|
||||||
|
keyboard/screen reader users can pin/unpin */}
|
||||||
|
<Tooltip
|
||||||
|
content = { pinButtonLabel }>
|
||||||
|
<span
|
||||||
|
aria-label = { pinButtonLabel }
|
||||||
|
className = { classes.keyboardPinButton }
|
||||||
|
onKeyDown = { this._onTogglePinButtonKeyDown }
|
||||||
|
role = 'button'
|
||||||
|
tabIndex = { 0 } />
|
||||||
|
</Tooltip>
|
||||||
{!_gifSrc && (local
|
{!_gifSrc && (local
|
||||||
? <span id = 'localVideoWrapper'>{video}</span>
|
? <span id = 'localVideoWrapper'>{video}</span>
|
||||||
: video)}
|
: video)}
|
||||||
|
@ -1322,4 +1421,4 @@ function _mapStateToProps(state: IReduxState, ownProps: any): Object {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export default connect(_mapStateToProps)(withStyles(defaultStyles)(Thumbnail));
|
export default connect(_mapStateToProps)(withStyles(defaultStyles)(translate(Thumbnail)));
|
||||||
|
|
|
@ -26,7 +26,7 @@ export const styles = (theme: Theme) => {
|
||||||
transition: 'opacity .3s',
|
transition: 'opacity .3s',
|
||||||
zIndex: 1,
|
zIndex: 1,
|
||||||
|
|
||||||
'&:hover': {
|
'&:hover, &:focus-within': {
|
||||||
backgroundColor: theme.palette.ui02
|
backgroundColor: theme.palette.ui02
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -70,7 +70,7 @@ export const styles = (theme: Theme) => {
|
||||||
right: 0,
|
right: 0,
|
||||||
bottom: 0,
|
bottom: 0,
|
||||||
|
|
||||||
'&:hover': {
|
'&:hover, &:focus-within': {
|
||||||
'& .resizable-filmstrip': {
|
'& .resizable-filmstrip': {
|
||||||
backgroundColor: BACKGROUND_COLOR
|
backgroundColor: BACKGROUND_COLOR
|
||||||
},
|
},
|
||||||
|
@ -106,7 +106,7 @@ export const styles = (theme: Theme) => {
|
||||||
filmstripBackground: {
|
filmstripBackground: {
|
||||||
backgroundColor: theme.palette.uiBackground,
|
backgroundColor: theme.palette.uiBackground,
|
||||||
|
|
||||||
'&:hover': {
|
'&:hover, &:focus-within': {
|
||||||
backgroundColor: theme.palette.uiBackground
|
backgroundColor: theme.palette.uiBackground
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -19,6 +19,8 @@ import { SETTINGS_UPDATED } from '../base/settings/actionTypes';
|
||||||
import { setTileView } from '../video-layout/actions.web';
|
import { setTileView } from '../video-layout/actions.web';
|
||||||
import { LAYOUTS } from '../video-layout/constants';
|
import { LAYOUTS } from '../video-layout/constants';
|
||||||
import { getCurrentLayout } from '../video-layout/functions.web';
|
import { getCurrentLayout } from '../video-layout/functions.web';
|
||||||
|
import { WHITEBOARD_ID } from '../whiteboard/constants';
|
||||||
|
import { isWhiteboardVisible } from '../whiteboard/functions';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
ADD_STAGE_PARTICIPANT,
|
ADD_STAGE_PARTICIPANT,
|
||||||
|
@ -168,6 +170,7 @@ MiddlewareRegistry.register(store => next => action => {
|
||||||
const state = getState();
|
const state = getState();
|
||||||
const { activeParticipants } = state['features/filmstrip'];
|
const { activeParticipants } = state['features/filmstrip'];
|
||||||
const { maxStageParticipants } = state['features/base/settings'];
|
const { maxStageParticipants } = state['features/base/settings'];
|
||||||
|
const isWhiteboardActive = isWhiteboardVisible(state);
|
||||||
let queue;
|
let queue;
|
||||||
|
|
||||||
if (activeParticipants.find(p => p.participantId === participantId)) {
|
if (activeParticipants.find(p => p.participantId === participantId)) {
|
||||||
|
@ -205,6 +208,14 @@ MiddlewareRegistry.register(store => next => action => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (participantId === WHITEBOARD_ID) {
|
||||||
|
// If the whiteboard is pinned, this action should clear the other pins.
|
||||||
|
queue = [ { participantId } ];
|
||||||
|
} else if (isWhiteboardActive && Array.isArray(queue)) {
|
||||||
|
// When another participant is pinned, remove the whiteboard from the stage area.
|
||||||
|
queue = queue.filter(p => p?.participantId !== WHITEBOARD_ID);
|
||||||
|
}
|
||||||
|
|
||||||
// If queue is undefined we haven't made any changes to the active participants. This will mostly happen
|
// If queue is undefined we haven't made any changes to the active participants. This will mostly happen
|
||||||
// if the participant that we are trying to add is not pinned and all slots are currently taken by pinned
|
// if the participant that we are trying to add is not pinned and all slots are currently taken by pinned
|
||||||
// participants.
|
// participants.
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
/**
|
|
||||||
* The type of the action which signals the keyboard shortcuts dialog should
|
|
||||||
* be displayed.
|
|
||||||
*
|
|
||||||
* {
|
|
||||||
* type: OPEN_KEYBOARD_SHORTCUTS_DIALOG
|
|
||||||
* }
|
|
||||||
*/
|
|
||||||
export const OPEN_KEYBOARD_SHORTCUTS_DIALOG
|
|
||||||
= 'OPEN_KEYBOARD_SHORTCUTS_DIALOG';
|
|
|
@ -1,14 +0,0 @@
|
||||||
import { OPEN_KEYBOARD_SHORTCUTS_DIALOG } from './actionTypes';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Opens the dialog showing available keyboard shortcuts.
|
|
||||||
*
|
|
||||||
* @returns {{
|
|
||||||
* type: OPEN_KEYBOARD_SHORTCUTS_DIALOG
|
|
||||||
* }}
|
|
||||||
*/
|
|
||||||
export function openKeyboardShortcutsDialog() {
|
|
||||||
return {
|
|
||||||
type: OPEN_KEYBOARD_SHORTCUTS_DIALOG
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -5,7 +5,8 @@ import { translate } from '../../../base/i18n';
|
||||||
import { IconShortcuts } from '../../../base/icons';
|
import { IconShortcuts } from '../../../base/icons';
|
||||||
import { connect } from '../../../base/redux';
|
import { connect } from '../../../base/redux';
|
||||||
import { AbstractButton, type AbstractButtonProps } from '../../../base/toolbox/components';
|
import { AbstractButton, type AbstractButtonProps } from '../../../base/toolbox/components';
|
||||||
import { openKeyboardShortcutsDialog } from '../../actions';
|
import { openSettingsDialog } from '../../../settings/actions';
|
||||||
|
import { SETTINGS_TABS } from '../../../settings/constants';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The type of the React {@code Component} props of {@link KeyboardShortcutsButton}.
|
* The type of the React {@code Component} props of {@link KeyboardShortcutsButton}.
|
||||||
|
@ -37,7 +38,7 @@ class KeyboardShortcutsButton extends AbstractButton<Props, *> {
|
||||||
const { dispatch } = this.props;
|
const { dispatch } = this.props;
|
||||||
|
|
||||||
sendAnalytics(createToolbarEvent('shortcuts'));
|
sendAnalytics(createToolbarEvent('shortcuts'));
|
||||||
dispatch(openKeyboardShortcutsDialog());
|
dispatch(openSettingsDialog(SETTINGS_TABS.SHORTCUTS));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,102 +0,0 @@
|
||||||
import React from 'react';
|
|
||||||
import { useTranslation } from 'react-i18next';
|
|
||||||
import { makeStyles } from 'tss-react/mui';
|
|
||||||
|
|
||||||
import { withPixelLineHeight } from '../../../base/styles/functions.web';
|
|
||||||
import Dialog from '../../../base/ui/components/web/Dialog';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The type of the React {@code Component} props of
|
|
||||||
* {@link KeyboardShortcutsDialog}.
|
|
||||||
*/
|
|
||||||
interface IProps {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A Map with keyboard keys as keys and translation keys as values.
|
|
||||||
*/
|
|
||||||
shortcutDescriptions: Map<string, string>;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates the styles for the component.
|
|
||||||
*
|
|
||||||
* @param {Object} theme - The current UI theme.
|
|
||||||
*
|
|
||||||
* @returns {Object}
|
|
||||||
*/
|
|
||||||
const useStyles = makeStyles()(theme => {
|
|
||||||
return {
|
|
||||||
list: {
|
|
||||||
listStyleType: 'none',
|
|
||||||
padding: 0,
|
|
||||||
|
|
||||||
'& .shortcuts-list__item': {
|
|
||||||
display: 'flex',
|
|
||||||
justifyContent: 'space-between',
|
|
||||||
alignItems: 'center',
|
|
||||||
padding: `${theme.spacing(1)} 0`,
|
|
||||||
...withPixelLineHeight(theme.typography.bodyShortRegular),
|
|
||||||
color: theme.palette.text01
|
|
||||||
},
|
|
||||||
|
|
||||||
'& .item-action': {
|
|
||||||
backgroundColor: theme.palette.ui04,
|
|
||||||
...withPixelLineHeight(theme.typography.labelBold),
|
|
||||||
padding: `${theme.spacing(1)} ${theme.spacing(2)}`,
|
|
||||||
borderRadius: `${Number(theme.shape.borderRadius) / 2}px`
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
||||||
const KeyboardShortcutsDialog = ({ shortcutDescriptions }: IProps) => {
|
|
||||||
const { classes, cx } = useStyles();
|
|
||||||
const { t } = useTranslation();
|
|
||||||
|
|
||||||
// eslint-disable-next-line react/no-multi-comp
|
|
||||||
const _renderShortcutsListItem = (keyboardKey: string, translationKey: string) => {
|
|
||||||
let modifierKey = 'Alt';
|
|
||||||
|
|
||||||
if (window.navigator?.platform) {
|
|
||||||
if (window.navigator.platform.indexOf('Mac') !== -1) {
|
|
||||||
modifierKey = '⌥';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<li
|
|
||||||
className = 'shortcuts-list__item'
|
|
||||||
key = { keyboardKey }>
|
|
||||||
<span
|
|
||||||
aria-label = { t(translationKey) }
|
|
||||||
className = 'shortcuts-list__description'>
|
|
||||||
{t(translationKey)}
|
|
||||||
</span>
|
|
||||||
<span className = 'item-action'>
|
|
||||||
{keyboardKey.startsWith(':')
|
|
||||||
? `${modifierKey} + ${keyboardKey.slice(1)}`
|
|
||||||
: keyboardKey}
|
|
||||||
</span>
|
|
||||||
</li>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Dialog
|
|
||||||
cancel = {{ hidden: true }}
|
|
||||||
ok = {{ hidden: true }}
|
|
||||||
titleKey = 'keyboardShortcuts.keyboardShortcuts'>
|
|
||||||
<div
|
|
||||||
id = 'keyboard-shortcuts'>
|
|
||||||
<ul
|
|
||||||
className = { cx('shortcuts-list', classes.list) }
|
|
||||||
id = 'keyboard-shortcuts-list'>
|
|
||||||
{Array.from(shortcutDescriptions)
|
|
||||||
.map(description => _renderShortcutsListItem(...description))}
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</Dialog>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default KeyboardShortcutsDialog;
|
|
|
@ -1,2 +1 @@
|
||||||
export { default as KeyboardShortcutsButton } from './KeyboardShortcutsButton';
|
export { default as KeyboardShortcutsButton } from './KeyboardShortcutsButton';
|
||||||
export { default as KeyboardShortcutsDialog } from './KeyboardShortcutsDialog';
|
|
||||||
|
|
|
@ -1,2 +1 @@
|
||||||
export * from './actions';
|
|
||||||
export * from './components';
|
export * from './components';
|
||||||
|
|
|
@ -1,21 +0,0 @@
|
||||||
import MiddlewareRegistry from '../base/redux/MiddlewareRegistry';
|
|
||||||
|
|
||||||
import { OPEN_KEYBOARD_SHORTCUTS_DIALOG } from './actionTypes';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Implements the middleware of the feature keyboard-shortcuts.
|
|
||||||
*
|
|
||||||
* @param {Store} store - The redux store.
|
|
||||||
* @returns {Function}
|
|
||||||
*/
|
|
||||||
MiddlewareRegistry.register(_store => next => action => {
|
|
||||||
switch (action.type) {
|
|
||||||
case OPEN_KEYBOARD_SHORTCUTS_DIALOG:
|
|
||||||
if (typeof APP === 'object') {
|
|
||||||
APP.keyboardshortcut.openDialog();
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return next(action);
|
|
||||||
});
|
|
|
@ -116,12 +116,18 @@ export function showNotification(props: INotificationProps = {}, type?: string)
|
||||||
const { disabledNotifications = [], notifications, notificationTimeouts } = getState()['features/base/config'];
|
const { disabledNotifications = [], notifications, notificationTimeouts } = getState()['features/base/config'];
|
||||||
const enabledFlag = getFeatureFlag(getState(), NOTIFICATIONS_ENABLED, true);
|
const enabledFlag = getFeatureFlag(getState(), NOTIFICATIONS_ENABLED, true);
|
||||||
|
|
||||||
|
const { descriptionKey, titleKey } = props;
|
||||||
|
|
||||||
const shouldDisplay = enabledFlag
|
const shouldDisplay = enabledFlag
|
||||||
&& !(disabledNotifications.includes(props.descriptionKey ?? '')
|
&& !(disabledNotifications.includes(descriptionKey ?? '')
|
||||||
|| disabledNotifications.includes(props.titleKey ?? ''))
|
|| disabledNotifications.includes(titleKey ?? ''))
|
||||||
&& (!notifications
|
&& (!notifications
|
||||||
|| notifications.includes(props.descriptionKey ?? '')
|
|| notifications.includes(descriptionKey ?? '')
|
||||||
|| notifications.includes(props.titleKey ?? ''));
|
|| notifications.includes(titleKey ?? ''));
|
||||||
|
|
||||||
|
if (typeof APP !== 'undefined') {
|
||||||
|
APP.API.notifyNotificationTriggered(titleKey, descriptionKey);
|
||||||
|
}
|
||||||
|
|
||||||
if (shouldDisplay) {
|
if (shouldDisplay) {
|
||||||
return dispatch({
|
return dispatch({
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
import React, { useCallback, useEffect, useState } from 'react';
|
import React, { useCallback, useEffect, useState } from 'react';
|
||||||
|
|
||||||
import { translate } from '../../../base/i18n';
|
|
||||||
import { JitsiTrackEvents } from '../../../base/lib-jitsi-meet';
|
import { JitsiTrackEvents } from '../../../base/lib-jitsi-meet';
|
||||||
import { MEDIA_TYPE } from '../../../base/media';
|
import { MEDIA_TYPE } from '../../../base/media';
|
||||||
import {
|
import {
|
||||||
|
@ -163,9 +162,9 @@ type Props = {
|
||||||
participantID: ?string,
|
participantID: ?string,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The translate function.
|
* Callback used to stop a participant's video.
|
||||||
*/
|
*/
|
||||||
t: Function,
|
stopVideo: Function,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The translated "you" text.
|
* The translated "you" text.
|
||||||
|
@ -192,17 +191,15 @@ function MeetingParticipantItem({
|
||||||
_quickActionButtonType,
|
_quickActionButtonType,
|
||||||
_raisedHand,
|
_raisedHand,
|
||||||
_videoMediaState,
|
_videoMediaState,
|
||||||
askUnmuteText,
|
|
||||||
isHighlighted,
|
isHighlighted,
|
||||||
isInBreakoutRoom,
|
isInBreakoutRoom,
|
||||||
muteAudio,
|
muteAudio,
|
||||||
muteParticipantButtonText,
|
|
||||||
onContextMenu,
|
onContextMenu,
|
||||||
onLeave,
|
onLeave,
|
||||||
openDrawerForParticipant,
|
openDrawerForParticipant,
|
||||||
overflowDrawer,
|
overflowDrawer,
|
||||||
participantActionEllipsisLabel,
|
participantActionEllipsisLabel,
|
||||||
t,
|
stopVideo,
|
||||||
youText
|
youText
|
||||||
}: Props) {
|
}: Props) {
|
||||||
|
|
||||||
|
@ -242,12 +239,6 @@ function MeetingParticipantItem({
|
||||||
const audioMediaState = _audioMediaState === MEDIA_STATE.UNMUTED && hasAudioLevels
|
const audioMediaState = _audioMediaState === MEDIA_STATE.UNMUTED && hasAudioLevels
|
||||||
? MEDIA_STATE.DOMINANT_SPEAKER : _audioMediaState;
|
? MEDIA_STATE.DOMINANT_SPEAKER : _audioMediaState;
|
||||||
|
|
||||||
let askToUnmuteText = askUnmuteText;
|
|
||||||
|
|
||||||
if (_audioMediaState !== MEDIA_STATE.FORCE_MUTED && _videoMediaState === MEDIA_STATE.FORCE_MUTED) {
|
|
||||||
askToUnmuteText = t('participantsPane.actions.allowVideo');
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ParticipantItem
|
<ParticipantItem
|
||||||
actionsTrigger = { ACTION_TRIGGER.HOVER }
|
actionsTrigger = { ACTION_TRIGGER.HOVER }
|
||||||
|
@ -273,16 +264,16 @@ function MeetingParticipantItem({
|
||||||
&& <>
|
&& <>
|
||||||
{!isInBreakoutRoom && (
|
{!isInBreakoutRoom && (
|
||||||
<ParticipantQuickAction
|
<ParticipantQuickAction
|
||||||
askUnmuteText = { askToUnmuteText }
|
|
||||||
buttonType = { _quickActionButtonType }
|
buttonType = { _quickActionButtonType }
|
||||||
muteAudio = { muteAudio }
|
muteAudio = { muteAudio }
|
||||||
muteParticipantButtonText = { muteParticipantButtonText }
|
|
||||||
participantID = { _participantID }
|
participantID = { _participantID }
|
||||||
participantName = { _displayName } />
|
participantName = { _displayName }
|
||||||
|
stopVideo = { stopVideo } />
|
||||||
)}
|
)}
|
||||||
<ParticipantActionEllipsis
|
<ParticipantActionEllipsis
|
||||||
accessibilityLabel = { participantActionEllipsisLabel }
|
accessibilityLabel = { participantActionEllipsisLabel }
|
||||||
onClick = { onContextMenu } />
|
onClick = { onContextMenu }
|
||||||
|
participantID = { _participantID } />
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -318,7 +309,7 @@ function _mapStateToProps(state, ownProps): Object {
|
||||||
const _isVideoMuted = isParticipantVideoMuted(participant, state);
|
const _isVideoMuted = isParticipantVideoMuted(participant, state);
|
||||||
const _audioMediaState = getParticipantAudioMediaState(participant, _isAudioMuted, state);
|
const _audioMediaState = getParticipantAudioMediaState(participant, _isAudioMuted, state);
|
||||||
const _videoMediaState = getParticipantVideoMediaState(participant, _isVideoMuted, state);
|
const _videoMediaState = getParticipantVideoMediaState(participant, _isVideoMuted, state);
|
||||||
const _quickActionButtonType = getQuickActionButtonType(participant, _isAudioMuted, state);
|
const _quickActionButtonType = getQuickActionButtonType(participant, _isAudioMuted, _isVideoMuted, state);
|
||||||
|
|
||||||
const tracks = state['features/base/tracks'];
|
const tracks = state['features/base/tracks'];
|
||||||
const _audioTrack = participantID === localParticipantId
|
const _audioTrack = participantID === localParticipantId
|
||||||
|
@ -342,4 +333,4 @@ function _mapStateToProps(state, ownProps): Object {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export default translate(connect(_mapStateToProps)(MeetingParticipantItem));
|
export default connect(_mapStateToProps)(MeetingParticipantItem);
|
||||||
|
|
|
@ -66,6 +66,11 @@ type Props = {
|
||||||
*/
|
*/
|
||||||
searchString?: string,
|
searchString?: string,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Callback used to stop a participant's video.
|
||||||
|
*/
|
||||||
|
stopVideo: Function,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The translated "you" text.
|
* The translated "you" text.
|
||||||
*/
|
*/
|
||||||
|
@ -78,28 +83,25 @@ type Props = {
|
||||||
* @returns {ReactNode}
|
* @returns {ReactNode}
|
||||||
*/
|
*/
|
||||||
function MeetingParticipantItems({
|
function MeetingParticipantItems({
|
||||||
askUnmuteText,
|
|
||||||
isInBreakoutRoom,
|
isInBreakoutRoom,
|
||||||
lowerMenu,
|
lowerMenu,
|
||||||
toggleMenu,
|
toggleMenu,
|
||||||
muteAudio,
|
muteAudio,
|
||||||
muteParticipantButtonText,
|
|
||||||
participantIds,
|
participantIds,
|
||||||
openDrawerForParticipant,
|
openDrawerForParticipant,
|
||||||
overflowDrawer,
|
overflowDrawer,
|
||||||
raiseContextId,
|
raiseContextId,
|
||||||
participantActionEllipsisLabel,
|
participantActionEllipsisLabel,
|
||||||
searchString,
|
searchString,
|
||||||
|
stopVideo,
|
||||||
youText
|
youText
|
||||||
}: Props) {
|
}: Props) {
|
||||||
const renderParticipant = id => (
|
const renderParticipant = id => (
|
||||||
<MeetingParticipantItem
|
<MeetingParticipantItem
|
||||||
askUnmuteText = { askUnmuteText }
|
|
||||||
isHighlighted = { raiseContextId === id }
|
isHighlighted = { raiseContextId === id }
|
||||||
isInBreakoutRoom = { isInBreakoutRoom }
|
isInBreakoutRoom = { isInBreakoutRoom }
|
||||||
key = { id }
|
key = { id }
|
||||||
muteAudio = { muteAudio }
|
muteAudio = { muteAudio }
|
||||||
muteParticipantButtonText = { muteParticipantButtonText }
|
|
||||||
onContextMenu = { toggleMenu(id) }
|
onContextMenu = { toggleMenu(id) }
|
||||||
onLeave = { lowerMenu }
|
onLeave = { lowerMenu }
|
||||||
openDrawerForParticipant = { openDrawerForParticipant }
|
openDrawerForParticipant = { openDrawerForParticipant }
|
||||||
|
@ -107,6 +109,7 @@ function MeetingParticipantItems({
|
||||||
participantActionEllipsisLabel = { participantActionEllipsisLabel }
|
participantActionEllipsisLabel = { participantActionEllipsisLabel }
|
||||||
participantID = { id }
|
participantID = { id }
|
||||||
searchString = { searchString }
|
searchString = { searchString }
|
||||||
|
stopVideo = { stopVideo }
|
||||||
youText = { youText } />
|
youText = { youText } />
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ import { useDispatch, useSelector } from 'react-redux';
|
||||||
import { makeStyles } from 'tss-react/mui';
|
import { makeStyles } from 'tss-react/mui';
|
||||||
|
|
||||||
import { IReduxState } from '../../../app/types';
|
import { IReduxState } from '../../../app/types';
|
||||||
import { rejectParticipantAudio } from '../../../av-moderation/actions';
|
import { rejectParticipantAudio, rejectParticipantVideo } from '../../../av-moderation/actions';
|
||||||
import participantsPaneTheme from '../../../base/components/themes/participantsPaneTheme.json';
|
import participantsPaneTheme from '../../../base/components/themes/participantsPaneTheme.json';
|
||||||
import { isToolbarButtonEnabled } from '../../../base/config/functions.web';
|
import { isToolbarButtonEnabled } from '../../../base/config/functions.web';
|
||||||
import { MEDIA_TYPE } from '../../../base/media/constants';
|
import { MEDIA_TYPE } from '../../../base/media/constants';
|
||||||
|
@ -88,11 +88,14 @@ function MeetingParticipants({
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
const [ lowerMenu, , toggleMenu, menuEnter, menuLeave, raiseContext ] = useContextMenu();
|
const [ lowerMenu, , toggleMenu, menuEnter, menuLeave, raiseContext ] = useContextMenu();
|
||||||
|
|
||||||
const muteAudio = useCallback(id => () => {
|
const muteAudio = useCallback(id => () => {
|
||||||
dispatch(muteRemote(id, MEDIA_TYPE.AUDIO));
|
dispatch(muteRemote(id, MEDIA_TYPE.AUDIO));
|
||||||
dispatch(rejectParticipantAudio(id));
|
dispatch(rejectParticipantAudio(id));
|
||||||
}, [ dispatch ]);
|
}, [ dispatch ]);
|
||||||
|
const stopVideo = useCallback(id => () => {
|
||||||
|
dispatch(muteRemote(id, MEDIA_TYPE.VIDEO));
|
||||||
|
dispatch(rejectParticipantVideo(id));
|
||||||
|
}, [ dispatch ]);
|
||||||
const [ drawerParticipant, closeDrawer, openDrawerForParticipant ] = useParticipantDrawer();
|
const [ drawerParticipant, closeDrawer, openDrawerForParticipant ] = useParticipantDrawer();
|
||||||
|
|
||||||
// FIXME:
|
// FIXME:
|
||||||
|
@ -103,8 +106,6 @@ function MeetingParticipants({
|
||||||
// mounted.
|
// mounted.
|
||||||
const participantActionEllipsisLabel = t('participantsPane.actions.moreParticipantOptions');
|
const participantActionEllipsisLabel = t('participantsPane.actions.moreParticipantOptions');
|
||||||
const youText = t('chat.you');
|
const youText = t('chat.you');
|
||||||
const askUnmuteText = t('participantsPane.actions.askUnmute');
|
|
||||||
const muteParticipantButtonText = t('dialog.muteParticipantButton');
|
|
||||||
const isBreakoutRoom = useSelector(isInBreakoutRoom);
|
const isBreakoutRoom = useSelector(isInBreakoutRoom);
|
||||||
const visitorsCount = useSelector((state: IReduxState) => state['features/visitors'].count);
|
const visitorsCount = useSelector((state: IReduxState) => state['features/visitors'].count);
|
||||||
|
|
||||||
|
@ -112,6 +113,12 @@ function MeetingParticipants({
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
<span
|
||||||
|
aria-level = { 1 }
|
||||||
|
className = 'sr-only'
|
||||||
|
role = 'heading'>
|
||||||
|
{ t('participantsPane.title') }
|
||||||
|
</span>
|
||||||
<div className = { cx(styles.heading, styles.headingW) }>
|
<div className = { cx(styles.heading, styles.headingW) }>
|
||||||
{visitorsCount && visitorsCount > 0
|
{visitorsCount && visitorsCount > 0
|
||||||
&& t('participantsPane.headings.visitors', { count: visitorsCount })}
|
&& t('participantsPane.headings.visitors', { count: visitorsCount })}
|
||||||
|
@ -130,11 +137,9 @@ function MeetingParticipants({
|
||||||
value = { searchString } />
|
value = { searchString } />
|
||||||
<div>
|
<div>
|
||||||
<MeetingParticipantItems
|
<MeetingParticipantItems
|
||||||
askUnmuteText = { askUnmuteText }
|
|
||||||
isInBreakoutRoom = { isBreakoutRoom }
|
isInBreakoutRoom = { isBreakoutRoom }
|
||||||
lowerMenu = { lowerMenu }
|
lowerMenu = { lowerMenu }
|
||||||
muteAudio = { muteAudio }
|
muteAudio = { muteAudio }
|
||||||
muteParticipantButtonText = { muteParticipantButtonText }
|
|
||||||
openDrawerForParticipant = { openDrawerForParticipant }
|
openDrawerForParticipant = { openDrawerForParticipant }
|
||||||
overflowDrawer = { overflowDrawer }
|
overflowDrawer = { overflowDrawer }
|
||||||
participantActionEllipsisLabel = { participantActionEllipsisLabel }
|
participantActionEllipsisLabel = { participantActionEllipsisLabel }
|
||||||
|
@ -142,6 +147,7 @@ function MeetingParticipants({
|
||||||
participantsCount = { participantsCount }
|
participantsCount = { participantsCount }
|
||||||
raiseContextId = { raiseContext.entity }
|
raiseContextId = { raiseContext.entity }
|
||||||
searchString = { normalizeAccents(searchString) }
|
searchString = { normalizeAccents(searchString) }
|
||||||
|
stopVideo = { stopVideo }
|
||||||
toggleMenu = { toggleMenu }
|
toggleMenu = { toggleMenu }
|
||||||
youText = { youText } />
|
youText = { youText } />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -14,14 +14,17 @@ interface IProps {
|
||||||
* Click handler function.
|
* Click handler function.
|
||||||
*/
|
*/
|
||||||
onClick: () => void;
|
onClick: () => void;
|
||||||
|
|
||||||
|
participantID?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const ParticipantActionEllipsis = ({ accessibilityLabel, onClick }: IProps) => (
|
const ParticipantActionEllipsis = ({ accessibilityLabel, onClick, participantID }: IProps) => (
|
||||||
<Button
|
<Button
|
||||||
accessibilityLabel = { accessibilityLabel }
|
accessibilityLabel = { accessibilityLabel }
|
||||||
icon = { IconDotsHorizontal }
|
icon = { IconDotsHorizontal }
|
||||||
onClick = { onClick }
|
onClick = { onClick }
|
||||||
size = 'small' />
|
size = 'small'
|
||||||
|
testId = { participantID ? `participant-more-options-${participantID}` : undefined } />
|
||||||
);
|
);
|
||||||
|
|
||||||
export default ParticipantActionEllipsis;
|
export default ParticipantActionEllipsis;
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { useTranslation } from 'react-i18next';
|
||||||
import { useDispatch } from 'react-redux';
|
import { useDispatch } from 'react-redux';
|
||||||
import { makeStyles } from 'tss-react/mui';
|
import { makeStyles } from 'tss-react/mui';
|
||||||
|
|
||||||
import { approveParticipant } from '../../../av-moderation/actions';
|
import { approveParticipantAudio, approveParticipantVideo } from '../../../av-moderation/actions';
|
||||||
import Button from '../../../base/ui/components/web/Button';
|
import Button from '../../../base/ui/components/web/Button';
|
||||||
import { QUICK_ACTION_BUTTON } from '../../constants';
|
import { QUICK_ACTION_BUTTON } from '../../constants';
|
||||||
|
|
||||||
|
@ -43,6 +43,12 @@ interface IProps {
|
||||||
* The name of the participant.
|
* The name of the participant.
|
||||||
*/
|
*/
|
||||||
participantName: string;
|
participantName: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Callback used to stop a participant's video.
|
||||||
|
*/
|
||||||
|
stopVideo: Function;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const useStyles = makeStyles()(theme => {
|
const useStyles = makeStyles()(theme => {
|
||||||
|
@ -54,19 +60,22 @@ const useStyles = makeStyles()(theme => {
|
||||||
});
|
});
|
||||||
|
|
||||||
const ParticipantQuickAction = ({
|
const ParticipantQuickAction = ({
|
||||||
askUnmuteText,
|
|
||||||
buttonType,
|
buttonType,
|
||||||
muteAudio,
|
muteAudio,
|
||||||
muteParticipantButtonText,
|
|
||||||
participantID,
|
participantID,
|
||||||
participantName
|
participantName,
|
||||||
|
stopVideo
|
||||||
}: IProps) => {
|
}: IProps) => {
|
||||||
const { classes: styles } = useStyles();
|
const { classes: styles } = useStyles();
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
const askToUnmute = useCallback(() => {
|
const askToUnmute = useCallback(() => {
|
||||||
dispatch(approveParticipant(participantID));
|
dispatch(approveParticipantAudio(participantID));
|
||||||
|
}, [ dispatch, participantID ]);
|
||||||
|
|
||||||
|
const allowVideo = useCallback(() => {
|
||||||
|
dispatch(approveParticipantVideo(participantID));
|
||||||
}, [ dispatch, participantID ]);
|
}, [ dispatch, participantID ]);
|
||||||
|
|
||||||
switch (buttonType) {
|
switch (buttonType) {
|
||||||
|
@ -75,10 +84,10 @@ const ParticipantQuickAction = ({
|
||||||
<Button
|
<Button
|
||||||
accessibilityLabel = { `${t('participantsPane.actions.mute')} ${participantName}` }
|
accessibilityLabel = { `${t('participantsPane.actions.mute')} ${participantName}` }
|
||||||
className = { styles.button }
|
className = { styles.button }
|
||||||
label = { muteParticipantButtonText }
|
label = { t('participantsPane.actions.mute') }
|
||||||
onClick = { muteAudio(participantID) }
|
onClick = { muteAudio(participantID) }
|
||||||
size = 'small'
|
size = 'small'
|
||||||
testId = { `mute-${participantID}` } />
|
testId = { `mute-audio-${participantID}` } />
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
case QUICK_ACTION_BUTTON.ASK_TO_UNMUTE: {
|
case QUICK_ACTION_BUTTON.ASK_TO_UNMUTE: {
|
||||||
|
@ -86,10 +95,32 @@ const ParticipantQuickAction = ({
|
||||||
<Button
|
<Button
|
||||||
accessibilityLabel = { `${t('participantsPane.actions.askUnmute')} ${participantName}` }
|
accessibilityLabel = { `${t('participantsPane.actions.askUnmute')} ${participantName}` }
|
||||||
className = { styles.button }
|
className = { styles.button }
|
||||||
label = { askUnmuteText }
|
label = { t('participantsPane.actions.askUnmute') }
|
||||||
onClick = { askToUnmute }
|
onClick = { askToUnmute }
|
||||||
size = 'small'
|
size = 'small'
|
||||||
testId = { `unmute-${participantID}` } />
|
testId = { `unmute-audio-${participantID}` } />
|
||||||
|
);
|
||||||
|
}
|
||||||
|
case QUICK_ACTION_BUTTON.ALLOW_VIDEO: {
|
||||||
|
return (
|
||||||
|
<Button
|
||||||
|
accessibilityLabel = { `${t('participantsPane.actions.askUnmute')} ${participantName}` }
|
||||||
|
className = { styles.button }
|
||||||
|
label = { t('participantsPane.actions.allowVideo') }
|
||||||
|
onClick = { allowVideo }
|
||||||
|
size = 'small'
|
||||||
|
testId = { `unmute-video-${participantID}` } />
|
||||||
|
);
|
||||||
|
}
|
||||||
|
case QUICK_ACTION_BUTTON.STOP_VIDEO: {
|
||||||
|
return (
|
||||||
|
<Button
|
||||||
|
accessibilityLabel = { `${t('participantsPane.actions.mute')} ${participantName}` }
|
||||||
|
className = { styles.button }
|
||||||
|
label = { t('participantsPane.actions.stopVideo') }
|
||||||
|
onClick = { stopVideo(participantID) }
|
||||||
|
size = 'small'
|
||||||
|
testId = { `mute-video-${participantID}` } />
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
|
|
|
@ -36,19 +36,23 @@ export const MEDIA_STATE: { [key: string]: MediaState; } = {
|
||||||
NONE: 'None'
|
NONE: 'None'
|
||||||
};
|
};
|
||||||
|
|
||||||
export type QuickActionButtonType = 'Mute' | 'AskToUnmute' | 'None';
|
export type QuickActionButtonType = 'Mute' | 'AskToUnmute' | 'AllowVideo' | 'StopVideo' | 'None';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enum of possible participant mute button states.
|
* Enum of possible participant mute button states.
|
||||||
*/
|
*/
|
||||||
export const QUICK_ACTION_BUTTON: {
|
export const QUICK_ACTION_BUTTON: {
|
||||||
|
ALLOW_VIDEO: QuickActionButtonType;
|
||||||
ASK_TO_UNMUTE: QuickActionButtonType;
|
ASK_TO_UNMUTE: QuickActionButtonType;
|
||||||
MUTE: QuickActionButtonType;
|
MUTE: QuickActionButtonType;
|
||||||
NONE: QuickActionButtonType;
|
NONE: QuickActionButtonType;
|
||||||
|
STOP_VIDEO: QuickActionButtonType;
|
||||||
} = {
|
} = {
|
||||||
|
ALLOW_VIDEO: 'AllowVideo',
|
||||||
MUTE: 'Mute',
|
MUTE: 'Mute',
|
||||||
ASK_TO_UNMUTE: 'AskToUnmute',
|
ASK_TO_UNMUTE: 'AskToUnmute',
|
||||||
NONE: 'None'
|
NONE: 'None',
|
||||||
|
STOP_VIDEO: 'StopVideo'
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -131,15 +131,28 @@ export const getParticipantsPaneOpen = (state: IReduxState) => Boolean(getState(
|
||||||
*
|
*
|
||||||
* @param {IParticipant} participant - The participant.
|
* @param {IParticipant} participant - The participant.
|
||||||
* @param {boolean} isAudioMuted - If audio is muted for the participant.
|
* @param {boolean} isAudioMuted - If audio is muted for the participant.
|
||||||
|
* @param {boolean} isVideoMuted - If audio is muted for the participant.
|
||||||
* @param {IReduxState} state - The redux state.
|
* @param {IReduxState} state - The redux state.
|
||||||
* @returns {string} - The type of the quick action button.
|
* @returns {string} - The type of the quick action button.
|
||||||
*/
|
*/
|
||||||
export function getQuickActionButtonType(participant: IParticipant, isAudioMuted: Boolean, state: IReduxState) {
|
export function getQuickActionButtonType(
|
||||||
|
participant: IParticipant,
|
||||||
|
isAudioMuted: Boolean,
|
||||||
|
isVideoMuted: Boolean,
|
||||||
|
state: IReduxState) {
|
||||||
// handled only by moderators
|
// handled only by moderators
|
||||||
|
const isVideoForceMuted = isForceMuted(participant, MEDIA_TYPE.VIDEO, state);
|
||||||
|
|
||||||
if (isLocalParticipantModerator(state)) {
|
if (isLocalParticipantModerator(state)) {
|
||||||
if (!isAudioMuted) {
|
if (!isAudioMuted) {
|
||||||
return QUICK_ACTION_BUTTON.MUTE;
|
return QUICK_ACTION_BUTTON.MUTE;
|
||||||
}
|
}
|
||||||
|
if (!isVideoMuted) {
|
||||||
|
return QUICK_ACTION_BUTTON.STOP_VIDEO;
|
||||||
|
}
|
||||||
|
if (isVideoForceMuted) {
|
||||||
|
return QUICK_ACTION_BUTTON.ALLOW_VIDEO;
|
||||||
|
}
|
||||||
if (isSupported()(state)) {
|
if (isSupported()(state)) {
|
||||||
return QUICK_ACTION_BUTTON.ASK_TO_UNMUTE;
|
return QUICK_ACTION_BUTTON.ASK_TO_UNMUTE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,7 +40,6 @@ const PollsPane = ({ createMode, onCreate, setCreateMode, t }: AbstractProps) =>
|
||||||
<div className = { classes.footer }>
|
<div className = { classes.footer }>
|
||||||
<Button
|
<Button
|
||||||
accessibilityLabel = { t('polls.create.create') }
|
accessibilityLabel = { t('polls.create.create') }
|
||||||
autoFocus = { true }
|
|
||||||
fullWidth = { true }
|
fullWidth = { true }
|
||||||
labelKey = { 'polls.create.create' }
|
labelKey = { 'polls.create.create' }
|
||||||
onClick = { onCreate } />
|
onClick = { onCreate } />
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue