From e31ad384bd7a680888173f85bb5a949a6df52da4 Mon Sep 17 00:00:00 2001 From: MathMan05 Date: Sat, 17 Aug 2024 13:14:48 -0500 Subject: [PATCH] fix video defualt height --- .dist/file.js | 4 ++++ webpage/file.ts | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/.dist/file.js b/.dist/file.js index 5d7a689..ee7588d 100644 --- a/.dist/file.js +++ b/.dist/file.js @@ -61,6 +61,10 @@ class File { video.append(source); source.type = this.content_type; video.controls = !temp; + if (this.width) { + video.width = this.width; + video.height = this.height; + } return video; } else if (this.content_type.startsWith('audio/')) { diff --git a/webpage/file.ts b/webpage/file.ts index 21e6e25..12d56c9 100644 --- a/webpage/file.ts +++ b/webpage/file.ts @@ -62,6 +62,10 @@ class File{ video.append(source); source.type=this.content_type; video.controls=!temp; + if(this.width){ + video.width=this.width; + video.height=this.height; + } return video; }else if(this.content_type.startsWith('audio/')){ const audio=document.createElement("audio");