Open noisecapella opened 3 years ago
I've been discussing this with @annagav and there are a couple of issues here. First of all, in ocw-hugo-themes
the youtube
shortcode expects the third parameter to be a direct link to the location of the subtitles, referred to as subtitlesLocation
. To be compatible with the way ocw-studio
will generate content, I think we should reference the VTT file by UUID. A problem with that is that currently VTT files have an invalid UUID which is the UUID of the SRT file prefixed with vtt
.
So, to solve this really 3 things should be done:
ocw-data-parser
so they are valid UUID's (https://github.com/mitodl/ocw-data-parser/issues/157)ocw-to-hugo
's writing of video_captions_file
to output a UUID that is in line with the way ocw-studio
writes out UUID's linked by a relation widget. The video.html
partial will also have to be adjusted to fetch the file_location
of the UUID passed in.youtube
shortcode to accept a UUID as the 3rd parameter instead of a direct link to a subtitle file, looking up the subtitle resource by UUID and passing file_location
to the youtube_player.html
partialI think that makes sense in general, though it would be good for the UUID generated for the vtt file to be the same UUID for a given file so that we can run ocw-to-hugo repeatedly and get the same output
So something I missed here that @abeglova and @mbertrand filled me in on this morning is that there is already a strategy in place here for handling VTT subtitles in ocw-studio
directly on the video_metadata
property of a video resource.
Instead of creating a resource specifically for the VTT file, we should simply write a relative path directly to the file into this field. Since we won't be using the VTT files as resources in ocw-studio
, I'm not sure that https://github.com/mitodl/ocw-data-parser/issues/157 needs to be worked on, although it would be better if all resources coming from the legacy had a valid UUID.
https://ocwnext.odl.mit.edu/courses/3-091sc-introduction-to-solid-state-chemistry-fall-2010/pages/reactions-and-kinetics/23-reaction-rates/
If you scroll down to "Lecture Video" and play the video, the closed captions don't display. The
<track />
element does exist but the URL goes to a 404. The equivalent page on the legacy site has working closed captions https://ocw.mit.edu/courses/materials-science-and-engineering/3-091sc-introduction-to-solid-state-chemistry-fall-2010/reactions-and-kinetics/23-reaction-rates/I think part of the problem is that the URL is still pointing to the legacy site but it has a
.vtt
extension. I think those should be S3 links but it's been a little while since I worked on that code