chore: rename setPlayerStatus
to setPlayerPauseState
This commit is contained in:
@@ -728,11 +728,10 @@ class VideoPlayer extends Component {
|
||||
}
|
||||
|
||||
const {paused} = this.state;
|
||||
const {pause, play, setPlayerStatus} = this.video.current;
|
||||
const {pause, play} = this.video.current;
|
||||
const shouldPlay = paused === true || paused === undefined;
|
||||
|
||||
shouldPlay ? play() : pause();
|
||||
// OR setPlayerStatus(shouldPlay);
|
||||
|
||||
this.setState({paused: !shouldPlay});
|
||||
}}>
|
||||
|
@@ -235,11 +235,10 @@ class VideoPlayer extends Component {
|
||||
return;
|
||||
}
|
||||
|
||||
const {play, pause, setPlayerStatus} = this.video.current;
|
||||
const {play, pause} = this.video.current;
|
||||
const shouldPlay = !this.state.paused;
|
||||
|
||||
shouldPlay ? play() : pause();
|
||||
// OR setPlayerStatus(shouldPlay)
|
||||
|
||||
this.setState({paused: shouldPlay});
|
||||
}}>
|
||||
|
Reference in New Issue
Block a user