Make video fill up space

pull/221/head
Varun Patil 2022-11-13 23:35:01 -08:00
parent 0bc61df922
commit eb9aed441b
1 changed files with 13 additions and 2 deletions

View File

@ -534,10 +534,21 @@ export default class Viewer extends Mixins(GlobalMixin) {
previewUrl = generateUrl(getDownloadLink(photo));
}
// Get height and width
let w = photo.w;
let h = photo.h;
if (isvideo && w && h) {
// For videos, make sure the screen is filled up,
// by scaling up the video by a maximum of 4x
w *= 4;
h *= 4;
}
return {
src: previewUrl,
width: photo.w || undefined,
height: photo.h || undefined,
width: w || undefined,
height: h || undefined,
thumbCropped: true,
photo: photo,
type: isvideo ? "video" : "image",