commit
ba8efb19ff
|
|
@ -302,6 +302,16 @@ export default class RoomClient
|
||||||
|
|
||||||
switch (key)
|
switch (key)
|
||||||
{
|
{
|
||||||
|
case String.fromCharCode(37):
|
||||||
|
{
|
||||||
|
this._spotlights.setPrevAsSelected();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case String.fromCharCode(39):
|
||||||
|
{
|
||||||
|
this._spotlights.setNextAsSelected();
|
||||||
|
break;
|
||||||
|
}
|
||||||
case 'A': // Activate advanced mode
|
case 'A': // Activate advanced mode
|
||||||
{
|
{
|
||||||
store.dispatch(settingsActions.toggleAdvancedMode());
|
store.dispatch(settingsActions.toggleAdvancedMode());
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ export default class Spotlights extends EventEmitter
|
||||||
this._signalingSocket = signalingSocket;
|
this._signalingSocket = signalingSocket;
|
||||||
this._maxSpotlights = maxSpotlights;
|
this._maxSpotlights = maxSpotlights;
|
||||||
this._peerList = [];
|
this._peerList = [];
|
||||||
|
this._unmutablePeerList = [];
|
||||||
this._selectedSpotlights = [];
|
this._selectedSpotlights = [];
|
||||||
this._currentSpotlights = [];
|
this._currentSpotlights = [];
|
||||||
this._started = false;
|
this._started = false;
|
||||||
|
|
@ -45,6 +46,66 @@ export default class Spotlights extends EventEmitter
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setNextAsSelected()
|
||||||
|
{
|
||||||
|
let peerId = null;
|
||||||
|
if (this._selectedSpotlights.length > 0) {
|
||||||
|
peerId = this._selectedSpotlights[0];
|
||||||
|
} else if (this._unmutablePeerList.length > 0) {
|
||||||
|
peerId = this._unmutablePeerList[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (peerId != null && this._currentSpotlights.length < this._unmutablePeerList.length) {
|
||||||
|
let oldIndex = this._unmutablePeerList.indexOf(peerId);
|
||||||
|
let index = oldIndex;
|
||||||
|
index++;
|
||||||
|
do {
|
||||||
|
if (index >= this._unmutablePeerList.length) {
|
||||||
|
index = 0;
|
||||||
|
}
|
||||||
|
let newSelectedPeer = this._unmutablePeerList[index];
|
||||||
|
if (!this._currentSpotlights.includes(newSelectedPeer)) {
|
||||||
|
this.setPeerSpotlight(newSelectedPeer);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
index++;
|
||||||
|
if (index === oldIndex) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} while (true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
setPrevAsSelected()
|
||||||
|
{
|
||||||
|
let peerId = null;
|
||||||
|
if (this._selectedSpotlights.length > 0) {
|
||||||
|
peerId = this._selectedSpotlights[0];
|
||||||
|
} else if (this._unmutablePeerList.length > 0) {
|
||||||
|
peerId = this._unmutablePeerList[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (peerId != null && this._currentSpotlights.length < this._unmutablePeerList.length) {
|
||||||
|
let oldIndex = this._unmutablePeerList.indexOf(peerId);
|
||||||
|
let index = oldIndex;
|
||||||
|
index--;
|
||||||
|
do {
|
||||||
|
if (index < 0) {
|
||||||
|
index = this._unmutablePeerList.length - 1;
|
||||||
|
}
|
||||||
|
let newSelectedPeer = this._unmutablePeerList[index];
|
||||||
|
if (!this._currentSpotlights.includes(newSelectedPeer)) {
|
||||||
|
this.setPeerSpotlight(newSelectedPeer);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
index--;
|
||||||
|
if (index === oldIndex) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} while (true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
setPeerSpotlight(peerId)
|
setPeerSpotlight(peerId)
|
||||||
{
|
{
|
||||||
logger.debug('setPeerSpotlight() [peerId:"%s"]', peerId);
|
logger.debug('setPeerSpotlight() [peerId:"%s"]', peerId);
|
||||||
|
|
@ -114,6 +175,7 @@ export default class Spotlights extends EventEmitter
|
||||||
logger.debug('_handlePeer() | adding peer [peerId: "%s"]', id);
|
logger.debug('_handlePeer() | adding peer [peerId: "%s"]', id);
|
||||||
|
|
||||||
this._peerList.push(id);
|
this._peerList.push(id);
|
||||||
|
this._unmutablePeerList.push(id);
|
||||||
|
|
||||||
if (this._started)
|
if (this._started)
|
||||||
this._spotlightsUpdated();
|
this._spotlightsUpdated();
|
||||||
|
|
@ -126,6 +188,7 @@ export default class Spotlights extends EventEmitter
|
||||||
'room "peerClosed" event [peerId:%o]', id);
|
'room "peerClosed" event [peerId:%o]', id);
|
||||||
|
|
||||||
this._peerList = this._peerList.filter((peer) => peer !== id);
|
this._peerList = this._peerList.filter((peer) => peer !== id);
|
||||||
|
this._unmutablePeerList = this._unmutablePeerList.filter((peer) => peer !== id);
|
||||||
|
|
||||||
this._selectedSpotlights = this._selectedSpotlights.filter((peer) => peer !== id);
|
this._selectedSpotlights = this._selectedSpotlights.filter((peer) => peer !== id);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,8 @@ const shortcuts=[
|
||||||
{ key: '1', label: 'label.democratic', defaultMessage: 'Democratic View' },
|
{ key: '1', label: 'label.democratic', defaultMessage: 'Democratic View' },
|
||||||
{ key: '2', label: 'label.filmstrip', defaultMessage: 'Filmstrip View' },
|
{ key: '2', label: 'label.filmstrip', defaultMessage: 'Filmstrip View' },
|
||||||
{ key: 'space', label: 'me.mutedPTT', defaultMessage: 'Push SPACE to talk' },
|
{ key: 'space', label: 'me.mutedPTT', defaultMessage: 'Push SPACE to talk' },
|
||||||
{ key: 'a', label: 'label.advanced', defaultMessage: 'Show advanced information' }
|
{ key: 'a', label: 'label.advanced', defaultMessage: 'Show advanced information' },
|
||||||
|
{ key: String.fromCharCode(8592)+' '+String.fromCharCode(8594), label: 'room.browsePeersSpotlight', defaultMessage: 'Browse participants into Spotlight' }
|
||||||
];
|
];
|
||||||
const styles = (theme) =>
|
const styles = (theme) =>
|
||||||
({
|
({
|
||||||
|
|
|
||||||
|
|
@ -63,6 +63,7 @@
|
||||||
"room.help": null,
|
"room.help": null,
|
||||||
"room.about": null,
|
"room.about": null,
|
||||||
"room.shortcutKeys": null,
|
"room.shortcutKeys": null,
|
||||||
|
"room.browsePeersSpotlight": null,
|
||||||
|
|
||||||
"me.mutedPTT": null,
|
"me.mutedPTT": null,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -62,6 +62,7 @@
|
||||||
"room.help": null,
|
"room.help": null,
|
||||||
"room.about": null,
|
"room.about": null,
|
||||||
"room.shortcutKeys": null,
|
"room.shortcutKeys": null,
|
||||||
|
"room.browsePeersSpotlight": null,
|
||||||
|
|
||||||
"me.mutedPTT": null,
|
"me.mutedPTT": null,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -63,6 +63,7 @@
|
||||||
"room.help": "Hilfe",
|
"room.help": "Hilfe",
|
||||||
"room.about": "Über",
|
"room.about": "Über",
|
||||||
"room.shortcutKeys": "Tastaturkürzel",
|
"room.shortcutKeys": "Tastaturkürzel",
|
||||||
|
"room.browsePeersSpotlight": null,
|
||||||
|
|
||||||
"me.mutedPTT": "Du bist stummgeschaltet. Halte die SPACE-Taste um zu sprechen",
|
"me.mutedPTT": "Du bist stummgeschaltet. Halte die SPACE-Taste um zu sprechen",
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -63,6 +63,7 @@
|
||||||
"room.help": null,
|
"room.help": null,
|
||||||
"room.about": null,
|
"room.about": null,
|
||||||
"room.shortcutKeys": null,
|
"room.shortcutKeys": null,
|
||||||
|
"room.browsePeersSpotlight": null,
|
||||||
|
|
||||||
"me.mutedPTT": null,
|
"me.mutedPTT": null,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -63,6 +63,7 @@
|
||||||
"room.help": null,
|
"room.help": null,
|
||||||
"room.about": null,
|
"room.about": null,
|
||||||
"room.shortcutKeys": null,
|
"room.shortcutKeys": null,
|
||||||
|
"room.browsePeersSpotlight": null,
|
||||||
|
|
||||||
"me.mutedPTT": null,
|
"me.mutedPTT": null,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -63,6 +63,7 @@
|
||||||
"room.help": "Help",
|
"room.help": "Help",
|
||||||
"room.about": "About",
|
"room.about": "About",
|
||||||
"room.shortcutKeys": "Shortcut Keys",
|
"room.shortcutKeys": "Shortcut Keys",
|
||||||
|
"room.browsePeersSpotlight": null,
|
||||||
|
|
||||||
"me.mutedPTT": "You are muted, hold down SPACE-BAR to talk",
|
"me.mutedPTT": "You are muted, hold down SPACE-BAR to talk",
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -63,6 +63,7 @@
|
||||||
"room.help": null,
|
"room.help": null,
|
||||||
"room.about": null,
|
"room.about": null,
|
||||||
"room.shortcutKeys": null,
|
"room.shortcutKeys": null,
|
||||||
|
"room.browsePeersSpotlight": null,
|
||||||
|
|
||||||
"me.mutedPTT": null,
|
"me.mutedPTT": null,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -63,6 +63,7 @@
|
||||||
"room.help": null,
|
"room.help": null,
|
||||||
"room.about": null,
|
"room.about": null,
|
||||||
"room.shortcutKeys": null,
|
"room.shortcutKeys": null,
|
||||||
|
"room.browsePeersSpotlight": null,
|
||||||
|
|
||||||
"me.mutedPTT": null,
|
"me.mutedPTT": null,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -63,6 +63,7 @@
|
||||||
"room.help": null,
|
"room.help": null,
|
||||||
"room.about": null,
|
"room.about": null,
|
||||||
"room.shortcutKeys": null,
|
"room.shortcutKeys": null,
|
||||||
|
"room.browsePeersSpotlight": 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",
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -63,6 +63,7 @@
|
||||||
"room.help": "Segítség",
|
"room.help": "Segítség",
|
||||||
"room.about": "Névjegy",
|
"room.about": "Névjegy",
|
||||||
"room.shortcutKeys": "Billentyűparancsok",
|
"room.shortcutKeys": "Billentyűparancsok",
|
||||||
|
"room.browsePeersSpotlight": null,
|
||||||
|
|
||||||
"me.mutedPTT": "Némítva vagy, ha beszélnél nyomd le a szóköz billentyűt",
|
"me.mutedPTT": "Némítva vagy, ha beszélnél nyomd le a szóköz billentyűt",
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -63,6 +63,7 @@
|
||||||
"room.help": "Aiuto",
|
"room.help": "Aiuto",
|
||||||
"room.about": "Informazioni su",
|
"room.about": "Informazioni su",
|
||||||
"room.shortcutKeys": "Scorciatoie da tastiera",
|
"room.shortcutKeys": "Scorciatoie da tastiera",
|
||||||
|
"room.browsePeersSpotlight": null,
|
||||||
|
|
||||||
"me.mutedPTT": "Sei mutato, tieni premuto SPAZIO per parlare",
|
"me.mutedPTT": "Sei mutato, tieni premuto SPAZIO per parlare",
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -62,6 +62,7 @@
|
||||||
"room.help": null,
|
"room.help": null,
|
||||||
"room.about": null,
|
"room.about": null,
|
||||||
"room.shortcutKeys": null,
|
"room.shortcutKeys": null,
|
||||||
|
"room.browsePeersSpotlight": null,
|
||||||
|
|
||||||
"me.mutedPTT": "Jūs esat noklusināts. Turiet taustiņu SPACE-BAR, lai runātu",
|
"me.mutedPTT": "Jūs esat noklusināts. Turiet taustiņu SPACE-BAR, lai runātu",
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -63,6 +63,7 @@
|
||||||
"room.help": null,
|
"room.help": null,
|
||||||
"room.about": null,
|
"room.about": null,
|
||||||
"room.shortcutKeys": null,
|
"room.shortcutKeys": null,
|
||||||
|
"room.browsePeersSpotlight": null,
|
||||||
|
|
||||||
"me.mutedPTT": "Du er dempet, hold nede SPACE for å snakke",
|
"me.mutedPTT": "Du er dempet, hold nede SPACE for å snakke",
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -63,6 +63,7 @@
|
||||||
"room.help": "Pomoc",
|
"room.help": "Pomoc",
|
||||||
"room.about": "O pogramie",
|
"room.about": "O pogramie",
|
||||||
"room.shortcutKeys": "Skróty klawiaturowe",
|
"room.shortcutKeys": "Skróty klawiaturowe",
|
||||||
|
"room.browsePeersSpotlight": null,
|
||||||
|
|
||||||
"me.mutedPTT": "Masz wyciszony mikrofon, przytrzymaj spację aby mówić",
|
"me.mutedPTT": "Masz wyciszony mikrofon, przytrzymaj spację aby mówić",
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -63,6 +63,7 @@
|
||||||
"room.help": null,
|
"room.help": null,
|
||||||
"room.about": null,
|
"room.about": null,
|
||||||
"room.shortcutKeys": null,
|
"room.shortcutKeys": null,
|
||||||
|
"room.browsePeersSpotlight": null,
|
||||||
|
|
||||||
"me.mutedPTT": null,
|
"me.mutedPTT": null,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -63,6 +63,7 @@
|
||||||
"room.help": null,
|
"room.help": null,
|
||||||
"room.about": null,
|
"room.about": null,
|
||||||
"room.shortcutKeys": null,
|
"room.shortcutKeys": null,
|
||||||
|
"room.browsePeersSpotlight": null,
|
||||||
|
|
||||||
"me.mutedPTT": null,
|
"me.mutedPTT": null,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -63,6 +63,7 @@
|
||||||
"room.help": null,
|
"room.help": null,
|
||||||
"room.about": null,
|
"room.about": null,
|
||||||
"room.shortcutKeys": null,
|
"room.shortcutKeys": null,
|
||||||
|
"room.browsePeersSpotlight": null,
|
||||||
|
|
||||||
"me.mutedPTT": null,
|
"me.mutedPTT": null,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -63,6 +63,7 @@
|
||||||
"room.help": null,
|
"room.help": null,
|
||||||
"room.about": null,
|
"room.about": null,
|
||||||
"room.shortcutKeys": null,
|
"room.shortcutKeys": null,
|
||||||
|
"room.browsePeersSpotlight": null,
|
||||||
|
|
||||||
"me.mutedPTT": null,
|
"me.mutedPTT": null,
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue