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(tracks): don't select tracks based on user pref if no langauge is set #5556

merged 3 commits into from Nov 6, 2018


Copy link

@gkatsev gkatsev commented Nov 6, 2018

Fixes #5553

if (
userPref && userPref.enabled &&
userPref.language && userPref.language === track.language &&
track.kind in modes
Copy link

@ldayananda ldayananda Nov 6, 2018


test/unit/tracks/text-track-display.test.js Outdated Show resolved Hide resolved
test/unit/tracks/text-track-display.test.js Show resolved Hide resolved
test/unit/tracks/text-track-display.test.js Show resolved Hide resolved

assert.equal(spanishTrack.mode, 'disabled', 'Spanish captions should be disabled');
assert.equal(englishTrack.mode, 'disabled', 'English captions should be disabled');
assert.notEqual(metadataTrack.mode, 'showing', 'Metadata track should not be showing');
Copy link

@squarebracket squarebracket Nov 6, 2018

Is there a reason you're opting for notEqual'ing showing instead of equal'ing hidden? Like Safari's native HLS support or something?

Copy link
Member Author

@gkatsev gkatsev Nov 6, 2018

Yeah, I figured it'll be safer to just make sure it isn't showing since it doesn't really matter what this is set to for this test

Copy link

@ldayananda ldayananda left a comment

LGTM, and tested briefly

@gkatsev gkatsev merged commit c1cbce3 into master Nov 6, 2018
4 checks passed
@gkatsev gkatsev deleted the segment-metadata branch Nov 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants