vidstack / player

UI components and hooks for building video/audio players on the web. Robust, customizable, and accessible. Modern alternative to JW Player and Video.js.
https://vidstack.io
MIT License
2.31k stars 135 forks source link

Cast subtitles #1486

Open sanjayws opened 3 weeks ago

sanjayws commented 3 weeks ago

Hello, thank you devs for this fantastic product!

Can i know where i can find documentation or someone can guide me into how to send captions when i chromecast?

Currently, all captions are automatically set by the player (good thing) using HLS but it won't show up in casting.

TIA Sanjay

Bennycopter commented 2 days ago

Hi Sanjay,

The subtitles need to be listed in the .m3u8 file. Check to see if the .m3u8 file you're loading has subtitles listed.

If you're using BunnyCDN, you should know that they do not include subtitles in the .m3u8 file (at least last time I checked). I'm using BunnyCDN and had to generate my own .m3u8 files to get subtitles to show up while casting. For an example of what the .m3u8 files should look like for Vidstack and casting, you can inspect the network traffic on my site here: https://cijapanese.com/video/1 (filter by "m3u8" and "subtitles.vtt")

-Ben