Fix to state check. Fix to missing display name on missing producer.

master
Håvar Aambø Fosstveit 2019-04-05 20:44:53 +02:00
parent 9013b40143
commit 90b2ccd0a9
3 changed files with 40 additions and 43 deletions

View File

@ -13,7 +13,6 @@ const styles = () =>
({ ({
root : root :
{ {
display : 'flex',
flexDirection : 'row', flexDirection : 'row',
margin : 6, margin : 6,
flex : '0 0 auto', flex : '0 0 auto',
@ -32,8 +31,6 @@ const styles = () =>
viewContainer : viewContainer :
{ {
position : 'relative', position : 'relative',
width : 'var(--me-width)',
height : 'var(--me-height)',
'&.webcam' : '&.webcam' :
{ {
order : 2 order : 2

View File

@ -54,7 +54,6 @@ const styles = (theme) =>
viewContainer : viewContainer :
{ {
position : 'relative', position : 'relative',
flexGrow : 1,
'&.webcam' : '&.webcam' :
{ {
order : 2 order : 2
@ -86,15 +85,16 @@ const styles = (theme) =>
}, },
videoInfo : videoInfo :
{ {
top : 0, position : 'absolute',
bottom : 0, width : '100%',
left : 0, height : '100%',
right : 0, backgroundColor : 'rgba(0, 0, 0, 0.3)',
display : 'flex', display : 'flex',
flexDirection : 'column', justifyContent : 'center',
justifyContent : 'center', alignItems : 'center',
alignItems : 'center', padding : '0.4vmin',
'& p' : zIndex : 21,
'& p' :
{ {
padding : '6px 12px', padding : '6px 12px',
borderRadius : 6, borderRadius : 6,
@ -195,22 +195,22 @@ const Peer = (props) =>
}, 2000); }, 2000);
}} }}
> >
{ videoVisible && !webcamConsumer.supported ? <div className={classnames(classes.viewContainer)} style={style}>
<div className={classes.videoInfo} style={style}> { videoVisible && !webcamConsumer.supported ?
<p>incompatible video</p> <div className={classes.videoInfo}>
</div> <p>incompatible video</p>
:null </div>
} :null
}
{ !videoVisible ? { !videoVisible ?
<div className={classes.videoInfo} style={style}> <div className={classes.videoInfo}>
<p>this video is paused</p> <p>this video is paused</p>
</div> </div>
:null :null
} }
{ videoVisible && webcamConsumer.supported ? { videoVisible && webcamConsumer.supported ?
<div className={classnames(classes.viewContainer)} style={style}>
<div <div
className={classnames(classes.controls, webcamHover ? 'hover' : null)} className={classnames(classes.controls, webcamHover ? 'hover' : null)}
onMouseOver={() => setWebcamHover(true)} onMouseOver={() => setWebcamHover(true)}
@ -281,22 +281,22 @@ const Peer = (props) =>
<FullScreenIcon /> <FullScreenIcon />
</Fab> </Fab>
</div> </div>
:null
}
<VideoView <VideoView
advancedMode={advancedMode} advancedMode={advancedMode}
peer={peer} peer={peer}
showPeerInfo showPeerInfo
videoTrack={webcamConsumer ? webcamConsumer.track : null} videoTrack={webcamConsumer ? webcamConsumer.track : null}
videoVisible={videoVisible} videoVisible={videoVisible}
videoProfile={videoProfile} videoProfile={videoProfile}
audioCodec={micConsumer ? micConsumer.codec : null} audioCodec={micConsumer ? micConsumer.codec : null}
videoCodec={webcamConsumer ? webcamConsumer.codec : null} videoCodec={webcamConsumer ? webcamConsumer.codec : null}
> >
<Volume name={peer.name} /> <Volume name={peer.name} />
</VideoView> </VideoView>
</div> </div>
:null
}
</div> </div>
{ screenConsumer ? { screenConsumer ?

View File

@ -188,7 +188,7 @@ export default connect(
prev.peers === next.peers && prev.peers === next.peers &&
prev.producers === next.producers && prev.producers === next.producers &&
prev.consumers === next.consumers && prev.consumers === next.consumers &&
prev.spotlights === next.spotlights prev.room.spotlights === next.room.spotlights
); );
} }
} }