Merge pull request #19625 from ramonlsouza/issue-19620

fix: Taking the presenter plays the external video again
This commit is contained in:
Ramón Souza 2024-02-14 15:26:43 -03:00 committed by GitHub
commit 834923f759
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -266,7 +266,7 @@ const ExternalVideoPlayer: React.FC<ExternalVideoPlayerProps> = ({
} }
}; };
const handleOnPause = () => { const handleOnStop = () => {
if (isPresenter) { if (isPresenter) {
const rate = playerRef.current?.getInternalPlayer()?.getPlaybackRate() as number ?? 1; const rate = playerRef.current?.getInternalPlayer()?.getPlaybackRate() as number ?? 1;
const currentTime = playerRef.current?.getCurrentTime() ?? 0; const currentTime = playerRef.current?.getCurrentTime() ?? 0;
@ -341,7 +341,8 @@ const ExternalVideoPlayer: React.FC<ExternalVideoPlayerProps> = ({
setPlayed(state.played); setPlayed(state.played);
setLoaded(state.loaded); setLoaded(state.loaded);
}} }}
onPause={handleOnPause} onPause={handleOnStop}
onEnded={handleOnStop}
muted={mute} muted={mute}
/> />
{ {