diff --git a/bigbluebutton-html5/imports/ui/components/video-dock/component.jsx b/bigbluebutton-html5/imports/ui/components/video-dock/component.jsx index 7df0fd0a7c..5c7268307d 100644 --- a/bigbluebutton-html5/imports/ui/components/video-dock/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/video-dock/component.jsx @@ -33,6 +33,7 @@ export default class VideoDock extends Component { this.state = { videos: {}, + sharedWebcam : false, }; this.sendUserShareWebcam = props.sendUserShareWebcam.bind(this); @@ -78,9 +79,10 @@ export default class VideoDock extends Component { componentDidMount() { const ws = this.ws; const { users } = this.props; + const id = users[0].userId; for (let i = 0; i < users.length; i++) { - if (users[i].has_stream) { + if (users[i].has_stream && users[i].userId !== id) { this.start(users[i].userId, false); } } @@ -183,6 +185,7 @@ export default class VideoDock extends Component { console.log(`Starting video call for video: ${id} with ${shareWebcam}`); if (shareWebcam) { + this.setState({sharedWebcam: true}); this.initWebRTC(id, true); } else { // initWebRTC with shareWebcam false will be called after react mounts the element @@ -322,6 +325,10 @@ export default class VideoDock extends Component { delete videos[id]; this.setState({videos: videos}); + + if (id == this.myId) { + this.setState({sharedWebcam: false}); + } } destroyWebRTCPeer(id) { @@ -358,7 +365,6 @@ export default class VideoDock extends Component { } else { log("error", "Not connected to media server BRA"); } - } unshareWebcam() { @@ -445,6 +451,14 @@ export default class VideoDock extends Component { } render() { + let cssClass; + if (this.state.sharedWebcam) { + cssClass = styles.sharedWebcamVideoLocal; + } + else { + cssClass = styles.sharedWebcamVideo; + } + return (
@@ -452,8 +466,8 @@ export default class VideoDock extends Component { {Object.keys(this.state.videos).map((id) => { return (); })} +
-