Add option for muting remote videos, fixes #204

auto_join_3.3
Håvar Aambø Fosstveit 2020-04-30 13:10:34 +02:00
parent 2fced42c42
commit 881164a718
18 changed files with 101 additions and 3 deletions

View File

@ -8,6 +8,8 @@ import * as appPropTypes from '../../appPropTypes';
import { withRoomContext } from '../../../RoomContext'; import { withRoomContext } from '../../../RoomContext';
import { useIntl } from 'react-intl'; import { useIntl } from 'react-intl';
import IconButton from '@material-ui/core/IconButton'; import IconButton from '@material-ui/core/IconButton';
import VideocamIcon from '@material-ui/icons/Videocam';
import VideocamOffIcon from '@material-ui/icons/VideocamOff';
import MicIcon from '@material-ui/icons/Mic'; import MicIcon from '@material-ui/icons/Mic';
import MicOffIcon from '@material-ui/icons/MicOff'; import MicOffIcon from '@material-ui/icons/MicOff';
import ScreenIcon from '@material-ui/icons/ScreenShare'; import ScreenIcon from '@material-ui/icons/ScreenShare';
@ -104,11 +106,18 @@ const ListPeer = (props) =>
isModerator, isModerator,
peer, peer,
micConsumer, micConsumer,
webcamConsumer,
screenConsumer, screenConsumer,
children, children,
classes classes
} = props; } = props;
const webcamEnabled = (
Boolean(webcamConsumer) &&
!webcamConsumer.locallyPaused &&
!webcamConsumer.remotelyPaused
);
const micEnabled = ( const micEnabled = (
Boolean(micConsumer) && Boolean(micConsumer) &&
!micConsumer.locallyPaused && !micConsumer.locallyPaused &&
@ -153,8 +162,10 @@ const ListPeer = (props) =>
})} })}
color={screenVisible ? 'primary' : 'secondary'} color={screenVisible ? 'primary' : 'secondary'}
disabled={peer.peerScreenInProgress} disabled={peer.peerScreenInProgress}
onClick={() => onClick={(e) =>
{ {
e.stopPropagation();
screenVisible ? screenVisible ?
roomClient.modifyPeerConsumer(peer.id, 'screen', true) : roomClient.modifyPeerConsumer(peer.id, 'screen', true) :
roomClient.modifyPeerConsumer(peer.id, 'screen', false); roomClient.modifyPeerConsumer(peer.id, 'screen', false);
@ -167,6 +178,28 @@ const ListPeer = (props) =>
} }
</IconButton> </IconButton>
} }
<IconButton
aria-label={intl.formatMessage({
id : 'tooltip.muteParticipantVideo',
defaultMessage : 'Mute participant video'
})}
color={webcamEnabled ? 'primary' : 'secondary'}
disabled={peer.peerVideoInProgress}
onClick={(e) =>
{
e.stopPropagation();
webcamEnabled ?
roomClient.modifyPeerConsumer(peer.id, 'webcam', true) :
roomClient.modifyPeerConsumer(peer.id, 'webcam', false);
}}
>
{ webcamEnabled ?
<VideocamIcon />
:
<VideocamOffIcon />
}
</IconButton>
<IconButton <IconButton
aria-label={intl.formatMessage({ aria-label={intl.formatMessage({
id : 'tooltip.muteParticipant', id : 'tooltip.muteParticipant',
@ -174,8 +207,10 @@ const ListPeer = (props) =>
})} })}
color={micEnabled ? 'primary' : 'secondary'} color={micEnabled ? 'primary' : 'secondary'}
disabled={peer.peerAudioInProgress} disabled={peer.peerAudioInProgress}
onClick={() => onClick={(e) =>
{ {
e.stopPropagation();
micEnabled ? micEnabled ?
roomClient.modifyPeerConsumer(peer.id, 'mic', true) : roomClient.modifyPeerConsumer(peer.id, 'mic', true) :
roomClient.modifyPeerConsumer(peer.id, 'mic', false); roomClient.modifyPeerConsumer(peer.id, 'mic', false);
@ -194,8 +229,10 @@ const ListPeer = (props) =>
defaultMessage : 'Kick out participant' defaultMessage : 'Kick out participant'
})} })}
disabled={peer.peerKickInProgress} disabled={peer.peerKickInProgress}
onClick={() => onClick={(e) =>
{ {
e.stopPropagation();
roomClient.kickPeer(peer.id); roomClient.kickPeer(peer.id);
}} }}
> >

View File

@ -55,6 +55,7 @@
"room.clearChat": null, "room.clearChat": null,
"room.clearFileSharing": null, "room.clearFileSharing": null,
"room.speechUnsupported": null, "room.speechUnsupported": null,
"room.moderatoractions": null,
"me.mutedPTT": null, "me.mutedPTT": null,
@ -69,6 +70,8 @@
"tooltip.settings": "显示设置", "tooltip.settings": "显示设置",
"tooltip.participants": "显示参加者", "tooltip.participants": "显示参加者",
"tooltip.kickParticipant": null, "tooltip.kickParticipant": null,
"tooltip.muteParticipant": null,
"tooltip.muteParticipantVideo": null,
"label.roomName": "房间名称", "label.roomName": "房间名称",
"label.chooseRoomButton": "继续", "label.chooseRoomButton": "继续",

View File

@ -54,6 +54,7 @@
"room.clearChat": null, "room.clearChat": null,
"room.clearFileSharing": null, "room.clearFileSharing": null,
"room.speechUnsupported": null, "room.speechUnsupported": null,
"room.moderatoractions": null,
"me.mutedPTT": null, "me.mutedPTT": null,
@ -66,6 +67,10 @@
"tooltip.leaveFullscreen": "Vypnout režim celé obrazovky (fullscreen)", "tooltip.leaveFullscreen": "Vypnout režim celé obrazovky (fullscreen)",
"tooltip.lobby": "Ukázat Přijímací místnost", "tooltip.lobby": "Ukázat Přijímací místnost",
"tooltip.settings": "Zobrazit nastavení", "tooltip.settings": "Zobrazit nastavení",
"tooltip.participants": null,
"tooltip.kickParticipant": null,
"tooltip.muteParticipant": null,
"tooltip.muteParticipantVideo": null,
"label.roomName": "Jméno místnosti", "label.roomName": "Jméno místnosti",
"label.chooseRoomButton": "Pokračovat", "label.chooseRoomButton": "Pokračovat",

View File

@ -55,6 +55,7 @@
"room.clearChat": null, "room.clearChat": null,
"room.clearFileSharing": null, "room.clearFileSharing": null,
"room.speechUnsupported": "Dein Browser unterstützt keine Spracherkennung", "room.speechUnsupported": "Dein Browser unterstützt keine Spracherkennung",
"room.moderatoractions": null,
"me.mutedPTT": "Du bist stummgeschalted, Halte die SPACE-Taste um zu sprechen", "me.mutedPTT": "Du bist stummgeschalted, Halte die SPACE-Taste um zu sprechen",
@ -69,6 +70,8 @@
"tooltip.settings": "Einstellungen", "tooltip.settings": "Einstellungen",
"tooltip.participants": "Teilnehmer", "tooltip.participants": "Teilnehmer",
"tooltip.kickParticipant": "Teilnehmer rauswerfen", "tooltip.kickParticipant": "Teilnehmer rauswerfen",
"tooltip.muteParticipant": null,
"tooltip.muteParticipantVideo": null,
"label.roomName": "Name des Raums", "label.roomName": "Name des Raums",
"label.chooseRoomButton": "Weiter", "label.chooseRoomButton": "Weiter",

View File

@ -55,6 +55,7 @@
"room.clearChat": null, "room.clearChat": null,
"room.clearFileSharing": null, "room.clearFileSharing": null,
"room.speechUnsupported": null, "room.speechUnsupported": null,
"room.moderatoractions": null,
"me.mutedPTT": null, "me.mutedPTT": null,
@ -69,6 +70,8 @@
"tooltip.settings": "Vis indstillinger", "tooltip.settings": "Vis indstillinger",
"tooltip.participants": "Vis deltagere", "tooltip.participants": "Vis deltagere",
"tooltip.kickParticipant": null, "tooltip.kickParticipant": null,
"tooltip.muteParticipant": null,
"tooltip.muteParticipantVideo": null,
"label.roomName": "Værelsesnavn", "label.roomName": "Værelsesnavn",
"label.chooseRoomButton": "Fortsæt", "label.chooseRoomButton": "Fortsæt",

View File

