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

fix(HLS): Fix detection of WebVTT subtitles in HLS by extension #4928

Merged
merged 1 commit into from
Jan 24, 2023

Conversation

fredrik-telia
Copy link
Contributor

@fredrik-telia fredrik-telia commented Jan 24, 2023

Was this a typo? We were seeing uncaught TypeErrors when changing subtitle tracks related to this, it seems 'txt/vtt' is not a valid mime type for webvtt subtitles.

Closes #4929

@avelad avelad added type: bug Something isn't working correctly component: HLS The issue involves Apple's HLS manifest format priority: P1 Big impact or workaround impractical; resolve before feature release labels Jan 24, 2023
@avelad avelad added this to the v4.4 milestone Jan 24, 2023
@avelad avelad changed the title fix: mime type for webvtt fix(HLS): Fix detection of WebVTT subtitles in HLS by extension Jan 24, 2023
@github-actions
Copy link
Contributor

Incremental code coverage: 100.00%

@martinstark
Copy link
Contributor

Commented on the issue, but putting it here as well:

There seems to be a deeper issue in hls_parser.js that causes one track to be assigned text/vtt and the second track to be assigned txt/vtt when guessing mime types, despite both having the same file extension.

Does shaka pre-guess and assign "text/vtt" mime type for some tracks, regardless of extension, but not all?

I haven't debugged it fully, the PR provided by Fredrik fixes the issue by correcting the bad mime type, but it's confusing me why shaka would choose two different ones for near identical tracks.

@joeyparrish
Copy link
Member

Does shaka pre-guess and assign "text/vtt" mime type for some tracks, regardless of extension, but not all?

Essentially, yes. We don't know the extension until we load the playlist, and since v4.3.0, we only load the playlists of tracks that we are streaming.

Sorry for the trouble, and the typo, and thanks for the fix!

@joeyparrish joeyparrish merged commit 15b0388 into shaka-project:main Jan 24, 2023
joeyparrish pushed a commit that referenced this pull request Jan 30, 2023
We were seeing uncaught TypeErrors when changing subbtitle
tracks.

Closes #4929
joeyparrish pushed a commit that referenced this pull request Jan 30, 2023
We were seeing uncaught TypeErrors when changing subbtitle
tracks.

Closes #4929
joeyparrish pushed a commit that referenced this pull request Jan 30, 2023
We were seeing uncaught TypeErrors when changing subbtitle
tracks.

Closes #4929
joeyparrish pushed a commit that referenced this pull request Jan 30, 2023
We were seeing uncaught TypeErrors when changing subbtitle
tracks.

Closes #4929
@github-actions github-actions bot added the status: archived Archived and locked; will not be updated label Jul 25, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
component: HLS The issue involves Apple's HLS manifest format priority: P1 Big impact or workaround impractical; resolve before feature release status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Uncaught TypeErrors when switching subtitle tracks
4 participants