diff --git a/ui/controls.js b/ui/controls.js index 7660ccaf20..b27143d20a 100644 --- a/ui/controls.js +++ b/ui/controls.js @@ -198,6 +198,10 @@ shaka.ui.Controls = class extends shaka.util.FakeEventTarget { * @export */ async destroy() { + if (document.pictureInPictureElement == this.localVideo_) { + await document.exitPictureInPicture(); + } + if (this.eventManager_) { this.eventManager_.release(); this.eventManager_ = null;