Skip to content
Snippets Groups Projects
Commit 4f7cfb81 authored by Lucas Zawacki's avatar Lucas Zawacki
Browse files

Detect presenter change and reassign external video to new presenter

parent 620fe746
No related branches found
No related tags found
No related merge requests found
...@@ -68,6 +68,15 @@ class VideoPlayer extends Component { ...@@ -68,6 +68,15 @@ class VideoPlayer extends Component {
this.player = null; this.player = null;
} }
componentDidUpdate(prevProp, prevState) {
// Detect presenter change and redo the sync and listeners to reassign video to the new one
if (this.props.isPresenter !== prevProp.isPresenter) {
this.clearVideoListeners();
clearInterval(this.syncInterval);
this.registerVideoListeners();
}
}
static getDerivedStateFromProps(props) { static getDerivedStateFromProps(props) {
const { inEchoTest } = props; const { inEchoTest } = props;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment