зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
34b836525c
Коммит
3207daf513
|
@ -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");
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче