diff options
author | Sam Potts <sam@potts.es> | 2020-02-10 18:34:05 +0000 |
---|---|---|
committer | Sam Potts <sam@potts.es> | 2020-02-10 18:34:05 +0000 |
commit | 1619510dcf9e3ccc1693caa20a173aaf2789e346 (patch) | |
tree | 900d8a12a10ded90a058600ad459d3ed048c3ad1 /src/js/plugins/vimeo.js | |
parent | ff8dedd4ec2235131a630635ec7927c75d0a3c16 (diff) | |
download | plyr-1619510dcf9e3ccc1693caa20a173aaf2789e346.tar.lz plyr-1619510dcf9e3ccc1693caa20a173aaf2789e346.tar.xz plyr-1619510dcf9e3ccc1693caa20a173aaf2789e346.zip |
Speed settings logic improvements
Diffstat (limited to 'src/js/plugins/vimeo.js')
-rw-r--r-- | src/js/plugins/vimeo.js | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/js/plugins/vimeo.js b/src/js/plugins/vimeo.js index 7d796858..fa965d8e 100644 --- a/src/js/plugins/vimeo.js +++ b/src/js/plugins/vimeo.js @@ -42,23 +42,28 @@ function assurePlaybackState(play) { const vimeo = { setup() { + const player = this; + // Add embed class for responsive - toggleClass(this.elements.wrapper, this.config.classNames.embed, true); + toggleClass(player.elements.wrapper, player.config.classNames.embed, true); + + // Set speed options from config + player.options.speed = player.config.speed.options; // Set intial ratio - setAspectRatio.call(this); + setAspectRatio.call(player); // Load the SDK if not already if (!is.object(window.Vimeo)) { - loadScript(this.config.urls.vimeo.sdk) + loadScript(player.config.urls.vimeo.sdk) .then(() => { - vimeo.ready.call(this); + vimeo.ready.call(player); }) .catch(error => { - this.debug.warn('Vimeo SDK (player.js) failed to load', error); + player.debug.warn('Vimeo SDK (player.js) failed to load', error); }); } else { - vimeo.ready.call(this); + vimeo.ready.call(player); } }, |