summaryrefslogtreecommitdiffstats
path: root/browser/extensions/pictureinpicture/video-wrappers
diff options
context:
space:
mode:
Diffstat (limited to 'browser/extensions/pictureinpicture/video-wrappers')
-rw-r--r--browser/extensions/pictureinpicture/video-wrappers/airmozilla.js2
-rw-r--r--browser/extensions/pictureinpicture/video-wrappers/arte.js2
-rw-r--r--browser/extensions/pictureinpicture/video-wrappers/bbc.js2
-rw-r--r--browser/extensions/pictureinpicture/video-wrappers/dailymotion.js2
-rw-r--r--browser/extensions/pictureinpicture/video-wrappers/disneyplus.js2
-rw-r--r--browser/extensions/pictureinpicture/video-wrappers/edx.js2
-rw-r--r--browser/extensions/pictureinpicture/video-wrappers/hbomax.js2
-rw-r--r--browser/extensions/pictureinpicture/video-wrappers/hotstar.js2
-rw-r--r--browser/extensions/pictureinpicture/video-wrappers/hulu.js4
-rw-r--r--browser/extensions/pictureinpicture/video-wrappers/mock-wrapper.js4
-rw-r--r--browser/extensions/pictureinpicture/video-wrappers/netflix.js8
-rw-r--r--browser/extensions/pictureinpicture/video-wrappers/nytimes.js2
-rw-r--r--browser/extensions/pictureinpicture/video-wrappers/piped.js2
-rw-r--r--browser/extensions/pictureinpicture/video-wrappers/primeVideo.js2
-rw-r--r--browser/extensions/pictureinpicture/video-wrappers/sonyliv.js2
-rw-r--r--browser/extensions/pictureinpicture/video-wrappers/tubi.js2
-rw-r--r--browser/extensions/pictureinpicture/video-wrappers/tubilive.js2
-rw-r--r--browser/extensions/pictureinpicture/video-wrappers/twitch.js2
-rw-r--r--browser/extensions/pictureinpicture/video-wrappers/udemy.js2
-rw-r--r--browser/extensions/pictureinpicture/video-wrappers/videojsWrapper.js2
-rw-r--r--browser/extensions/pictureinpicture/video-wrappers/voot.js2
-rw-r--r--browser/extensions/pictureinpicture/video-wrappers/washingtonpost.js2
-rw-r--r--browser/extensions/pictureinpicture/video-wrappers/yahoo.js2
-rw-r--r--browser/extensions/pictureinpicture/video-wrappers/youtube.js4
24 files changed, 29 insertions, 31 deletions
diff --git a/browser/extensions/pictureinpicture/video-wrappers/airmozilla.js b/browser/extensions/pictureinpicture/video-wrappers/airmozilla.js
index d2e98cbe48..a669154a44 100644
--- a/browser/extensions/pictureinpicture/video-wrappers/airmozilla.js
+++ b/browser/extensions/pictureinpicture/video-wrappers/airmozilla.js
@@ -35,7 +35,7 @@ class PictureInPictureVideoWrapper {
if (container) {
updateCaptionsFunction("");
- const callback = function (mutationsList, observer) {
+ const callback = function () {
let text = container?.querySelector("#overlayCaption").innerText;
if (!text) {
diff --git a/browser/extensions/pictureinpicture/video-wrappers/arte.js b/browser/extensions/pictureinpicture/video-wrappers/arte.js
index 3d1df1f65f..c8bbec2855 100644
--- a/browser/extensions/pictureinpicture/video-wrappers/arte.js
+++ b/browser/extensions/pictureinpicture/video-wrappers/arte.js
@@ -10,7 +10,7 @@ class PictureInPictureVideoWrapper {
if (container) {
updateCaptionsFunction("");
- const callback = function (mutationsList, observer) {
+ const callback = function () {
let textNodeList = container.querySelectorAll(".avp-captions-line");
if (!textNodeList.length) {
updateCaptionsFunction("");
diff --git a/browser/extensions/pictureinpicture/video-wrappers/bbc.js b/browser/extensions/pictureinpicture/video-wrappers/bbc.js
index a5adcbc534..cc8c5daa5c 100644
--- a/browser/extensions/pictureinpicture/video-wrappers/bbc.js
+++ b/browser/extensions/pictureinpicture/video-wrappers/bbc.js
@@ -10,7 +10,7 @@ class PictureInPictureVideoWrapper {
if (container) {
updateCaptionsFunction("");
- const callback = function (mutationsList, observer) {
+ const callback = function () {
let text = container.querySelector(".p_cueDirUniWrapper")?.innerText;
updateCaptionsFunction(text);
};
diff --git a/browser/extensions/pictureinpicture/video-wrappers/dailymotion.js b/browser/extensions/pictureinpicture/video-wrappers/dailymotion.js
index 161f1ec516..75f8db5e19 100644
--- a/browser/extensions/pictureinpicture/video-wrappers/dailymotion.js
+++ b/browser/extensions/pictureinpicture/video-wrappers/dailymotion.js
@@ -10,7 +10,7 @@ class PictureInPictureVideoWrapper {
if (container) {
updateCaptionsFunction("");
- const callback = function (mutationsList, observer) {
+ const callback = function () {
let textNodeList = container
?.querySelector(".subtitles")
?.querySelectorAll("div");
diff --git a/browser/extensions/pictureinpicture/video-wrappers/disneyplus.js b/browser/extensions/pictureinpicture/video-wrappers/disneyplus.js
index bb5c55e0cb..a15bda727a 100644
--- a/browser/extensions/pictureinpicture/video-wrappers/disneyplus.js
+++ b/browser/extensions/pictureinpicture/video-wrappers/disneyplus.js
@@ -41,7 +41,7 @@ class PictureInPictureVideoWrapper {
container = document.querySelector(".shaka-text-container");
if (container) {
updateCaptionsFunction("");
- const callback = function (mutationsList, observer) {
+ const callback = function () {
let textNodeList = container?.querySelectorAll("span");
if (!textNodeList) {
updateCaptionsFunction("");
diff --git a/browser/extensions/pictureinpicture/video-wrappers/edx.js b/browser/extensions/pictureinpicture/video-wrappers/edx.js
index 07a3d9f302..5e9126ad4c 100644
--- a/browser/extensions/pictureinpicture/video-wrappers/edx.js
+++ b/browser/extensions/pictureinpicture/video-wrappers/edx.js
@@ -10,7 +10,7 @@ class PictureInPictureVideoWrapper {
if (container) {
updateCaptionsFunction("");
- const callback = function (mutationsList, observer) {
+ const callback = function () {
let text = container.querySelector(
".closed-captions.is-visible"
)?.innerText;
diff --git a/browser/extensions/pictureinpicture/video-wrappers/hbomax.js b/browser/extensions/pictureinpicture/video-wrappers/hbomax.js
index 8aff3e0077..5566f1e0b8 100644
--- a/browser/extensions/pictureinpicture/video-wrappers/hbomax.js
+++ b/browser/extensions/pictureinpicture/video-wrappers/hbomax.js
@@ -25,7 +25,7 @@ class PictureInPictureVideoWrapper {
if (container) {
updateCaptionsFunction("");
- const callback = function (mutationsList, observer) {
+ const callback = function () {
let text = container.querySelector(
'[data-testid="CueBoxContainer"]'
)?.innerText;
diff --git a/browser/extensions/pictureinpicture/video-wrappers/hotstar.js b/browser/extensions/pictureinpicture/video-wrappers/hotstar.js
index c6b45b1a0a..3d366f77a4 100644
--- a/browser/extensions/pictureinpicture/video-wrappers/hotstar.js
+++ b/browser/extensions/pictureinpicture/video-wrappers/hotstar.js
@@ -10,7 +10,7 @@ class PictureInPictureVideoWrapper {
if (container) {
updateCaptionsFunction("");
- const callback = function (mutationsList, observer) {
+ const callback = function () {
let textNodeList = container?.querySelectorAll("span");
if (!textNodeList) {
updateCaptionsFunction("");
diff --git a/browser/extensions/pictureinpicture/video-wrappers/hulu.js b/browser/extensions/pictureinpicture/video-wrappers/hulu.js
index fdaf6d7c18..000e8f661b 100644
--- a/browser/extensions/pictureinpicture/video-wrappers/hulu.js
+++ b/browser/extensions/pictureinpicture/video-wrappers/hulu.js
@@ -32,7 +32,7 @@ class PictureInPictureVideoWrapper {
if (container) {
updateCaptionsFunction("");
- const callback = function (mutationsList, observer) {
+ const callback = function () {
// This will get the subtitles for both live and regular playback videos
// and combine them to display. liveVideoText should be an empty string
// when the video is regular playback and vice versa. If both
@@ -63,7 +63,7 @@ class PictureInPictureVideoWrapper {
});
}
}
- getDuration(video) {
+ getDuration() {
return this.player.duration;
}
}
diff --git a/browser/extensions/pictureinpicture/video-wrappers/mock-wrapper.js b/browser/extensions/pictureinpicture/video-wrappers/mock-wrapper.js
index b68ce3fa9b..c179ed1084 100644
--- a/browser/extensions/pictureinpicture/video-wrappers/mock-wrapper.js
+++ b/browser/extensions/pictureinpicture/video-wrappers/mock-wrapper.js
@@ -5,12 +5,12 @@
"use strict";
class PictureInPictureVideoWrapper {
- play(video) {
+ play() {
let playPauseButton = document.querySelector("#player .play-pause-button");
playPauseButton.click();
}
- pause(video) {
+ pause() {
let invalidSelector = "#player .pause-button";
let playPauseButton = document.querySelector(invalidSelector);
playPauseButton.click();
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);
};
diff --git a/browser/extensions/pictureinpicture/video-wrappers/nytimes.js b/browser/extensions/pictureinpicture/video-wrappers/nytimes.js
index 4f6d8cbe44..8e3e6b0985 100644
--- a/browser/extensions/pictureinpicture/video-wrappers/nytimes.js
+++ b/browser/extensions/pictureinpicture/video-wrappers/nytimes.js
@@ -10,7 +10,7 @@ class PictureInPictureVideoWrapper {
if (container) {
updateCaptionsFunction("");
- const callback = function (mutationsList, observer) {
+ const callback = function () {
let text = container.querySelector(".cueWrap-2P4Ue4VQ")?.innerText;
if (!text) {
updateCaptionsFunction("");
diff --git a/browser/extensions/pictureinpicture/video-wrappers/piped.js b/browser/extensions/pictureinpicture/video-wrappers/piped.js
index 1cc1c32eb2..738fa973c6 100644
--- a/browser/extensions/pictureinpicture/video-wrappers/piped.js
+++ b/browser/extensions/pictureinpicture/video-wrappers/piped.js
@@ -10,7 +10,7 @@ class PictureInPictureVideoWrapper {
if (container) {
updateCaptionsFunction("");
- const callback = function (mutationsList, observer) {
+ const callback = function () {
let textNodeList = container
.querySelector(".shaka-text-wrapper")
?.querySelectorAll('span[style="background-color: black;"]');
diff --git a/browser/extensions/pictureinpicture/video-wrappers/primeVideo.js b/browser/extensions/pictureinpicture/video-wrappers/primeVideo.js
index 28a2bd1575..1d23903102 100644
--- a/browser/extensions/pictureinpicture/video-wrappers/primeVideo.js
+++ b/browser/extensions/pictureinpicture/video-wrappers/primeVideo.js
@@ -57,7 +57,7 @@ class PictureInPictureVideoWrapper {
if (container) {
updateCaptionsFunction("");
- const callback = function (mutationsList, observer) {
+ const callback = function (mutationsList) {
// eslint-disable-next-line no-unused-vars
for (const mutation of mutationsList) {
let text;
diff --git a/browser/extensions/pictureinpicture/video-wrappers/sonyliv.js b/browser/extensions/pictureinpicture/video-wrappers/sonyliv.js
index b703aaec2c..44e7b82165 100644
--- a/browser/extensions/pictureinpicture/video-wrappers/sonyliv.js
+++ b/browser/extensions/pictureinpicture/video-wrappers/sonyliv.js
@@ -10,7 +10,7 @@ class PictureInPictureVideoWrapper {
if (container) {
updateCaptionsFunction("");
- const callback = function (mutationsList, observer) {
+ const callback = function () {
let text = container.querySelector(
`.text-track-wrapper:not([style*="display: none"])`
)?.innerText;
diff --git a/browser/extensions/pictureinpicture/video-wrappers/tubi.js b/browser/extensions/pictureinpicture/video-wrappers/tubi.js
index 291dbfddeb..c31cdca3d4 100644
--- a/browser/extensions/pictureinpicture/video-wrappers/tubi.js
+++ b/browser/extensions/pictureinpicture/video-wrappers/tubi.js
@@ -10,7 +10,7 @@ class PictureInPictureVideoWrapper {
if (container) {
updateCaptionsFunction("");
- const callback = function (mutationsList, observer) {
+ const callback = function () {
let text = container?.querySelector(
`[data-id="captionsComponent"]:not([style="display: none;"])`
)?.innerText;
diff --git a/browser/extensions/pictureinpicture/video-wrappers/tubilive.js b/browser/extensions/pictureinpicture/video-wrappers/tubilive.js
index 0de748e717..02ec876cac 100644
--- a/browser/extensions/pictureinpicture/video-wrappers/tubilive.js
+++ b/browser/extensions/pictureinpicture/video-wrappers/tubilive.js
@@ -10,7 +10,7 @@ class PictureInPictureVideoWrapper {
if (container) {
updateCaptionsFunction("");
- const callback = function (mutationsList, observer) {
+ const callback = function () {
let text =
container.querySelector(`.tubi-text-track-container`)?.innerText ||
container.querySelector(`.subtitleWindow`)?.innerText;
diff --git a/browser/extensions/pictureinpicture/video-wrappers/twitch.js b/browser/extensions/pictureinpicture/video-wrappers/twitch.js
index 1dd7567c24..0c339d063d 100644
--- a/browser/extensions/pictureinpicture/video-wrappers/twitch.js
+++ b/browser/extensions/pictureinpicture/video-wrappers/twitch.js
@@ -5,7 +5,7 @@
"use strict";
class PictureInPictureVideoWrapper {
- isLive(video) {
+ isLive() {
return !document.querySelector(".seekbar-bar");
}
getDuration(video) {
diff --git a/browser/extensions/pictureinpicture/video-wrappers/udemy.js b/browser/extensions/pictureinpicture/video-wrappers/udemy.js
index 09e3b989dc..ad28cb3248 100644
--- a/browser/extensions/pictureinpicture/video-wrappers/udemy.js
+++ b/browser/extensions/pictureinpicture/video-wrappers/udemy.js
@@ -37,7 +37,7 @@ class PictureInPictureVideoWrapper {
if (container) {
updateCaptionsFunction("");
- const callback = function (mutationsList, observer) {
+ const callback = function () {
let text = container.querySelector(
`[data-purpose="captions-cue-text"]`
)?.innerText;
diff --git a/browser/extensions/pictureinpicture/video-wrappers/videojsWrapper.js b/browser/extensions/pictureinpicture/video-wrappers/videojsWrapper.js
index ca3145af4a..2e94c58f4e 100644
--- a/browser/extensions/pictureinpicture/video-wrappers/videojsWrapper.js
+++ b/browser/extensions/pictureinpicture/video-wrappers/videojsWrapper.js
@@ -11,7 +11,7 @@ class PictureInPictureVideoWrapper {
if (container) {
updateCaptionsFunction("");
- const callback = function (mutationsList, observer) {
+ const callback = function () {
let text = container.querySelector("div").innerText;
if (!text) {
updateCaptionsFunction("");
diff --git a/browser/extensions/pictureinpicture/video-wrappers/voot.js b/browser/extensions/pictureinpicture/video-wrappers/voot.js
index 57d903a2e8..01d3e4e8d4 100644
--- a/browser/extensions/pictureinpicture/video-wrappers/voot.js
+++ b/browser/extensions/pictureinpicture/video-wrappers/voot.js
@@ -10,7 +10,7 @@ class PictureInPictureVideoWrapper {
if (container) {
updateCaptionsFunction("");
- const callback = function (mutationsList, observer) {
+ const callback = function () {
let text = container.querySelector(".playkit-subtitles").innerText;
if (!text) {
updateCaptionsFunction("");
diff --git a/browser/extensions/pictureinpicture/video-wrappers/washingtonpost.js b/browser/extensions/pictureinpicture/video-wrappers/washingtonpost.js
index 6d0e57c96a..340306328c 100644
--- a/browser/extensions/pictureinpicture/video-wrappers/washingtonpost.js
+++ b/browser/extensions/pictureinpicture/video-wrappers/washingtonpost.js
@@ -10,7 +10,7 @@ class PictureInPictureVideoWrapper {
if (container) {
updateCaptionsFunction("");
- const callback = function (mutationsList, observer) {
+ const callback = function () {
let subtitleElement = container.querySelector(".powa-sub-torpedo");
if (!subtitleElement?.innerText) {
updateCaptionsFunction("");
diff --git a/browser/extensions/pictureinpicture/video-wrappers/yahoo.js b/browser/extensions/pictureinpicture/video-wrappers/yahoo.js
index b7d8d3160f..1dd932bc37 100644
--- a/browser/extensions/pictureinpicture/video-wrappers/yahoo.js
+++ b/browser/extensions/pictureinpicture/video-wrappers/yahoo.js
@@ -10,7 +10,7 @@ class PictureInPictureVideoWrapper {
if (container) {
updateCaptionsFunction("");
- const callback = function (mutationsList, observer) {
+ const callback = function () {
let text = container.querySelector(".vp-cc-element.vp-show")?.innerText;
if (!text) {
diff --git a/browser/extensions/pictureinpicture/video-wrappers/youtube.js b/browser/extensions/pictureinpicture/video-wrappers/youtube.js
index 8b39e469f9..b704e711cc 100644
--- a/browser/extensions/pictureinpicture/video-wrappers/youtube.js
+++ b/browser/extensions/pictureinpicture/video-wrappers/youtube.js
@@ -14,7 +14,7 @@ class PictureInPictureVideoWrapper {
? shortsPlayer
: video.closest("#movie_player")?.wrappedJSObject;
}
- isLive(video) {
+ isLive() {
return !!document.querySelector(".ytp-live");
}
setMuted(video, shouldMute) {
@@ -39,7 +39,7 @@ class PictureInPictureVideoWrapper {
if (container) {
updateCaptionsFunction("");
- const callback = function (mutationsList, observer) {
+ const callback = function (mutationsList) {
// eslint-disable-next-line no-unused-vars
for (const mutation of mutationsList) {
let textNodeList = container