diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
commit | 40a355a42d4a9444dc753c04c6608dade2f06a23 (patch) | |
tree | 871fc667d2de662f171103ce5ec067014ef85e61 /browser/extensions/pictureinpicture/video-wrappers/netflix.js | |
parent | Adding upstream version 124.0.1. (diff) | |
download | firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.tar.xz firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.zip |
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'browser/extensions/pictureinpicture/video-wrappers/netflix.js')
-rw-r--r-- | browser/extensions/pictureinpicture/video-wrappers/netflix.js | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/browser/extensions/pictureinpicture/video-wrappers/netflix.js b/browser/extensions/pictureinpicture/video-wrappers/netflix.js index e33fe23a24..7458da4447 100644 --- a/browser/extensions/pictureinpicture/video-wrappers/netflix.js +++ b/browser/extensions/pictureinpicture/video-wrappers/netflix.js @@ -22,20 +22,18 @@ class PictureInPictureVideoWrapper { * The Netflix player returns the current time in milliseconds so we convert * to seconds before returning. * - * @param {HTMLVideoElement} video The original video element * @returns {number} The current time in seconds */ - getCurrentTime(video) { + getCurrentTime() { return this.player.getCurrentTime() / 1000; } /** * The Netflix player returns the duration in milliseconds so we convert to * seconds before returning. * - * @param {HTMLVideoElement} video The original video element * @returns {number} The duration in seconds */ - getDuration(video) { + getDuration() { return this.player.getDuration() / 1000; } play() { @@ -50,7 +48,7 @@ class PictureInPictureVideoWrapper { if (container) { updateCaptionsFunction(""); - const callback = function (mutationsList, observer) { + const callback = function () { let text = container.querySelector(".player-timedtext").innerText; updateCaptionsFunction(text); }; |