diff --git a/externs/pictureinpicture.js b/externs/pictureinpicture.js index 12f92e193a..e850b5e156 100644 --- a/externs/pictureinpicture.js +++ b/externs/pictureinpicture.js @@ -53,7 +53,6 @@ HTMLMediaElement.prototype.webkitPresentationMode; /** * @typedef {{ - * initialAspectRatio: (number|undefined), * width: (number|undefined), * height: (number|undefined), * copyStyleSheets: (boolean|undefined), diff --git a/ui/pip_button.js b/ui/pip_button.js index f33aa216ce..34f5a9b93b 100644 --- a/ui/pip_button.js +++ b/ui/pip_button.js @@ -162,7 +162,8 @@ shaka.ui.PipButton = class extends shaka.ui.Element { const pipPlayer = this.videoContainer_; const rectPipPlayer = pipPlayer.getBoundingClientRect(); const pipWindow = await window.documentPictureInPicture.requestWindow({ - initialAspectRatio: rectPipPlayer.width / rectPipPlayer.height, + width: rectPipPlayer.width, + height: rectPipPlayer.height, copyStyleSheets: true, });