Set download URL via setter

This commit is contained in:
Sam Potts
2019-04-12 19:00:17 +10:00
parent e281078441
commit cdacae6697
4 changed files with 20 additions and 7 deletions

View File

@ -48,14 +48,14 @@ const vimeo = {
// Set intial ratio
setAspectRatio.call(this);
// Load the API if not already
// Load the SDK if not already
if (!is.object(window.Vimeo)) {
loadScript(this.config.urls.vimeo.sdk)
.then(() => {
vimeo.ready.call(this);
})
.catch(error => {
this.debug.warn('Vimeo API failed to load', error);
this.debug.warn('Vimeo SDK (player.js) failed to load', error);
});
} else {
vimeo.ready.call(this);
@ -259,7 +259,7 @@ const vimeo = {
.getVideoUrl()
.then(value => {
currentSrc = value;
controls.setDownloadLink.call(player);
controls.setDownloadUrl.call(player);
})
.catch(error => {
this.debug.warn(error);