aboutsummaryrefslogtreecommitdiffstats
path: root/src/js
diff options
context:
space:
mode:
authorSam Potts <sam@potts.es>2020-01-26 22:05:21 +0000
committerSam Potts <sam@potts.es>2020-01-26 22:05:21 +0000
commitf8a28b632cf12a2c557a766010252b9edd4cdb8e (patch)
tree85d85fdd2e8c9ddf45c8709f439dd135d8eb7028 /src/js
parentb6da2702a2bb11da63009749954efc3dc2ba0942 (diff)
downloadplyr-f8a28b632cf12a2c557a766010252b9edd4cdb8e.tar.lz
plyr-f8a28b632cf12a2c557a766010252b9edd4cdb8e.tar.xz
plyr-f8a28b632cf12a2c557a766010252b9edd4cdb8e.zip
Audio style fix
Diffstat (limited to 'src/js')
-rw-r--r--src/js/utils/style.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/js/utils/style.js b/src/js/utils/style.js
index 941db8f2..17a033fe 100644
--- a/src/js/utils/style.js
+++ b/src/js/utils/style.js
@@ -56,11 +56,12 @@ export function setAspectRatio(input) {
return {};
}
+ const { wrapper } = this.elements;
const ratio = getAspectRatio.call(this, input);
const [w, h] = is.array(ratio) ? ratio : [0, 0];
const padding = (100 / w) * h;
- this.elements.wrapper.style.paddingBottom = `${padding}%`;
+ wrapper.style.paddingBottom = `${padding}%`;
// For Vimeo we have an extra <div> to hide the standard controls and UI
if (this.isVimeo && this.supported.ui) {
@@ -68,7 +69,7 @@ export function setAspectRatio(input) {
const offset = (height - padding) / (height / 50);
this.media.style.transform = `translateY(-${offset}%)`;
} else if (this.isHTML5) {
- this.elements.wrapper.classList.toggle(this.config.classNames.videoFixedRatio, ratio !== null);
+ wrapper.classList.toggle(this.config.classNames.videoFixedRatio, ratio !== null);
}
return { padding, ratio };