Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

Fixing viewport resizing not always working due to improperly calling timer. #247

Merged
merged 1 commit into from
Jun 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Frontend/library/src/VideoPlayer/VideoPlayer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ export class VideoPlayer {
}

const now = new Date().getTime();
if (now - this.lastTimeResized > 1000) {
if (now - this.lastTimeResized > 300) {
const videoElementParent = this.getVideoParentElement();
if (!videoElementParent) {
return;
Expand All @@ -230,8 +230,8 @@ export class VideoPlayer {
);
clearTimeout(this.resizeTimeoutHandle);
this.resizeTimeoutHandle = window.setTimeout(
() => this.updateVideoStreamSize,
1000
() => this.updateVideoStreamSize(),
lukehb marked this conversation as resolved.
Show resolved Hide resolved
100
);
}
}
Expand Down