Preview seek: fix: allow absolute thumbnail paths
This commit is contained in:
parent
4c3bf25b8a
commit
11fed8d1b5
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user