diff options
author | Sam Potts <sam@selz.com> | 2017-04-25 12:37:43 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-25 12:37:43 +1000 |
commit | 396b816a1f0cd4e1a7b1ecf5fd5523d47562ab89 (patch) | |
tree | 238bc4769474f4c9329dd9136fed1ab0050d9473 /src/js | |
parent | bbe4b7e565f6fd8acc946065934bdeae8d0dfc0e (diff) | |
parent | 0a58cbfd59de14825ef894a1943651a66e8639a6 (diff) | |
download | plyr-396b816a1f0cd4e1a7b1ecf5fd5523d47562ab89.tar.lz plyr-396b816a1f0cd4e1a7b1ecf5fd5523d47562ab89.tar.xz plyr-396b816a1f0cd4e1a7b1ecf5fd5523d47562ab89.zip |
Merge pull request #563 from stormrockwell/master
removed vimeo id parsing because it is not necessary
Diffstat (limited to 'src/js')
-rw-r--r-- | src/js/plyr.js | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/src/js/plyr.js b/src/js/plyr.js index 55bdd252..92c5175d 100644 --- a/src/js/plyr.js +++ b/src/js/plyr.js @@ -775,12 +775,6 @@ return (url.match(regex)) ? RegExp.$2 : url; } - // Parse Vimeo ID from url - function parseVimeoId(url) { - var regex = /^.*(vimeo.com\/|video\/)(\d+).*/; - return (url.match(regex)) ? RegExp.$2 : url; - } - // Fullscreen API var fullscreen = (function() { // Determine the prefix @@ -2490,10 +2484,6 @@ mediaId = parseYouTubeId(player.embedId); break; - case 'vimeo': - mediaId = parseVimeoId(player.embedId); - break; - default: mediaId = player.embedId; } @@ -2788,13 +2778,13 @@ function vimeoReady(mediaId, container) { // Setup instance // https://github.com/vimeo/player.js - player.embed = new window.Vimeo.Player(container, { - id: parseInt(mediaId), - loop: config.loop.active, - autoplay: config.autoplay, - byline: false, - portrait: false, - title: false + plyr.embed = new window.Vimeo.Player(container, { + id: mediaId, + loop: config.loop, + autoplay: config.autoplay, + byline: false, + portrait: false, + title: false }); // Create a faux HTML5 API using the Vimeo API |