Add parameter to processCues API to allow styling to be overridden. #27
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Similar to the change in mozilla/vtt.js to allow external control of styling of the WebVTT cues, add a parameter to the processCues API that allows video.js to pass its captions settings for video-vtt.js to implement them.
This PR supports all the styling options currently supported in video.js'
text-track-display.js
, while retaining backward compatibility with existing versions of video.js which haven't been changed to take advantage of this new parameter in the API.Ultimately, moving the styling into video-vtt.js will allow for other customizations of Captions which are provided in other browsers but not currently available in video.js and video-vtt.js (e.g. not overriding any styling which is contained in the captions themselves), and also significantly simplify
text-track-display.js
.This PR needs to add documentation for what parameters can be passed for styling, and to check for validity of parameters before using them.