updateCaptionsFunction(text); }; // immediately invoke the callback function to add subtitles to the PiP window callback([1], null); this.captionsObserver = new MutationObserver(callback); this.captionsObserver.observe(container, { attributes: false, childList: true, subtree: true, }); } } removeCaptionContainerObserver() { this.captionsObserver?.disconnect(); } } this.PictureInPictureVideoWrapper = PictureInPictureVideoWrapper; PK