aboutsummaryrefslogtreecommitdiffstats
path: root/src/js
diff options
context:
space:
mode:
authorDanil Stoyanov <d.stoyanov@corp.mail.ru>2020-08-28 23:07:12 +0300
committerDanil Stoyanov <d.stoyanov@corp.mail.ru>2020-08-28 23:07:12 +0300
commit75082bc73f615930a5ea027a04da781b11807b4b (patch)
tree29e82da3910aa2fe1dc9575f00000c00572ddbb2 /src/js
parent423b7b276f1572eb666de32094a9aacd32e87d18 (diff)
downloadplyr-75082bc73f615930a5ea027a04da781b11807b4b.tar.lz
plyr-75082bc73f615930a5ea027a04da781b11807b4b.tar.xz
plyr-75082bc73f615930a5ea027a04da781b11807b4b.zip
Fix for apect ratio problem when using Vimeo player on mobile devices (issue #1940)
Diffstat (limited to 'src/js')
-rw-r--r--src/js/utils/style.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/js/utils/style.js b/src/js/utils/style.js
index c2004fcb..aa57505e 100644
--- a/src/js/utils/style.js
+++ b/src/js/utils/style.js
@@ -68,7 +68,11 @@ export function setAspectRatio(input) {
const height = (100 / this.media.offsetWidth) * parseInt(window.getComputedStyle(this.media).paddingBottom, 10);
const offset = (height - padding) / (height / 50);
- this.media.style.transform = `translateY(-${offset}%)`;
+ if(this.fullscreen.active) {
+ wrapper.style.paddingBottom = null;
+ } else {
+ this.media.style.transform = `translateY(-${offset}%)`;
+ }
} else if (this.isHTML5) {
wrapper.classList.toggle(this.config.classNames.videoFixedRatio, ratio !== null);
}