Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CEA 608 Captions #6941

Open
TetrisSQC opened this issue Jun 29, 2024 · 7 comments
Open

CEA 608 Captions #6941

TetrisSQC opened this issue Jun 29, 2024 · 7 comments
Labels
status: waiting on response Waiting on a response from the reporter(s) of the issue type: question A question from the community

Comments

@TetrisSQC
Copy link

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

@TetrisSQC TetrisSQC added the type: question A question from the community label Jun 29, 2024
@avelad
Copy link
Collaborator

avelad commented Jun 29, 2024

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.

@avelad avelad added the status: waiting on response Waiting on a response from the reporter(s) of the issue label Jun 29, 2024
@TetrisSQC
Copy link
Author

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

@shaka-bot shaka-bot removed the status: waiting on response Waiting on a response from the reporter(s) of the issue label Jun 29, 2024
@avelad
Copy link
Collaborator

avelad commented Jul 1, 2024

Your stream shows a static screen (I think in German) and the subtitles are always empty.
videoframe_7221 056

@avelad avelad added the status: waiting on response Waiting on a response from the reporter(s) of the issue label Jul 1, 2024
@TetrisSQC
Copy link
Author

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.

@avelad
Copy link
Collaborator

avelad commented Jul 1, 2024

I gave it another chance and in the Shaka Demo the subtitles are shown:

Grabacion.de.pantalla.2024-07-01.a.las.9.02.38.mov

@avelad
Copy link
Collaborator

avelad commented Jul 1, 2024

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.

@shaka-bot shaka-bot removed the status: waiting on response Waiting on a response from the reporter(s) of the issue label Jul 1, 2024
@avelad avelad added the status: waiting on response Waiting on a response from the reporter(s) of the issue label Jul 1, 2024
@TetrisSQC
Copy link
Author

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. 

@shaka-bot shaka-bot removed the status: waiting on response Waiting on a response from the reporter(s) of the issue label Jul 1, 2024
@avelad avelad added the status: waiting on response Waiting on a response from the reporter(s) of the issue label Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting on response Waiting on a response from the reporter(s) of the issue type: question A question from the community
Projects
None yet
Development

No branches or pull requests

3 participants