Add media subtype & fix resizing

This commit is contained in:
2019-06-30 22:21:39 +02:00
parent 8044d8640c
commit 5b2fc3f854
4 changed files with 226 additions and 5 deletions

View File

@@ -325,12 +325,12 @@
if((this.videoWidth > maxVideoWidth) || (this.videoHeight > maxVideoHeight)) {
if ((this.videoWidth / maxVideoWidth) > (this.videoHeight / maxVideoHeight)) {
videoWidth = maxVideoWidth;
videoHeight = parseInt(this.videoHeight / (this.videoWidth / videoWidth), 10);
videoHeight = Math.round(this.videoHeight / (this.videoWidth / videoWidth));
$This.width(videoWidth);
$This.height(videoHeight);
} else {
videoHeight = maxVideoHeight;
videoWidth = parseInt(this.videoWidth / (this.videoHeight / videoHeight), 10);
videoWidth = Math.round(this.videoWidth / (this.videoHeight / videoHeight));
$This.width(videoWidth);
$This.height(videoHeight);
}