Captions
This example shows how to register and use subtitles without conversion.
OvenPlayer supports webVTT, SRT, and SMI subtitles, so you can register and use subtitles without conversion. If you want to know more details, please refer to the Captions API chapter.
1
let player = OvenPlayer.create("player", {sources : {
2
type : "mp4",
3
file : "https://path.to/your_video",
4
label : "360P"
5
],
6
tracks : [
7
{
8
kind : "captions",
9
file : "https://path.to/your_caption.vtt",
10
label : "KO vtt"
11
},
12
{
13
kind : "captions",
14
file : "https://path.to/your_caption.srt",
15
label : "KO srt"
16
},
17
{
18
kind : "captions",
19
file : "https://path.to/your_caption.smi",
20
label : "KO smi"
21
}
22
]
23
});
Copied!
Last modified 4mo ago
Copy link