From ebf472fb3dbb457718fb124541a747c7c75a7853 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Beaufort?= Date: Thu, 11 May 2023 11:10:01 +0200 Subject: [PATCH] fix: Document Picture-in-Picture: Use width/height instead of initialAspectRatio --- 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 7d42ddd224..4cc540ac97 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_);