Add a title bar linking to external source to video player - #557
Merged
Conversation
masaball
marked this pull request as ready for review
July 9, 2024 18:26
Contributor
Author
|
Is that transcript test maybe flaky? Tests are passing for me locally, and these changes don't touch anything related to the transcripts... |
Member
Looks like it. I restarted the build and it passed. |
Dananji
reviewed
Jul 9, 2024
Dananji
left a comment
Collaborator
There was a problem hiding this comment.
Looks great! I have one comment on the way the component is initialized;
I think you can set use the component name as an option in videoJsOptions when initializing as follow;
videoJsOptions = {
...
videoJSTitleLink: enableTitleLink
}
And then player.addChild('VideoJSTitleLink'); in VideoJSPlayer component can be removed.
By setting it up this way, you might be able to access the component in tests hopefully.
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: avalonmediasystem/avalon#5898
This PR adds a custom VideoJS component to override/piggyback on the TitleBar component added to Video.js in v8.0.0 and adds a prop to the MediaPlayer component for enabling/disabling this feature. The title bar concatenates the manifest
labelwith the active canvas'slabeland uses theidfield as an href to render them as a hyperlink that will open a new tab for the original media page when clicked. The link will be underlined when hovered over.I was unable to get tests for the prop to work. I think this may be because the component is added as a child of the player during the
player.on('ready'...)block and is consequently not actually rendered in the context of the jest testing framework? Everything looked to be working as expected when testing manually.