I am struggling to show closed captions using React Player whilst playing an HLS stream, I looked everywhere and I only see how to add subtitles from files. The stream already has closed captions embedded, I need to show them.
In the browser, I can right-click and "Show All Controls" to access the player menu, the closed captions are there, but how to do it programmatically?
<ReactPlayer
ref={player}
playing={true}
volume={0.800}
speed={1}
loop={true}
url={streamURL}
muted={muted}
width="800px"
height="500px"
config={{
file: {
forceHLS: true,
hlsOptions: {
enableCEA708Captions: true,
enableWebVTT: true,
},
attributes: {
preload: "auto",
},
}
}}
/>