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/plyr.js | |
parent | 7f079e0ec3abbc9909807a1d9da60e18099a48f0 (diff) | |
download | plyr-119b471b84f8e2a25c61a09c0905d429a475407d.tar.lz plyr-119b471b84f8e2a25c61a09c0905d429a475407d.tar.xz plyr-119b471b84f8e2a25c61a09c0905d429a475407d.zip |
More bug fixes
Diffstat (limited to 'src/js/plyr.js')
-rw-r--r-- | src/js/plyr.js | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/js/plyr.js b/src/js/plyr.js index 3de94143..4a46722b 100644 --- a/src/js/plyr.js +++ b/src/js/plyr.js @@ -185,12 +185,17 @@ class Plyr { if (truthy.includes(params.autoplay)) { this.config.autoplay = true; } - if (truthy.includes(params.playsinline)) { - this.config.inline = true; - } if (truthy.includes(params.loop)) { this.config.loop.active = true; } + + // TODO: replace fullscreen.iosNative with this playsinline config option + // YouTube requires the playsinline in the URL + if (this.isYouTube) { + this.config.playsinline = truthy.includes(params.playsinline); + } else { + this.config.playsinline = true; + } } } else { // <div> with attributes @@ -224,7 +229,7 @@ class Plyr { this.config.autoplay = true; } if (this.media.hasAttribute('playsinline')) { - this.config.inline = true; + this.config.playsinline = true; } if (this.media.hasAttribute('muted')) { this.config.muted = true; @@ -241,7 +246,7 @@ class Plyr { } // Check for support again but with type - this.supported = support.check(this.type, this.provider, this.config.inline); + this.supported = support.check(this.type, this.provider, this.config.playsinline); // If no support for even API, bail if (!this.supported.api) { |