diff --git a/browser/extensions/pictureinpicture/video-wrappers/airmozilla.js b/browser/extensions/pictureinpicture/video-wrappers/airmozilla.js index db4f97a82974..d5449eecd5b2 100644 --- a/browser/extensions/pictureinpicture/video-wrappers/airmozilla.js +++ b/browser/extensions/pictureinpicture/video-wrappers/airmozilla.js @@ -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");