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",
"eject": "react-scripts eject",
"electron": "electron --no-sandbox .",
"dev": "nf start -p 3000"
"dev": "nf start -p 3000",
"lint": "eslint -c .eslintrc.json --ext .js src"
},
"browserslist": [
">0.2%",

View File

@ -231,7 +231,7 @@ export default class RoomClient
this._hark = null;
// Local MediaStream for hark
this._harkStream = null
this._harkStream = null;
// Local webcam mediasoup Producer.
this._webcamProducer = null;
@ -1162,21 +1162,30 @@ export default class RoomClient
...VIDEO_CONSTRAINS[resolution]
}
});
if (stream){
if (stream)
{
const track = stream.getVideoTracks()[0];
if (track) {
if (track)
{
await this._webcamProducer.replaceTrack({ track });
store.dispatch(
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));
await this._updateWebcams();

View File

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

View File

@ -38,7 +38,7 @@ export const setMediaCapabilities = ({
canSendWebcam,
canShareScreen,
canShareFiles
}) =>
}) =>
({
type : 'SET_MEDIA_CAPABILITIES',
payload : { canSendMic, canSendWebcam, canShareScreen, canShareFiles }
@ -92,7 +92,7 @@ export const setDisplayNameInProgress = (flag) =>
payload : { flag }
});
export const setIsSpeaking = (flag) =>
export const setIsSpeaking = (flag) =>
({
type : 'SET_IS_SPEAKING',
payload : { flag }

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -151,8 +151,8 @@ const ListPeer = (props) =>
id : 'tooltip.muteScreenSharing',
defaultMessage : 'Mute participant share'
})}
color={ screenVisible ? 'primary' : 'secondary'}
disabled={ peer.peerScreenInProgress }
color={screenVisible ? 'primary' : 'secondary'}
disabled={peer.peerScreenInProgress}
onClick={() =>
{
screenVisible ?
@ -172,8 +172,8 @@ const ListPeer = (props) =>
id : 'tooltip.muteParticipant',
defaultMessage : 'Mute participant'
})}
color={ micEnabled ? 'primary' : 'secondary'}
disabled={ peer.peerAudioInProgress }
color={micEnabled ? 'primary' : 'secondary'}
disabled={peer.peerAudioInProgress}
onClick={() =>
{
micEnabled ?
@ -193,7 +193,7 @@ const ListPeer = (props) =>
id : 'tooltip.kickParticipant',
defaultMessage : 'Kick out participant'
})}
disabled={ peer.peerKickInProgress }
disabled={peer.peerKickInProgress}
onClick={() =>
{
roomClient.kickPeer(peer.id);

View File

@ -159,13 +159,13 @@ class Room extends React.PureComponent
<CookieConsent
buttonText={
<FormattedMessage
id = 'room.consentUnderstand'
defaultMessage = 'I understand'
id='room.consentUnderstand'
defaultMessage='I understand'
/>
}
>
<FormattedMessage
id = 'room.cookieConsent'
id='room.cookieConsent'
defaultMessage='This website uses cookies to enhance the user experience'
/>
</CookieConsent>

View File

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

View File

@ -48,6 +48,12 @@
"room.spotlights": "Aktivní Účastníci",
"room.passive": "Pasivní Účastníci",
"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.logout": "Odhlášení",

View File

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

View File

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

View File

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

View File

@ -52,6 +52,9 @@
"room.muteAll": "Mute all",
"room.stopAllVideo": "Stop all video",
"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.logout": "Log out",

View File

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

View File

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

View File

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

View File

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

View File

@ -49,6 +49,12 @@
"room.spotlights": "Partecipanti in Evidenza",
"room.passive": "Participanti Passivi",
"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.logout": "Log out",

View File

@ -52,6 +52,9 @@
"room.muteAll": "Demp alle",
"room.stopAllVideo": "Stopp all video",
"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.logout": "Logg ut",

View File

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

View File

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

View File

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