diff options
author | Your Name <you@example.com> | 2019-02-27 15:43:36 +0100 |
---|---|---|
committer | Your Name <you@example.com> | 2019-02-27 15:43:36 +0100 |
commit | 11fed8d1b5ec9bfcbeafa0a90ebbc0ac15711807 (patch) | |
tree | 73052fc1848365a450936cde633f9272637a2827 /src/js/plugins/previewThumbnails.js | |
parent | 4c3bf25b8a6228b8b48a28f351df1ae2523e6d19 (diff) | |
download | plyr-11fed8d1b5ec9bfcbeafa0a90ebbc0ac15711807.tar.lz plyr-11fed8d1b5ec9bfcbeafa0a90ebbc0ac15711807.tar.xz plyr-11fed8d1b5ec9bfcbeafa0a90ebbc0ac15711807.zip |
Preview seek: fix: allow absolute thumbnail paths
Diffstat (limited to 'src/js/plugins/previewThumbnails.js')
-rw-r--r-- | src/js/plugins/previewThumbnails.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/js/plugins/previewThumbnails.js b/src/js/plugins/previewThumbnails.js index bd7a6bbd..90e6226d 100644 --- a/src/js/plugins/previewThumbnails.js +++ b/src/js/plugins/previewThumbnails.js @@ -148,7 +148,10 @@ class PreviewThumbnails { // If the URLs don't start with '/', then we need to set their relative path to be the location of the VTT file // If the URLs do start with '/', then they obviously don't need a prefix, so it will remain blank - if (!thumbnail.frames[0].text.startsWith('/')) { + // If the thumbnail URLs start with with none of '/', 'http://' or 'https://', then we need to set their relative path to be the location of the VTT file + if (!thumbnail.frames[0].text.startsWith('/') && + !thumbnail.frames[0].text.startsWith('http://') && + !thumbnail.frames[0].text.startsWith('https://')) { thumbnail.urlPrefix = url.substring(0, url.lastIndexOf('/') + 1); } |