Merge pull request #19840 from Scroody/i-19775

Fix: External video plays while paused when it has some user action
This commit is contained in:
Ramón Souza 2024-03-25 08:57:25 -03:00 committed by GitHub
commit cdf0b50482
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -505,7 +505,8 @@ const ExternalVideoPlayerContainer: React.FC = () => {
const playerUpdatedAt = currentMeeting.externalVideo?.updatedAt ?? Date.now();
const playerUpdatedAtDate = new Date(playerUpdatedAt);
const currentDate = new Date(Date.now() + timeSync);
const currentTime = (((currentDate.getTime() - playerUpdatedAtDate.getTime()) / 1000)
const isPaused = !currentMeeting.externalVideo?.playerPlaying ?? false;
const currentTime = isPaused ? playerCurrentTime : (((currentDate.getTime() - playerUpdatedAtDate.getTime()) / 1000)
+ playerCurrentTime) * playerPlaybackRate;
const isPresenter = currentUser.presenter ?? false;