Get aard to start reliably if it's set as default aspect ratio for the site

This commit is contained in:
Tamius Han 2024-06-10 23:40:33 +02:00
parent 99df043b5f
commit da12ee452c

View File

@ -141,6 +141,11 @@ class Resizer {
this.stretcher = new Stretcher(this.videoData);
this.zoom = new Zoom(this.videoData);
const defaultCrop = this.siteSettings.getDefaultOption('crop') as {type: AspectRatioType, ratio?: number };
if (defaultCrop.type !== AspectRatioType.Reset) {
this.lastAr = defaultCrop;
}
this.videoAlignment = this.siteSettings.getDefaultOption('alignment') as {x: VideoAlignmentType, y: VideoAlignmentType} // this is initial video alignment
this.destroyed = false;