Skip to content

Commit

Permalink
Editor: Improved video render UX on mobile.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdoob committed Feb 20, 2024
1 parent b50d098 commit 2315ae8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions editor/js/Sidebar.Project.Video.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@ function SidebarProjectVideo( editor ) {
const top = ( screen.height - height ) / 2;

const output = window.open( '', '_blank', `location=no,left=${left},top=${top},width=${width},height=${height}` );

const meta = document.createElement( 'meta' );
meta.name = 'viewport';
meta.content = 'width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0';
output.document.head.appendChild( meta );

output.document.body.style.background = '#000';
output.document.body.style.margin = '0px';
output.document.body.style.overflow = 'hidden';
Expand Down

0 comments on commit 2315ae8

Please sign in to comment.