@ -55,6 +55,7 @@
"room.clearChat": null, "room.clearChat": null,
"room.clearFileSharing": null, "room.clearFileSharing": null,
"room.speechUnsupported": null, "room.speechUnsupported": null,
"room.moderatoractions": null,
"me.mutedPTT": null, "me.mutedPTT": null,
@ -69,6 +70,8 @@
"tooltip.settings": "Εμφάνιση ρυθμίσεων", "tooltip.settings": "Εμφάνιση ρυθμίσεων",
"tooltip.participants": "Εμφάνιση συμμετεχόντων", "tooltip.participants": "Εμφάνιση συμμετεχόντων",
"tooltip.kickParticipant": null, "tooltip.kickParticipant": null,
"tooltip.muteParticipant": null,
"tooltip.muteParticipantVideo": null,
"label.roomName": "Όνομα δωματίου", "label.roomName": "Όνομα δωματίου",
"label.chooseRoomButton": "Συνέχεια", "label.chooseRoomButton": "Συνέχεια",

View File

@ -55,6 +55,7 @@
"room.clearChat": "Clear chat", "room.clearChat": "Clear chat",
"room.clearFileSharing": "Clear files", "room.clearFileSharing": "Clear files",
"room.speechUnsupported": "Your browser does not support speech recognition", "room.speechUnsupported": "Your browser does not support speech recognition",
"room.moderatoractions": "Moderator actions",
"me.mutedPTT": "You are muted, hold down SPACE-BAR to talk", "me.mutedPTT": "You are muted, hold down SPACE-BAR to talk",
@ -69,6 +70,8 @@
"tooltip.settings": "Show settings", "tooltip.settings": "Show settings",
"tooltip.participants": "Show participants", "tooltip.participants": "Show participants",
"tooltip.kickParticipant": "Kick out participant", "tooltip.kickParticipant": "Kick out participant",
"tooltip.muteParticipant": "Mute participant",
"tooltip.muteParticipantVideo": "Mute participant video",
"label.roomName": "Room name", "label.roomName": "Room name",
"label.chooseRoomButton": "Continue", "label.chooseRoomButton": "Continue",

View File

@ -55,6 +55,7 @@
"room.clearChat": null, "room.clearChat": null,
"room.clearFileSharing": null, "room.clearFileSharing": null,
"room.speechUnsupported": null, "room.speechUnsupported": null,
"room.moderatoractions": null,
"me.mutedPTT": null, "me.mutedPTT": null,
@ -69,6 +70,8 @@
"tooltip.settings": "Mostrar ajustes", "tooltip.settings": "Mostrar ajustes",
"tooltip.participants": "Mostrar participantes", "tooltip.participants": "Mostrar participantes",
"tooltip.kickParticipant": null, "tooltip.kickParticipant": null,
"tooltip.muteParticipant": null,
"tooltip.muteParticipantVideo": null,
"label.roomName": "Nombre de la sala", "label.roomName": "Nombre de la sala",
"label.chooseRoomButton": "Continuar", "label.chooseRoomButton": "Continuar",

View File

@ -55,6 +55,7 @@
"room.clearChat": null, "room.clearChat": null,
"room.clearFileSharing": null, "room.clearFileSharing": null,
"room.speechUnsupported": null, "room.speechUnsupported": null,
"room.moderatoractions": null,
"me.mutedPTT": null, "me.mutedPTT": null,
@ -69,6 +70,8 @@
"tooltip.settings": "Afficher les paramètres", "tooltip.settings": "Afficher les paramètres",
"tooltip.participants": "Afficher les participants", "tooltip.participants": "Afficher les participants",
"tooltip.kickParticipant": null, "tooltip.kickParticipant": null,
"tooltip.muteParticipant": null,
"tooltip.muteParticipantVideo": null,
"label.roomName": "Nom de la salle", "label.roomName": "Nom de la salle",
"label.chooseRoomButton": "Continuer", "label.chooseRoomButton": "Continuer",

View File

@ -55,6 +55,7 @@
"room.clearChat": null, "room.clearChat": null,
"room.clearFileSharing": null, "room.clearFileSharing": null,
"room.speechUnsupported": "Vaš preglednik ne podržava prepoznavanje govora", "room.speechUnsupported": "Vaš preglednik ne podržava prepoznavanje govora",
"room.moderatoractions": null,
"me.mutedPTT": "Utišani ste, pritisnite i držite SPACE tipku za razgovor", "me.mutedPTT": "Utišani ste, pritisnite i držite SPACE tipku za razgovor",
@ -69,6 +70,8 @@
"tooltip.settings": "Prikaži postavke", "tooltip.settings": "Prikaži postavke",
"tooltip.participants": "Pokažite sudionike", "tooltip.participants": "Pokažite sudionike",
"tooltip.kickParticipant": "Izbaci sudionika", "tooltip.kickParticipant": "Izbaci sudionika",
"tooltip.muteParticipant": null,
"tooltip.muteParticipantVideo": null,
"label.roomName": "Naziv sobe", "label.roomName": "Naziv sobe",
"label.chooseRoomButton": "Nastavi", "label.chooseRoomButton": "Nastavi",

