aboutsummaryrefslogtreecommitdiffstats
path: root/src/js/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/js/plugins')
-rw-r--r--src/js/plugins/vimeo.js16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/js/plugins/vimeo.js b/src/js/plugins/vimeo.js
index 3aac5b2d..a250d096 100644
--- a/src/js/plugins/vimeo.js
+++ b/src/js/plugins/vimeo.js
@@ -35,10 +35,14 @@ 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 = 240;
- const offset = (height - padding) / (height / 50);
this.elements.wrapper.style.paddingBottom = `${padding}%`;
- this.media.style.transform = `translateY(-${offset}%)`;
+
+ if (this.supported.ui) {
+ const height = 240;
+ const offset = (height - padding) / (height / 50);
+
+ this.media.style.transform = `translateY(-${offset}%)`;
+ }
},
// API Ready
@@ -55,6 +59,7 @@ const vimeo = {
speed: true,
transparent: 0,
gesture: 'media',
+ playsinline: !this.config.fullscreen.iosNative,
};
const params = utils.buildUrlParams(options);
@@ -88,6 +93,11 @@ const vimeo = {
player.media.paused = true;
player.media.currentTime = 0;
+ // Disable native text track rendering
+ if (player.supported.ui) {
+ player.embed.disableTextTrack();
+ }
+
// Create a faux HTML5 API using the Vimeo API
player.media.play = () => {
player.embed.play().then(() => {