Vimeo offset tweak (fixes #826)
This commit is contained in:
parent
c251c94131
commit
5eafe9baff
2
demo/dist/demo.css
vendored
2
demo/dist/demo.css
vendored
File diff suppressed because one or more lines are too long
2
dist/plyr.css
vendored
2
dist/plyr.css
vendored
File diff suppressed because one or more lines are too long
2
dist/plyr.js
vendored
2
dist/plyr.js
vendored
@ -5773,7 +5773,7 @@ var vimeo = {
|
||||
setAspectRatio: function setAspectRatio(input) {
|
||||
var ratio = utils.is.string(input) ? input.split(':') : this.config.ratio.split(':');
|
||||
var padding = 100 / ratio[0] * ratio[1];
|
||||
var height = 200;
|
||||
var height = 240;
|
||||
var offset = (height - padding) / (height / 50);
|
||||
this.elements.wrapper.style.paddingBottom = padding + '%';
|
||||
this.media.style.transform = 'translateY(-' + offset + '%)';
|
||||
|
2
dist/plyr.js.map
vendored
2
dist/plyr.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/plyr.min.js
vendored
2
dist/plyr.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/plyr.min.js.map
vendored
2
dist/plyr.min.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/plyr.polyfilled.js
vendored
2
dist/plyr.polyfilled.js
vendored
@ -11671,7 +11671,7 @@ var vimeo = {
|
||||
setAspectRatio: function setAspectRatio(input) {
|
||||
var ratio = utils.is.string(input) ? input.split(':') : this.config.ratio.split(':');
|
||||
var padding = 100 / ratio[0] * ratio[1];
|
||||
var height = 200;
|
||||
var height = 240;
|
||||
var offset = (height - padding) / (height / 50);
|
||||
this.elements.wrapper.style.paddingBottom = padding + '%';
|
||||
this.media.style.transform = 'translateY(-' + offset + '%)';
|
||||
|
2
dist/plyr.polyfilled.js.map
vendored
2
dist/plyr.polyfilled.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/plyr.polyfilled.min.js
vendored
2
dist/plyr.polyfilled.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/plyr.polyfilled.min.js.map
vendored
2
dist/plyr.polyfilled.min.js.map
vendored
File diff suppressed because one or more lines are too long
@ -34,7 +34,7 @@ const vimeo = {
|
||||
setAspectRatio(input) {
|
||||
const ratio = utils.is.string(input) ? input.split(':') : this.config.ratio.split(':');
|
||||
const padding = 100 / ratio[0] * ratio[1];
|
||||
const height = 200;
|
||||
const height = 240;
|
||||
const offset = (height - padding) / (height / 50);
|
||||
this.elements.wrapper.style.paddingBottom = `${padding}%`;
|
||||
this.media.style.transform = `translateY(-${offset}%)`;
|
||||
|
@ -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);
|
||||
$height: 200;
|
||||
$height: 240;
|
||||
$offset: to-percentage(($height - $padding) / ($height / 50));
|
||||
|
||||
height: 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user