Skip to content

Commit

Permalink
fix for #5292 - push to filterSubtitleTracks output if kind is captio…
Browse files Browse the repository at this point in the history
…ns (#5297)

* fix for #5292 - push to filterSubtitleTracks output if kind is captions

* adding "captions" to all subtitle-track-controller tests
  • Loading branch information
dstreet26 authored Mar 17, 2023
1 parent d097760 commit 4029b6d
Show file tree
Hide file tree
Showing 2 changed files with 298 additions and 282 deletions.
5 changes: 4 additions & 1 deletion src/controller/subtitle-track-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,10 @@ function filterSubtitleTracks(textTrackList: TextTrackList): TextTrack[] {
for (let i = 0; i < textTrackList.length; i++) {
const track = textTrackList[i];
// Edge adds a track without a label; we don't want to use it
if (track.kind === 'subtitles' && track.label) {
if (
(track.kind === 'subtitles' || track.kind === 'captions') &&
track.label
) {
tracks.push(textTrackList[i]);
}
}
Expand Down
Loading

0 comments on commit 4029b6d

Please # to comment.