-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
Persist caption/description choice over source changes #4295
Changes from all commits
35e4958
03a3b70
ecf6b6f
1001162
54506ea
27acd7e
692783e
485fe93
50f346e
2eedf77
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,6 +61,14 @@ class TextTrackList extends TrackList { | |
track.addEventListener('modechange', Fn.bind(this, function() { | ||
this.trigger('change'); | ||
})); | ||
|
||
const nonLanguageTextTrackKind = ['metadata', 'chapters']; | ||
|
||
if (nonLanguageTextTrackKind.indexOf(track.kind) === -1) { | ||
track.addEventListener('modechange', Fn.bind(this, function() { | ||
this.trigger('selectedlanguagechange'); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. just realized it's possible that the language doesn't change, so, the naming is a big weird, but maybe still ok. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. maybe |
||
})); | ||
} | ||
} | ||
} | ||
export default TextTrackList; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -253,6 +253,7 @@ class TextTrack extends Track { | |
* @type {EventTarget~Event} | ||
*/ | ||
this.trigger('modechange'); | ||
|
||
} | ||
}); | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did we decide on whether we wanted this to happen on
addtrack
as well?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe that we discussed it and decided that it would be disorienting to preselect a new track if a track had already been selected by the user.