Open ibrahimjaved12 opened 1 year ago
Thanks for explaining all this Ibrahim. We had decided some time ago to use only Web VTT captions (but not everyone was aware of that).
Where have you come across .srt captions?
Thanks for explaining all this Ibrahim. We had decided some time ago to use only Web VTT captions (but not everyone was aware of that).
Where have you come across .srt captions?
Thanks Peter. Do you mean the source of that?
I was locally running Introduction to Solid Chemistry course. It appears that this error (Text Track parsing errors)
comes only because of .srt captions, so that's how I came across it. Plus captions not working for same video on RC/Prod suggested same.
I'm not sure of other such courses as I was randomly testing this one.
@ibrahimjaved12 can this be closed now, since we have re-imported the VTT captions for https://ocw.mit.edu/courses/3-091-introduction-to-solid-state-chemistry-fall-2018/ as part of https://github.com/mitodl/ocw-studio/issues/1518 ?
@ibrahimjaved12 can this be closed now, since we have re-imported the VTT captions for https://ocw.mit.edu/courses/3-091-introduction-to-solid-state-chemistry-fall-2018/ as part of mitodl/ocw-studio#1518 ?
@pdpinch The course has to be republished in order for captions to be loaded. So even though the fix for this has been done, but we still do not have the text tracks yet: https://ocw.mit.edu/courses/3-091-introduction-to-solid-state-chemistry-fall-2018/resources/lecture-2/ https://live-qa.ocw.mit.edu/courses/3-091-introduction-to-solid-state-chemistry-fall-2018/resources/lecture-2/ This is Carey's comment about it: https://github.com/mitodl/hq/discussions/1505#discussioncomment-5972417
So technically we're not done with the issue until someone republishes the course. I believe this should be closed once we have this up and running in production.
Steps to Reproduce
Open this link: https://draft-qa.ocw.mit.edu/courses/test-site/resources/tiny-video/ Go to inspect element and observe the error:
Text Track parsing errors for /courses/test-site/tiny-video_captions.srt
To locally reproduce it (make sure to allow CORS first):
OCW_TEST_COURSE=3.091-fall-2018
yarn start course
Have not been able to locally get no icon yet
For the same course video, in both draft and live, we have a missing button for captions on the videojs player + the error
Links: https://live-qa.ocw.mit.edu/courses/3-091-introduction-to-solid-state-chemistry-fall-2018/resources/lecture-2/ https://draft-qa.ocw.mit.edu/courses/3-091-introduction-to-solid-state-chemistry-fall-2018/resources/lecture-2/
Expected Behavior
Actual Behavior
Some Information
In the first link above, we just have the error, but the icon on the videojs player for captions does appear. But in the other video mentioned after it, we have the error + captions icon is also not appearing. Might be related or unrelated. Not sure
(This is untested but should help) It appears that the error appears for .srt files as they are not supported by videojs. Videojs supports .vtt file. The .srt worked on videojs for upto 4.11 version, and we are using the ^7.11.8 version.
So an option would be to use an older version. And another option would be to convert .srt files to .vtt, which there could be different ways to achieve this, one of which could be to use converters, or if it's not too complicated could be written a script to achieve this.
According to a stackoverflow answer: Would have to add the WEBVTT header in the top, and change
,
to.
(comma to dots in time frames):to:
Screenshot or Screencast