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
merged 3 commits into from Nov 6, 2018

Conversation

Projects
None yet
4 participants
@gkatsev
Copy link
Member

gkatsev commented Nov 6, 2018

Fixes #5553

gkatsev added some commits Nov 6, 2018

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

This comment has been minimized.

@ldayananda

ldayananda Nov 6, 2018

Contributor

💯

Show resolved Hide resolved 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

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');

This comment has been minimized.

@squarebracket

squarebracket Nov 6, 2018

Contributor

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

This comment has been minimized.

@gkatsev

gkatsev Nov 6, 2018

Author Member

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

@ldayananda
Copy link
Contributor

ldayananda left a comment

LGTM, and tested briefly

@gkatsev gkatsev merged commit c1cbce3 into master Nov 6, 2018

4 checks passed

continuous-integration/codeship Build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
netlify/videojs-docs/deploy-preview Deploy preview ready!
Details

@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