Linting and translations

auto_join_3.3
Håvar Aambø Fosstveit 2020-03-27 22:57:04 +01:00
parent 34cdac8102
commit a1dc652d04
30 changed files with 176 additions and 117 deletions

View File

@ -46,7 +46,8 @@
"test": "react-scripts test", "test": "react-scripts test",
"eject": "react-scripts eject", "eject": "react-scripts eject",
"electron": "electron --no-sandbox .", "electron": "electron --no-sandbox .",
"dev": "nf start -p 3000" "dev": "nf start -p 3000",
"lint": "eslint -c .eslintrc.json --ext .js src"
}, },
"browserslist": [ "browserslist": [
">0.2%", ">0.2%",

View File

@ -231,7 +231,7 @@ export default class RoomClient
this._hark = null; this._hark = null;
// Local MediaStream for hark // Local MediaStream for hark
this._harkStream = null this._harkStream = null;
// Local webcam mediasoup Producer. // Local webcam mediasoup Producer.
this._webcamProducer = null; this._webcamProducer = null;
@ -1162,21 +1162,30 @@ export default class RoomClient
...VIDEO_CONSTRAINS[resolution] ...VIDEO_CONSTRAINS[resolution]
} }
}); });
if (stream){
if (stream)
{
const track = stream.getVideoTracks()[0]; const track = stream.getVideoTracks()[0];
if (track) {
if (track)
{
await this._webcamProducer.replaceTrack({ track }); await this._webcamProducer.replaceTrack({ track });
store.dispatch( store.dispatch(
producerActions.setProducerTrack(this._webcamProducer.id, track)); producerActions.setProducerTrack(this._webcamProducer.id, track));
} else { }
logger.warn('getVideoTracks Error: First Video Track is null') else
{
logger.warn('getVideoTracks Error: First Video Track is null');
} }
} else {
logger.warn ('getUserMedia Error: Stream is null!')
} }
else
{
logger.warn('getUserMedia Error: Stream is null!');
}
store.dispatch(settingsActions.setSelectedWebcamDevice(deviceId)); store.dispatch(settingsActions.setSelectedWebcamDevice(deviceId));
await this._updateWebcams(); await this._updateWebcams();

View File