View File

@ -55,6 +55,7 @@
"room.clearChat": null, "room.clearChat": null,
"room.clearFileSharing": null, "room.clearFileSharing": null,
"room.speechUnsupported": null, "room.speechUnsupported": null,
"room.moderatoractions": null,
"me.mutedPTT": null, "me.mutedPTT": null,
@ -69,6 +70,8 @@
"tooltip.settings": "Beállítások", "tooltip.settings": "Beállítások",
"tooltip.participants": "Résztvevők", "tooltip.participants": "Résztvevők",
"tooltip.kickParticipant": null, "tooltip.kickParticipant": null,
"tooltip.muteParticipant": null,
"tooltip.muteParticipantVideo": null,
"label.roomName": "Konferencia", "label.roomName": "Konferencia",
"label.chooseRoomButton": "Tovább", "label.chooseRoomButton": "Tovább",

View File

@ -55,6 +55,7 @@
"room.clearChat": null, "room.clearChat": null,
"room.clearFileSharing": null, "room.clearFileSharing": null,
"room.speechUnsupported": null, "room.speechUnsupported": null,
"room.moderatoractions": null,
"me.mutedPTT": null, "me.mutedPTT": null,
@ -68,6 +69,8 @@
"tooltip.lobby": "Mostra lobby", "tooltip.lobby": "Mostra lobby",
"tooltip.settings": "Mostra impostazioni", "tooltip.settings": "Mostra impostazioni",
"tooltip.participants": "Mostra partecipanti", "tooltip.participants": "Mostra partecipanti",
"tooltip.muteParticipant": null,
"tooltip.muteParticipantVideo": null,
"label.roomName": "Nome della stanza", "label.roomName": "Nome della stanza",
"label.chooseRoomButton": "Continua", "label.chooseRoomButton": "Continua",

View File

@ -55,6 +55,7 @@
"room.clearChat": "Tøm chat", "room.clearChat": "Tøm chat",
"room.clearFileSharing": "Fjern filer", "room.clearFileSharing": "Fjern filer",
"room.speechUnsupported": "Din nettleser støtter ikke stemmegjenkjenning", "room.speechUnsupported": "Din nettleser støtter ikke stemmegjenkjenning",
"room.moderatoractions": "Moderatorhandlinger",
"me.mutedPTT": "Du er dempet, hold nede SPACE for å snakke", "me.mutedPTT": "Du er dempet, hold nede SPACE for å snakke",
@ -69,6 +70,8 @@
"tooltip.settings": "Vis innstillinger", "tooltip.settings": "Vis innstillinger",
"tooltip.participants": "Vis deltakere", "tooltip.participants": "Vis deltakere",
"tooltip.kickParticipant": "Spark ut deltaker", "tooltip.kickParticipant": "Spark ut deltaker",
"tooltip.muteParticipant": "Demp deltaker",
"tooltip.muteParticipantVideo": "Demp deltakervideo",
"label.roomName": "Møtenavn", "label.roomName": "Møtenavn",
"label.chooseRoomButton": "Fortsett", "label.chooseRoomButton": "Fortsett",

View File

@ -55,6 +55,7 @@
"room.clearChat": null, "room.clearChat": null,
"room.clearFileSharing": null, "room.clearFileSharing": null,
"room.speechUnsupported": null, "room.speechUnsupported": null,
"room.moderatoractions": null,
"me.mutedPTT": null, "me.mutedPTT": null,
@ -69,6 +70,8 @@
"tooltip.settings": "Pokaż ustawienia", "tooltip.settings": "Pokaż ustawienia",
"tooltip.participants": "Pokaż uczestników", "tooltip.participants": "Pokaż uczestników",
"tooltip.kickParticipant": null, "tooltip.kickParticipant": null,
"tooltip.muteParticipant": null,
"tooltip.muteParticipantVideo": null,
"label.roomName": "Nazwa konferencji", "label.roomName": "Nazwa konferencji",
"label.chooseRoomButton": "Kontynuuj", "label.chooseRoomButton": "Kontynuuj",

View File

@ -55,6 +55,7 @@
"room.clearChat": null, "room.clearChat": null,
"room.clearFileSharing": null, "room.clearFileSharing": null,
"room.speechUnsupported": null, "room.speechUnsupported": null,
"room.moderatoractions": null,
"me.mutedPTT": null, "me.mutedPTT": null,
@ -69,6 +70,8 @@
"tooltip.settings": "Apresentar definições", "tooltip.settings": "Apresentar definições",
"tooltip.participants": "Apresentar participantes", "tooltip.participants": "Apresentar participantes",
"tooltip.kickParticipant": null, "tooltip.kickParticipant": null,
"tooltip.muteParticipant": null,
"tooltip.muteParticipantVideo": null,
"label.roomName": "Nome da sala", "label.roomName": "Nome da sala",
"label.chooseRoomButton": "Continuar", "label.chooseRoomButton": "Continuar",

View File

@ -55,6 +55,7 @@
"room.clearChat": null, "room.clearChat": null,
"room.clearFileSharing": null, "room.clearFileSharing": null,
"room.speechUnsupported": null, "room.speechUnsupported": null,
"room.moderatoractions": null,
"me.mutedPTT": null, "me.mutedPTT": null,
@ -69,6 +70,8 @@
"tooltip.settings": "Arată setăile", "tooltip.settings": "Arată setăile",
"tooltip.participants": null, "tooltip.participants": null,
"tooltip.kickParticipant": null, "tooltip.kickParticipant": null,
"tooltip.muteParticipant": null,
"tooltip.muteParticipantVideo": null,
"label.roomName": "Numele camerei", "label.roomName": "Numele camerei",
"label.chooseRoomButton": "Continuare", "label.chooseRoomButton": "Continuare",

View File

@ -49,6 +49,13 @@
"room.spotlights": "Gündemdeki Katılımcılar", "room.spotlights": "Gündemdeki Katılımcılar",
"room.passive": "Pasif Katılımcılar", "room.passive": "Pasif Katılımcılar",
"room.videoPaused": "Video duraklatıldı", "room.videoPaused": "Video duraklatıldı",
"room.muteAll": null,
"room.stopAllVideo": null,
"room.closeMeeting": null,
"room.clearChat": null,
"room.clearFileSharing": null,
"room.speechUnsupported": null,
"room.moderatoractions": null,
"tooltip.login": "Giriş", "tooltip.login": "Giriş",
"tooltip.logout": ıkış", "tooltip.logout": ıkış",
@ -60,6 +67,9 @@
"tooltip.lobby": "Lobiyi göster", "tooltip.lobby": "Lobiyi göster",
"tooltip.settings": "Ayarları göster", "tooltip.settings": "Ayarları göster",
"tooltip.participants": "Katılımcıları göster", "tooltip.participants": "Katılımcıları göster",
"tooltip.kickParticipant": null,
"tooltip.muteParticipant": null,
"tooltip.muteParticipantVideo": null,
"label.roomName": "Oda adı", "label.roomName": "Oda adı",
"label.chooseRoomButton": "Devam", "label.chooseRoomButton": "Devam",

View File

@ -55,6 +55,7 @@
"room.clearChat": null, "room.clearChat": null,
"room.clearFileSharing": null, "room.clearFileSharing": null,
"room.speechUnsupported": null, "room.speechUnsupported": null,
"room.moderatoractions": null,
"tooltip.login": "Увійти", "tooltip.login": "Увійти",
"tooltip.logout": "Вихід", "tooltip.logout": "Вихід",
@ -66,6 +67,9 @@
"tooltip.lobby": "Показати зал очікувань", "tooltip.lobby": "Показати зал очікувань",
"tooltip.settings": "Показати налаштування", "tooltip.settings": "Показати налаштування",
"tooltip.participants": "Показати учасників", "tooltip.participants": "Показати учасників",
"tooltip.kickParticipant": null,
"tooltip.muteParticipant": null,
"tooltip.muteParticipantVideo": null,
"label.roomName": "Назва кімнати", "label.roomName": "Назва кімнати",
"label.chooseRoomButton": "Продовжити", "label.chooseRoomButton": "Продовжити",