Vimeo captions fix

This commit is contained in:
Sam Potts 2017-11-06 20:27:19 +11:00
parent 1578525ee3
commit 3a9beaed59
5 changed files with 6 additions and 6 deletions

2
dist/plyr.css vendored

File diff suppressed because one or more lines are too long

2
dist/plyr.js vendored

File diff suppressed because one or more lines are too long

2
dist/plyr.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -19,7 +19,7 @@ const vimeo = {
// Set aspect ratio // Set aspect ratio
const ratio = this.config.ratio.split(':'); const ratio = this.config.ratio.split(':');
const padding = 100 / ratio[0] * ratio[1]; const padding = 100 / ratio[0] * ratio[1];
const offset = (400 - padding) / 8; const offset = (300 - padding) / 6;
this.elements.wrapper.style.paddingBottom = `${padding}%`; this.elements.wrapper.style.paddingBottom = `${padding}%`;
this.media.style.transform = `translateY(-${offset}%)`; this.media.style.transform = `translateY(-${offset}%)`;

View File

@ -6,7 +6,7 @@
.plyr__video-embed { .plyr__video-embed {
// Default to 16:9 ratio but this is set by JavaScript based on config // Default to 16:9 ratio but this is set by JavaScript based on config
@padding: ((100 / 16) * 9); @padding: ((100 / 16) * 9);
@offset: unit((400 - @padding) / 8, ~'%'); @offset: unit((300 - @padding) / 6, ~'%');
padding-bottom: unit(@padding, ~'%'); padding-bottom: unit(@padding, ~'%');
height: 0; height: 0;
@ -24,7 +24,7 @@
// Vimeo hack // Vimeo hack
> div { > div {
position: relative; position: relative;
padding-bottom: 400%; padding-bottom: 300%;
transform: translateY(-@offset); transform: translateY(-@offset);
} }
} }