diff --git a/bigbluebutton-html5/imports/ui/components/modal/random-user/component.jsx b/bigbluebutton-html5/imports/ui/components/modal/random-user/component.jsx index 667476dcac2ae3039efa9afeb9cf6d47bbdc6746..0e567bac4130ad6a09990f2d99760137a17b5942 100644 --- a/bigbluebutton-html5/imports/ui/components/modal/random-user/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/modal/random-user/component.jsx @@ -82,10 +82,14 @@ class RandomUserSelect extends Component { } } - componentDidUpdate() { + componentDidUpdate(prevProps, prevState) { if (this.props.currentUser.presenter && this.state.count == 0) { this.iterateSelection(); } + + if (prevState.count !== this.state.count) { + this.play(); + } } play() { @@ -117,8 +121,6 @@ class RandomUserSelect extends Component { const selectedUser = mappedRandomlySelectedUsers[this.state.count][0]; const countDown = mappedRandomlySelectedUsers.length - this.state.count - 1; - this.play(); - let viewElement; const amISelectedUser = currentUser.userId === selectedUser.userId;