learning-area
learning-area copied to clipboard
Subtitles do not show in local environment
In this practice(I downloaded the code from here and worked on it locally), I did the same thing locally and in the interactive editor, but the exact same code below works only in the interactive editor in tutorial pages in terms of displaying the captions/subtitles.
My code is as below:
<video controls
src="media/video.mp4" type="video/mp4"
src="media/video.webm" type="video/webm"
height="240px"
width="320px"
muted
>
<track kind="subtitles" src="media/subtitles_en.vtt" srclang="en" label="English">
<p>A small white rabbit model.</p>
</video>
I don't see that the interactive editor is very different from my local editor, but the .vtt
file could be the cause. Would you kindly check on this one?
The subtitles are loaded via file:///
when working locally. This could be a security risk and was fixed in Bugzilla 1558299. Therefore to make subtitles work locally you have to set security.fileuri.strict_origin_policy
to false
in about:config