aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSam Potts <me@sampotts.me>2017-11-06 20:27:19 +1100
committerSam Potts <me@sampotts.me>2017-11-06 20:27:19 +1100
commit3a9beaed59f4eaca6ce2fd3f167f5c171317bb26 (patch)
tree177897eb397e89e115e49f1ad0eeccd72f593d27 /src
parent1578525ee38a50b31266bc9ba3ecd62705d4a5d5 (diff)
downloadplyr-3a9beaed59f4eaca6ce2fd3f167f5c171317bb26.tar.lz
plyr-3a9beaed59f4eaca6ce2fd3f167f5c171317bb26.tar.xz
plyr-3a9beaed59f4eaca6ce2fd3f167f5c171317bb26.zip
Vimeo captions fix
Diffstat (limited to 'src')
-rw-r--r--src/js/plugins/vimeo.js2
-rw-r--r--src/less/components/embed.less4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/js/plugins/vimeo.js b/src/js/plugins/vimeo.js
index 6e4f34a2..9b67bdb0 100644
--- a/src/js/plugins/vimeo.js
+++ b/src/js/plugins/vimeo.js
@@ -19,7 +19,7 @@ const vimeo = {
// Set aspect ratio
const ratio = this.config.ratio.split(':');
const padding = 100 / ratio[0] * ratio[1];
- const offset = (400 - padding) / 8;
+ const offset = (300 - padding) / 6;
this.elements.wrapper.style.paddingBottom = `${padding}%`;
this.media.style.transform = `translateY(-${offset}%)`;
diff --git a/src/less/components/embed.less b/src/less/components/embed.less
index 7860f671..d31e4770 100644
--- a/src/less/components/embed.less
+++ b/src/less/components/embed.less
@@ -6,7 +6,7 @@
.plyr__video-embed {
// Default to 16:9 ratio but this is set by JavaScript based on config
@padding: ((100 / 16) * 9);
- @offset: unit((400 - @padding) / 8, ~'%');
+ @offset: unit((300 - @padding) / 6, ~'%');
padding-bottom: unit(@padding, ~'%');
height: 0;
@@ -24,7 +24,7 @@
// Vimeo hack
> div {
position: relative;
- padding-bottom: 400%;
+ padding-bottom: 300%;
transform: translateY(-@offset);
}
}