Skip to content

Commit

Permalink
chore: Add warning on unsupported kind in addTextTrackAsync (#6126)
Browse files Browse the repository at this point in the history
  • Loading branch information
avelad authored Jan 19, 2024
1 parent 6f90af3 commit 938de98
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -4714,6 +4714,12 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
shaka.util.Error.Code.CONTENT_NOT_LOADED);
}

if (kind != 'subtitles' && kind != 'captions') {
shaka.log.alwaysWarn(
'Using a kind value different of `subtitles` or `captions` can ' +
'cause unwanted issues.');
}

if (!mimeType) {
mimeType = await this.getTextMimetype_(uri);
}
Expand Down

0 comments on commit 938de98

Please sign in to comment.