Closed TetrisSQC closed 2 months ago
The content you are using on your page does not have CEA-608 (https://storage.googleapis.com/shaka-demo-assets/angel-one/dash_chaining.mpd), which is why it does not show them.
Thanks, for your quick response I was not aware that this stream did not had any caption available. This one has, and works fine in the example player, but not on my one: https://mcdn.daserste.de/daserste/de/master.m3u8
Christian
Your stream shows a static screen (I think in German) and the subtitles are always empty.
Yes, this particular channel is region blocked. I will try to find a non blocked stream besides this it does not work with every stream and I have no idea what is missing in the code.
I gave it another chance and in the Shaka Demo the subtitles are shown:
https://github.com/shaka-project/shaka-player/assets/8983024/8f6d718f-d816-45b5-96fb-d08f025b5737
I see that in your file you use plyr, in its documentation I have seen: https://github.com/sampotts/plyr?tab=readme-ov-file#captions
This is an interoperability problem between Shaka and this way of managing subtitles.
You are right it is most likely an issue with plyr, when I add this: } function updateSubtitles() { const tracks = player.getTextTracks();
const subtitles = tracks.map(track => ({
kind: 'captions',
label: track.label,
srclang: track.language,
src: 'data:text/vtt;base64,',
}));
plyrPlayer.source = {
...plyrPlayer.source,
tracks: subtitles,
};
const activeTrack = tracks.find(track => track.active);
if (activeTrack) {
plyrPlayer.currentTrack = subtitles.findIndex(sub => sub.srclang === activeTrack.language);
}
} and execute the function when loadeddata is triggered, I get the caption stream also listed, but this does not explain why there is always Shaka Player TextTrack which does nothing.
Closing due to inactivity. If this is still an issue for you or if you have further questions, the OP can ask shaka-bot to reopen it by including @shaka-bot reopen
in a comment.
Have you read the Tutorials? yes
Have you read the FAQ and checked for duplicate open issues? yes
What version of Shaka Player are you using? 4.9.10
What browser and OS are you using? MacOS
Please ask your question
Hello, I would like to play subtitles with Shaka (CEA-608), but this does not seem to work. I just can't find my error, because the demo application at http://shaka-player-demo.appspot.com shows them. Please find attached my example implementation, maybe someone can kindly give me a hint what I have forgotten?
Regards, Christian
plyr.html.zip