简体   繁体   中英

Show captions in HLS.JS player

I am trying to turn on captions (*.ts format) in HLS.JS, but I can't found out how. Here is hls.js player's official demo website: https://video-dev.github.io/hls.js/demo/ There is video with CC (Closed Captions) named: "CNN special report, with CC". It is playing, but not showing CC. There is some sort of controls beneath, but nothing about subtitles/cc. I checked in Dev mode: hls.subtitleTracks = []

However, if I load this video into VLC player or *.ts chunks, then I can turn on subtitles within VLC player.

Please, tell me how to turn on Closed Captions on that website or through the code?

Omg, I found it. I should have just hover on player's UI and find three small dots in right bottom corner. There is control for Captions. Hope somebody will save time on this.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM