Skip to content

fix: default subtitles not enabled#5608

Merged
gkatsev merged 2 commits intovideojs:masterfrom
alex-barstow:fix-default-captions
Nov 29, 2018
Merged

fix: default subtitles not enabled#5608
gkatsev merged 2 commits intovideojs:masterfrom
alex-barstow:fix-default-captions

Conversation

@alex-barstow
Copy link
Contributor

Description

This is a follow-up to this fix in VHS, after which default in-manifest subtitles were still not being correctly enabled. The reason is because video.js's text track preselection logic was running before the media groups were set up in VHS.

Solution

Text track preselection should happen on 'loadedmetadata' instead of 'loadstart'. According to the HTML spec, text track data is available on 'loadedmetadata', so we should be waiting until then to make preselection decisions.

Test content w/ default subtitles: https://bitdash-a.akamaihd.net/content/sintel/hls/playlist.m3u8

Copy link
Member

@gkatsev gkatsev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This totally makes sense.

@gkatsev gkatsev merged commit 8329e64 into videojs:master Nov 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants