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 (videojs#8270)
  • Loading branch information
beaufortfrancois authored and edirub committed Jun 8, 2023
1 parent 297059a commit c35d231
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 c35d231

Please sign in to comment.