@ -35,12 +35,10 @@ export const setConsumerPreferredLayers = (consumerId, spatialLayer, temporalLay
}); });
export const setConsumerPriority = (consumerId, priority) => export const setConsumerPriority = (consumerId, priority) =>
{ ({
return {
type : 'SET_CONSUMER_PRIORITY', type : 'SET_CONSUMER_PRIORITY',
payload : { consumerId, priority } payload : { consumerId, priority }
}; });
};
export const setConsumerTrack = (consumerId, track) => export const setConsumerTrack = (consumerId, track) =>
({ ({

View File

@ -46,7 +46,6 @@ export const setPeerPicture = (peerId, picture) =>
payload : { peerId, picture } payload : { peerId, picture }
}); });
export const addPeerRole = (peerId, role) => export const addPeerRole = (peerId, role) =>
({ ({
type : 'ADD_PEER_ROLE', type : 'ADD_PEER_ROLE',

View File

@ -178,7 +178,8 @@ const ChooseRoom = ({
<CookieConsent buttonText={intl.formatMessage({ <CookieConsent buttonText={intl.formatMessage({
id : 'room.consentUnderstand', id : 'room.consentUnderstand',
defaultMessage : 'I understand' defaultMessage : 'I understand'
})}> })}
>
<FormattedMessage <FormattedMessage
id='room.cookieConsent' id='room.cookieConsent'
defaultMessage='This website uses cookies to enhance the user experience' defaultMessage='This website uses cookies to enhance the user experience'

View File

@ -71,31 +71,30 @@ const styles = (theme) =>
position : 'absolute', position : 'absolute',
width : '100%', width : '100%',
height : '100%', height : '100%',
backgroundColor : 'rgba(0, 0, 0, 0.3)',
display : 'flex', display : 'flex',
flexDirection : 'column', flexDirection : 'column',
justifyContent : 'center', justifyContent : 'center',
alignItems : 'flex-end', alignItems : 'flex-end',
padding : theme.spacing(1), padding : theme.spacing(1),
zIndex : 21, zIndex : 21,
opacity : 0,
transition : 'opacity 0.3s',
touchAction : 'none', touchAction : 'none',
pointerEvents : 'none', pointerEvents : 'none',
'&.hover' :
{
opacity : 1
},
'& p' : '& p' :
{ {
position : 'absolute', position : 'absolute',
float : 'left', float : 'left',
top : '50%', top : '50%',
left : '50%', left : '50%',
opacity : 0,
transition : 'opacity 0.3s',
transform : 'translate(-50%, -50%)', transform : 'translate(-50%, -50%)',
color : 'rgba(255, 255, 255, 0.5)', color : 'rgba(255, 255, 255, 0.5)',
fontSize : '7em', fontSize : '7em',
margin : 0 margin : 0,
'&.hover' :
{
opacity : 1
}
} }
}, },
ptt : ptt :
@ -323,7 +322,7 @@ const Me = (props) =>
<div className={classnames(classes.ptt, (micState ==='muted' && me.isSpeaking) ? 'enabled' : null)} > <div className={classnames(classes.ptt, (micState ==='muted' && me.isSpeaking) ? 'enabled' : null)} >
<FormattedMessage <FormattedMessage
id='me.mutedPTT' id='me.mutedPTT'
defaultMessage='You are muted: hold SPACE-BAR to speak!' defaultMessage='You are muted, hold down SPACE-BAR to talk'
/> />
</div> </div>

View File

@ -47,7 +47,7 @@ const styles = (theme) =>
}, },
divider : divider :
{ {
marginLeft : theme.spacing(3), marginLeft : theme.spacing(3)
}, },
show : show :
{ {

View File

@ -339,7 +339,8 @@ const JoinDialog = ({
<CookieConsent buttonText={intl.formatMessage({ <CookieConsent buttonText={intl.formatMessage({
id : 'room.consentUnderstand', id : 'room.consentUnderstand',
defaultMessage : 'I understand' defaultMessage : 'I understand'
})}> })}
>
<FormattedMessage <FormattedMessage
id='room.cookieConsent' id='room.cookieConsent'
defaultMessage='This website uses cookies to enhance the user experience' defaultMessage='This website uses cookies to enhance the user experience'

View File

@ -52,6 +52,9 @@
"room.muteAll": null, "room.muteAll": null,
"room.stopAllVideo": null, "room.stopAllVideo": null,
"room.closeMeeting": null, "room.closeMeeting": null,
"room.speechUnsupported": null,
"me.mutedPTT": null,
"tooltip.login": "登录", "tooltip.login": "登录",
"tooltip.logout": "注销", "tooltip.logout": "注销",

View File

@ -48,6 +48,12 @@
"room.spotlights": "Aktivní Účastníci", "room.spotlights": "Aktivní Účastníci",
"room.passive": "Pasivní Účastníci", "room.passive": "Pasivní Účastníci",
"room.videoPaused": "Toto video bylo pozastaveno", "room.videoPaused": "Toto video bylo pozastaveno",
"room.muteAll": null,
"room.stopAllVideo": null,
"room.closeMeeting": null,
"room.speechUnsupported": null,
"me.mutedPTT": null,
"tooltip.login": "Přihlášení", "tooltip.login": "Přihlášení",
"tooltip.logout": "Odhlášení", "tooltip.logout": "Odhlášení",

View File

@ -52,6 +52,9 @@
"room.muteAll": null, "room.muteAll": null,
"room.stopAllVideo": null, "room.stopAllVideo": null,
"room.closeMeeting": null, "room.closeMeeting": null,
"room.speechUnsupported": null,
"me.mutedPTT": null,
"tooltip.login": "Anmelden", "tooltip.login": "Anmelden",
"tooltip.logout": "Abmelden", "tooltip.logout": "Abmelden",

View File

@ -52,6 +52,9 @@
"room.muteAll": null, "room.muteAll": null,
"room.stopAllVideo": null, "room.stopAllVideo": null,
"room.closeMeeting": null, "room.closeMeeting": null,
"room.speechUnsupported": null,
"me.mutedPTT": null,
"tooltip.login": "Log ind", "tooltip.login": "Log ind",
"tooltip.logout": "Log ud", "tooltip.logout": "Log ud",

View File

@ -52,6 +52,9 @@
"room.muteAll": null, "room.muteAll": null,
"room.stopAllVideo": null, "room.stopAllVideo": null,
"room.closeMeeting": null, "room.closeMeeting": null,
"room.speechUnsupported": null,
"me.mutedPTT": null,
"tooltip.login": "Σύνδεση", "tooltip.login": "Σύνδεση",
"tooltip.logout": "Αποσύνδεση", "tooltip.logout": "Αποσύνδεση",

View File

@ -52,6 +52,9 @@
"room.muteAll": "Mute all", "room.muteAll": "Mute all",
"room.stopAllVideo": "Stop all video", "room.stopAllVideo": "Stop all video",
"room.closeMeeting": "Close meeting", "room.closeMeeting": "Close meeting",
"room.speechUnsupported": "Your browser does not support speech recognition",
"me.mutedPTT": "You are muted, hold down SPACE-BAR to talk",
"tooltip.login": "Log in", "tooltip.login": "Log in",
"tooltip.logout": "Log out", "tooltip.logout": "Log out",

View File

@ -52,6 +52,9 @@
"room.muteAll": null, "room.muteAll": null,
"room.stopAllVideo": null, "room.stopAllVideo": null,
"room.closeMeeting": null, "room.closeMeeting": null,
"room.speechUnsupported": null,
"me.mutedPTT": null,
"tooltip.login": "Entrar", "tooltip.login": "Entrar",
"tooltip.logout": "Salir", "tooltip.logout": "Salir",

View File

@ -52,6 +52,9 @@
"room.muteAll": null, "room.muteAll": null,
"room.stopAllVideo": null, "room.stopAllVideo": null,
"room.closeMeeting": null, "room.closeMeeting": null,
"room.speechUnsupported": null,
"me.mutedPTT": null,
"tooltip.login": "Connexion", "tooltip.login": "Connexion",
"tooltip.logout": "Déconnexion", "tooltip.logout": "Déconnexion",

View File

@ -52,6 +52,9 @@
"room.muteAll": null, "room.muteAll": null,
"room.stopAllVideo": null, "room.stopAllVideo": null,
"room.closeMeeting": null, "room.closeMeeting": null,
"room.speechUnsupported": null,
"me.mutedPTT": null,
"tooltip.login": "Prijava", "tooltip.login": "Prijava",
"tooltip.logout": "Odjava", "tooltip.logout": "Odjava",

View File

@ -52,6 +52,9 @@
"room.muteAll": null, "room.muteAll": null,
"room.stopAllVideo": null, "room.stopAllVideo": null,
"room.closeMeeting": null, "room.closeMeeting": null,
"room.speechUnsupported": null,
"me.mutedPTT": null,
"tooltip.login": "Belépés", "tooltip.login": "Belépés",
"tooltip.logout": "Kilépés", "tooltip.logout": "Kilépés",

View File

@ -49,6 +49,12 @@
"room.spotlights": "Partecipanti in Evidenza", "room.spotlights": "Partecipanti in Evidenza",
"room.passive": "Participanti Passivi", "room.passive": "Participanti Passivi",
"room.videoPaused": "Il video è in pausa", "room.videoPaused": "Il video è in pausa",
"room.muteAll": null,
"room.stopAllVideo": null,
"room.closeMeeting": null,
"room.speechUnsupported": null,
"me.mutedPTT": null,
"tooltip.login": "Log in", "tooltip.login": "Log in",
"tooltip.logout": "Log out", "tooltip.logout": "Log out",

View File

@ -52,6 +52,9 @@
"room.muteAll": "Demp alle", "room.muteAll": "Demp alle",
"room.stopAllVideo": "Stopp all video", "room.stopAllVideo": "Stopp all video",
"room.closeMeeting": "Avslutt møte", "room.closeMeeting": "Avslutt møte",
"room.speechUnsupported": "Din nettleser støtter ikke stemmegjenkjenning",
"me.mutedPTT": "Du er dempet, hold nede SPACE for å snakke",
"tooltip.login": "Logg in", "tooltip.login": "Logg in",
"tooltip.logout": "Logg ut", "tooltip.logout": "Logg ut",

View File

@ -52,6 +52,9 @@
"room.muteAll": null, "room.muteAll": null,
"room.stopAllVideo": null, "room.stopAllVideo": null,
"room.closeMeeting": null, "room.closeMeeting": null,
"room.speechUnsupported": null,
"me.mutedPTT": null,
"tooltip.login": "Zaloguj", "tooltip.login": "Zaloguj",
"tooltip.logout": "Wyloguj", "tooltip.logout": "Wyloguj",

View File

@ -52,6 +52,9 @@
"room.muteAll": null, "room.muteAll": null,
"room.stopAllVideo": null, "room.stopAllVideo": null,
"room.closeMeeting": null, "room.closeMeeting": null,
"room.speechUnsupported": null,
"me.mutedPTT": null,
"tooltip.login": "Entrar", "tooltip.login": "Entrar",
"tooltip.logout": "Sair", "tooltip.logout": "Sair",

View File

@ -52,6 +52,9 @@
"room.muteAll": null, "room.muteAll": null,
"room.stopAllVideo": null, "room.stopAllVideo": null,
"room.closeMeeting": null, "room.closeMeeting": null,
"room.speechUnsupported": null,
"me.mutedPTT": null,
"tooltip.login": "Intră în cont", "tooltip.login": "Intră în cont",
"tooltip.logout": "Deconectare", "tooltip.logout": "Deconectare",