Make video fill up space
parent
0bc61df922
commit
eb9aed441b
|
@ -534,10 +534,21 @@ export default class Viewer extends Mixins(GlobalMixin) {
|
||||||
previewUrl = generateUrl(getDownloadLink(photo));
|
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 {
|
return {
|
||||||
src: previewUrl,
|
src: previewUrl,
|
||||||
width: photo.w || undefined,
|
width: w || undefined,
|
||||||
height: photo.h || undefined,
|
height: h || undefined,
|
||||||
thumbCropped: true,
|
thumbCropped: true,
|
||||||
photo: photo,
|
photo: photo,
|
||||||
type: isvideo ? "video" : "image",
|
type: isvideo ? "video" : "image",
|
||||||
|
|
Loading…
Reference in New Issue