diff options
| author | Samantaz Fox <coding@samantaz.fr> | 2024-08-22 00:29:15 +0200 |
|---|---|---|
| committer | Samantaz Fox <coding@samantaz.fr> | 2024-08-22 00:29:15 +0200 |
| commit | 21ab5dc6680da3df62feed14c00104754f2479a4 (patch) | |
| tree | d7ad9ee5f14bfbe82153e3f13d9066e1197b8849 /src | |
| parent | 764965c441a789e0be417648716f575067d9201e (diff) | |
| download | invidious-21ab5dc6680da3df62feed14c00104754f2479a4.tar.gz invidious-21ab5dc6680da3df62feed14c00104754f2479a4.tar.bz2 invidious-21ab5dc6680da3df62feed14c00104754f2479a4.zip | |
Storyboard: Revert cue timing "fix"
Diffstat (limited to 'src')
| -rw-r--r-- | src/invidious/routes/api/v1/videos.cr | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/invidious/routes/api/v1/videos.cr b/src/invidious/routes/api/v1/videos.cr index ab03df01..c077b85e 100644 --- a/src/invidious/routes/api/v1/videos.cr +++ b/src/invidious/routes/api/v1/videos.cr @@ -218,11 +218,11 @@ module Invidious::Routes::API::V1::Videos template_path = sb.proxied_url.path # Initialize cue timing variables - # NOTE: videojs-vtt-thumbnails gets lost when the start and end times are not 0:00:000.000 - # TODO: Use proper end time when videojs-vtt-thumbnails is fixed + # NOTE: videojs-vtt-thumbnails gets lost when the cue times don't overlap + # (i.e: if cue[n] end time is 1:06:25.000, cue[n+1] start time should be 1:06:25.000) time_delta = sb.interval.milliseconds start_time = 0.milliseconds - end_time = 0.milliseconds # time_delta - 1.milliseconds + end_time = time_delta # Build a VTT file for VideoJS-vtt plugin vtt_file = WebVTT.build do |vtt| @@ -237,9 +237,8 @@ module Invidious::Routes::API::V1::Videos vtt.cue(start_time, end_time, work_url.to_s) - # TODO: uncomment these when videojs-vtt-thumbnails is fixed - # start_time += time_delta - # end_time += time_delta + start_time += time_delta + end_time += time_delta end end end |
