videojs-vtt-thumbnails icon indicating copy to clipboard operation
videojs-vtt-thumbnails copied to clipboard

Fixed some bugs

Open olee opened this issue 9 years ago • 7 comments
trafficstars

  • Fixed loading issue where player was not ready.
  • Fixed loading of thumbnails to be relative to the video file.

olee avatar Oct 06 '16 08:10 olee

@dirkjanm did you get a chance to take a look at the changes?

olee avatar Oct 13 '16 07:10 olee

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?

dirkjanm avatar Oct 16 '16 09:10 dirkjanm

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. For me the current solution is enough and I think it's at least better than the state of it before, but maybe you could try adding a correct path resolution after merging those first fixes (checking for absolute http://... paths).

olee avatar Oct 16 '16 10:10 olee

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?

dirkjanm avatar Oct 16 '16 16:10 dirkjanm

Oh yeah it was relative to the vtt file not the video file. Then the code should be changed to reflect that. I will try to fix the PR the next days.

A basepath setting sounds good, but it would still not meet the specs which say it should always be relative (except if absolute url)

olee avatar Oct 16 '16 16:10 olee

@olee @dirkjanm Did either of you have videojs-vtt-thumbnails working with videojs 5? We have videojs 5.16.0 but we always get an exception stating: Uncaught TypeError: Cannot read property 'progressControl' of undefined progressControl = player.controlBar.progressControl; Please advise...

richardbushell avatar Feb 06 '17 18:02 richardbushell

I just fixed our branch at https://github.com/247GradLabs/videojs-vtt-thumbnails to work with videojs 5

olee avatar Oct 19 '17 10:10 olee