Add support to AD functionality in the player - #916
Merged
Merged
Conversation
Dananji
force-pushed
the
videojs-ad
branch
4 times, most recently
from
March 13, 2026 21:47
7a3b174 to
42a34c8
Compare
cjcolvar
approved these changes
Mar 25, 2026
cjcolvar
left a comment
Member
There was a problem hiding this comment.
Looks great as far as I can tell!
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Related issue: #839
Related issue: #850
Changes in this PR:
supplementingannotations by detecting the/descriptionstext in the annotation id<tracks>in the player elementcuechangeevent handler of the active descriptions text-track to read the cues usingWebAPIspeechSynthesisImplementation notes for the AD button:
this needs Ramp to parse and synchronize the cues with the player's
timeupdateevent. This makes the code more complex and could make the event synchronization for different browsers difficult (as we've seen in the past).VideoJSand build a customVideoJScomponent as a toggle button. This way Ramp doesn't need to parse and synchronize the cues in the AD text-tracks, but can tag onto thecuechangeevent emitted by the active text-track marked byVideoJSto enable speech synthesis. This doesn't make the AD functionality dependent on the captions like the native AD functionality.Notes:
Videoplayer's control-bar when there is an audio description text-track given as asupplementingAnnotation.