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

(HLS) Labelling of captions and subtitles in Safari #6233

Closed
dave-nicholas opened this issue Feb 7, 2024 · 6 comments · Fixed by #6426
Closed

(HLS) Labelling of captions and subtitles in Safari #6233

dave-nicholas opened this issue Feb 7, 2024 · 6 comments · Fixed by #6426
Assignees
Labels
browser: Safari Issues affecting Safari or WebKit derivatives component: HLS The issue involves Apple's HLS manifest format priority: P2 Smaller impact or easy workaround status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Milestone

Comments

@dave-nicholas
Copy link
Contributor

We have noticed that Safari will label the kind of the track as 'captions' if CHARACTERISTICS are present.
In shaka we then will assign labels based on the kind of the track.

I am wandering what would be the best approach to solving this issue, as we don't want to be surfacing the wrong information.
Happy to to do the work for the implementation for whatever is agreed.

The following vtt track will be labelled by shaka as CLOSED_CAPTION_MIMETYPE:

#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",NAME="English",AUTOSELECT=YES,FORCED=NO,LANGUAGE="en-US",CHARACTERISTICS="public.accessibility.transcribes-spoken-dialog,public.accessibility.describes-music-and-sound",URI="subtitles.5.m3u8"

The following vtt track will be labelled by shaka as WEBVTT_MIMETYPE :

#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",NAME="English",AUTOSELECT=YES,FORCED=NO,LANGUAGE="en-US",URI="subtitles.5.m3u8"
@dave-nicholas dave-nicholas added the type: question A question from the community label Feb 7, 2024
@gkatsev
Copy link
Contributor

gkatsev commented Feb 7, 2024

I took a brief look. It seems like Safari doesn't expose any way of knowing whether something was 608 or WebVTT when it comes from the manifest.

An INSTREAM-ID would come out as a captions kind as would ttml/webvtt that are included via a EXT-X-MEDIA and with the mentioned CHARACTERISTICS.

Ideally, we wouldn't be marking kind captions as 608 unless we know for sure it's 608. i.e.

if (textTrack.kind == 'captions') {
track.mimeType = CLOSED_CAPTION_MIMETYPE;
}

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

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.

@shaka-bot shaka-bot removed the status: waiting on response Waiting on a response from the reporter(s) of the issue label Feb 26, 2024
@tykus160
Copy link
Member

@shaka-bot reopen

@avelad avelad reopened this Feb 26, 2024
@avelad
Copy link
Member

avelad commented Apr 5, 2024

@dave-nicholas @gkatsev @tykus160 It's not that there are many alternatives, either we do what we have today or we don't add the mimetype (but this is a breaking change, which I don't know if we want to do)... What is your proposal?

@avelad avelad added the status: waiting on response Waiting on a response from the reporter(s) of the issue label Apr 5, 2024
@gkatsev
Copy link
Contributor

gkatsev commented Apr 8, 2024

Unfortunately, I'm not sure if there is a clear-cut answer here; just trade-offs all the way down. Though, I think if I had to choose, I might consider an unknown type here instead of defaulting to 608. Alternatively, defaulting to text/webvtt feels a bit less wrong.

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

avelad commented Apr 9, 2024

Are you agree with track.mimeType = 'unknown'?

@avelad avelad self-assigned this Apr 9, 2024
@avelad avelad added type: bug Something isn't working correctly priority: P2 Smaller impact or easy workaround browser: Safari Issues affecting Safari or WebKit derivatives and removed type: question A question from the community labels Apr 10, 2024
@avelad avelad added this to the v5.0 milestone Apr 10, 2024
@avelad avelad added the component: HLS The issue involves Apple's HLS manifest format label Apr 10, 2024
@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Jun 9, 2024
@shaka-project shaka-project locked as resolved and limited conversation to collaborators Jun 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
browser: Safari Issues affecting Safari or WebKit derivatives component: HLS The issue involves Apple's HLS manifest format priority: P2 Smaller impact or easy workaround status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants