我有一个html视频元素,我以VTTCues的形式向其添加TextTrack和添加字幕:
let video = this.$refs.video as HTMLVideoElement;
let track = video.addTextTrack('captions', 'English', 'en');
let cue = new VTTCue(0, 100, 'example subtitle');
//modify some of the cue's properties
cue.align = 'ce