diff options
author | Sam Potts <sam@potts.es> | 2018-07-26 00:03:10 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-26 00:03:10 +1000 |
commit | 71578e07ec81f5f3cf3fb3faecd92ab9c7df001f (patch) | |
tree | a3ed67d2e9d22b2c3b98a3ffcf06ead0cdf81697 /src/js/plyr.js | |
parent | 544ab0086b06a1625c474b35c1f100d4a582a98a (diff) | |
parent | 671325dd176c8a6c04a180a5a61a823e3a822c08 (diff) | |
download | plyr-71578e07ec81f5f3cf3fb3faecd92ab9c7df001f.tar.lz plyr-71578e07ec81f5f3cf3fb3faecd92ab9c7df001f.tar.xz plyr-71578e07ec81f5f3cf3fb3faecd92ab9c7df001f.zip |
Merge pull request #1120 from didacte/add-missing-youtube-hl-param
Add support for YouTube's hl param
Diffstat (limited to 'src/js/plyr.js')
-rw-r--r-- | src/js/plyr.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/js/plyr.js b/src/js/plyr.js index 0f27b750..6d321112 100644 --- a/src/js/plyr.js +++ b/src/js/plyr.js @@ -171,7 +171,7 @@ class Plyr { this.elements.container.className = ''; // Get attributes from URL and set config - if (url.searchParams.length) { + if (url.search.length) { const truthy = ['1', 'true']; if (truthy.includes(url.searchParams.get('autoplay'))) { @@ -185,6 +185,7 @@ class Plyr { // YouTube requires the playsinline in the URL if (this.isYouTube) { this.config.playsinline = truthy.includes(url.searchParams.get('playsinline')); + this.config.hl = url.searchParams.get('hl'); } else { this.config.playsinline = true; } |