From 9e1e29ddfd532051c086c356be291d349a631b9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Beaufort?= Date: Wed, 31 May 2023 16:31:24 +0200 Subject: [PATCH] fix: Document Picture-in-Picture: Use width/height instead of initialAspectRatio (#8270) --- src/js/player.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/js/player.js b/src/js/player.js index 956bd0aad5..c47187cd9f 100644 --- a/src/js/player.js +++ b/src/js/player.js @@ -3062,7 +3062,8 @@ class Player extends Component { return window.documentPictureInPicture.requestWindow({ // The aspect ratio won't be correct, Chrome bug https://crbug.com/1407629 - initialAspectRatio: this.videoWidth() / this.videoHeight(), + width: this.videoWidth(), + height: this.videoHeight(), copyStyleSheets: true }).then(pipWindow => { this.el_.parentNode.insertBefore(pipContainer, this.el_);