aboutsummaryrefslogtreecommitdiffstats
path: root/src/js/plyr.js
diff options
context:
space:
mode:
authorSam Potts <sam@potts.es>2019-04-12 19:00:17 +1000
committerSam Potts <sam@potts.es>2019-04-12 19:00:17 +1000
commitcdacae669786a76d821e828573f996b97ec4df9e (patch)
tree3a50125db0ecca93ae51647e12e85d8c9e73e38b /src/js/plyr.js
parente281078441ad50c4b0b997b615b48fc0c254f173 (diff)
downloadplyr-cdacae669786a76d821e828573f996b97ec4df9e.tar.lz
plyr-cdacae669786a76d821e828573f996b97ec4df9e.tar.xz
plyr-cdacae669786a76d821e828573f996b97ec4df9e.zip
Set download URL via setter
Diffstat (limited to 'src/js/plyr.js')
-rw-r--r--src/js/plyr.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/js/plyr.js b/src/js/plyr.js
index 1dd3ecb9..0a804437 100644
--- a/src/js/plyr.js
+++ b/src/js/plyr.js
@@ -824,6 +824,19 @@ class Plyr {
}
/**
+ * Set the download URL
+ */
+ set download(input) {
+ if (!is.url(input)) {
+ return;
+ }
+
+ this.config.urls.download = input;
+
+ controls.setDownloadUrl.call(this);
+ }
+
+ /**
* Set the poster image for a video
* @param {String} input - the URL for the new poster image
*/