Bug 1764834 - Fix: AirMozilla play and mute button sync in PIP window r=kpatenio,niklas

Differential Revision: https://phabricator.services.mozilla.com/D168123
This commit is contained in:
janvi01 2023-02-07 18:55:56 +00:00
Родитель 34b836525c
Коммит 3207daf513
1 изменённых файлов: 21 добавлений и 0 удалений

Просмотреть файл

@ -5,6 +5,27 @@
"use strict";
class PictureInPictureVideoWrapper {
play(video) {
let playPauseButton = document.querySelector(
"#transportControls #playButton"
);
playPauseButton?.click();
}
pause(video) {
let playPauseButton = document.querySelector(
"#transportControls #playButton"
);
playPauseButton?.click();
}
setMuted(video, shouldMute) {
let muteButton = document.querySelector("#transportControls #muteButton");
if (video.muted !== shouldMute && muteButton) {
muteButton.click();
}
}
setCaptionContainerObserver(video, updateCaptionsFunction) {
let container = document.querySelector("#absoluteControls");