Conversation
olee
commented
Oct 6, 2016
- Fixed loading issue where player was not ready.
- Fixed loading of thumbnails to be relative to the video file.
Fixed loading of thumbnails to be relative to the video file.
|
@dirkjanm did you get a chance to take a look at the changes? |
|
Thanks for the pull request! The changes look good, just the one with the relative thumbnails is a bit odd, since I would normally expect an URL starting with a / to be relative to the domain instead of the video source. Adding this as default behaviour can be confusing for people. Would it maybe be better to add an option instead called for example relativeUrls, which will cause URLs to be loaded relative to the video, and if this option is not set (default) to leave the URL parsing up to the browser? |
|
If you read this article it will actually tell you, that urls in vtt files should always be relative to the video file. That's why I used a kind of solution that allows both. But actually it should always be relative except if the url is absolute. |
|
Actually the article you are linking to says that the URLs are relative to the VTT file, not to the video file. And an URL starting with an / would point to the root of the domain and not to the current folder in the case of JW player. Note that there is already a setting that allows you to set a basepath which is used as a prefix for all thumbnails, wouldn't that suit your needs already? |
|
Oh yeah it was relative to the vtt file not the video file. A basepath setting sounds good, but it would still not meet the specs which say it should always be relative (except if absolute url) |
|
I just fixed our branch at https://github.com/247GradLabs/videojs-vtt-thumbnails to work with videojs 5 |