Set download URL via setter
This commit is contained in:
@ -823,6 +823,19 @@ class Plyr {
|
||||
return is.url(download) ? download : this.source;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
|
Reference in New Issue
Block a user