-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(player): simplifies text track handling
Resolves #35 by adding the `textTrack` function to simplify text track retrieval and selection. This function allows to: - retrieve the currently active text track - activate a text track based on `language` and `kind` properties Also, when selecting a text track, if the `kind` property is not satisfied, the first text track satisfying the `language` condition will be returned, or `undefined` if no condition is satisfied. During this process, all text tracks in mode `showing` are `disabled`. ```javascript // Get the current text track player.textTrack(); // Activate a text track player.textTrack({language:'en', kind:'captions'}) // Disable all text tracks player.textTrack('off') ``` - add `textTrack` function - export the registered component directly - add test coverage
- Loading branch information
Showing
2 changed files
with
118 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters