Allow custom download URL (for streaming, etc)

This commit is contained in:
Sam Potts
2018-10-24 22:31:35 +11:00
parent ebaded66b4
commit 03c9b53232
5 changed files with 29 additions and 12 deletions

View File

@ -788,6 +788,15 @@ class Plyr {
return this.media.currentSrc;
}
/**
* Get a download URL (either source or custom)
*/
get download() {
const { download } = this.config.urls;
return is.url(download) ? download : this.source;
}
/**
* Set the poster image for a video
* @param {input} - the URL for the new poster image