861 B
861 B
Title | Type |
---|---|
Subtitles | Document |
import {Prism} from "@astrojs/prism" import {Zorn} from "@minpluto/zorn"
To apply subtitles to the video player, add a slot for tracks and insert HTML5 textTracks
. Make sure to set the label
and srclang
.
<Prism lang="jsx" code={<Zorn Subtitles> <slot slot="subtitles"> <track kind="subtitles" src="/subtitles/English.vtt" label="English" srclang="en" /> <track kind="subtitles" src="/subtitles/Russian.vtt" label="Russian" srclang="ru" /> </slot> </Zorn>
}/>
When the Subtitles
option is enabled, a subtitles button will appear automatically in the control on the right side and a menu will be generated for you.