diff options
author | Sam Potts <sam@potts.es> | 2018-04-17 23:51:23 +1000 |
---|---|---|
committer | Sam Potts <sam@potts.es> | 2018-04-17 23:51:23 +1000 |
commit | 119b471b84f8e2a25c61a09c0905d429a475407d (patch) | |
tree | 5c64c7d6b00ab4213d9865d3549771728850911f /src/js/plugins/vimeo.js | |
parent | 7f079e0ec3abbc9909807a1d9da60e18099a48f0 (diff) | |
download | plyr-119b471b84f8e2a25c61a09c0905d429a475407d.tar.lz plyr-119b471b84f8e2a25c61a09c0905d429a475407d.tar.xz plyr-119b471b84f8e2a25c61a09c0905d429a475407d.zip |
More bug fixes
Diffstat (limited to 'src/js/plugins/vimeo.js')
-rw-r--r-- | src/js/plugins/vimeo.js | 16 |
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(() => { |