Add media subtype & fix resizing

This commit is contained in:
franzz committed 2019-06-30 22:21:39 +02:00
1 parent 73f2e6c6e4
commit e80ae81e42
4 files changed
+226 -5

No files matched your search

+2 -2
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);
}