Bind the callback so that this code works on Fire/Waterfox too (#745)

This commit is contained in:
Squall Leonhart
2025-06-27 17:04:23 +10:00
committed by GitHub
parent 1e4294746c
commit 59e72582c3

View File

@@ -27,7 +27,7 @@ export abstract class BaseCanvasPlayer extends BaseStreamPlayer {
const $video = this.$video;
frameCallback = $video.requestVideoFrameCallback.bind($video);
} else {
frameCallback = requestAnimationFrame;
frameCallback = window.requestAnimationFrame.bind(window);
}
this.frameCallback = frameCallback;