Skip to content

Commit

Permalink
fix: Document Picture-in-Picture: Use width/height instead of initial…
Browse files Browse the repository at this point in the history
…AspectRatio
  • Loading branch information
beaufortfrancois authored May 11, 2023
1 parent 1491d71 commit ebf472f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/js/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -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_);
Expand Down

0 comments on commit ebf472f

Please sign in to comment.