diff --git a/bigbluebutton-html5/imports/ui/components/video-provider/video-dock/component.jsx b/bigbluebutton-html5/imports/ui/components/video-provider/video-dock/component.jsx index b5e6904c52..048f3b1ccd 100755 --- a/bigbluebutton-html5/imports/ui/components/video-provider/video-dock/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/video-provider/video-dock/component.jsx @@ -74,6 +74,15 @@ class VideoDock extends Component { }, 0); } + getUsersWithActiveStreams() { + const { userId, sharedWebcam } = this.props; + const activeFilter = (user) => { + return user.has_stream || (sharedWebcam && user.userId == userId); + }; + + return this.props.users.filter(activeFilter); + } + render() { if (!this.props.socketOpen) { // TODO: return something when disconnected @@ -86,7 +95,7 @@ class VideoDock extends Component { return (
- {this.props.users.filter(u => u.has_stream || (sharedWebcam && u.userId == id)).map(user => ( + {this.getUsersWithActiveStreams().map(user => (