aboutsummaryrefslogtreecommitdiffstats
path: root/src/js
diff options
context:
space:
mode:
authorYour Name <you@example.com>2019-02-27 15:43:36 +0100
committerYour Name <you@example.com>2019-02-27 15:43:36 +0100
commit11fed8d1b5ec9bfcbeafa0a90ebbc0ac15711807 (patch)
tree73052fc1848365a450936cde633f9272637a2827 /src/js
parent4c3bf25b8a6228b8b48a28f351df1ae2523e6d19 (diff)
downloadplyr-11fed8d1b5ec9bfcbeafa0a90ebbc0ac15711807.tar.lz
plyr-11fed8d1b5ec9bfcbeafa0a90ebbc0ac15711807.tar.xz
plyr-11fed8d1b5ec9bfcbeafa0a90ebbc0ac15711807.zip
Preview seek: fix: allow absolute thumbnail paths
Diffstat (limited to 'src/js')
-rw-r--r--src/js/plugins/previewThumbnails.js5
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);
}