-
Notifications
You must be signed in to change notification settings - Fork 7.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(player): ingest a player div for videojs #3856
Conversation
I guess this needs some additional unit tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah nice, this should help a lot for React folks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is tentatively approved pending fixed tests and addition of a new test specifically for this feature. 😄
Fixing the tests we currently have is super easy. I forgot to check that |
Well, fixing the existing tests I think was more important, but I do think it'd be nice to have a positive test case for the functionality. We've gotten ourselves into trouble lately with low-level player initialization assumptions! 😆 |
First up are a set of tests for |
If the videojs embed code (a video element) is wrapped in a div with the 'data-vjs-player' attribute on it, that element will be used for the player div and a new one will not be created. In addition, on browsers like iOS that don't support moving the media element inside the DOM, we will not need to clone the element and we could continue to re-use the same video element give to us in the embed code. This could also be extended in the future to change our embed code to a div-only approach if we so choose.
… playerElIngest flags
d0eabd2
to
a85eb5b
Compare
@mmcc @misteroneill tests are written and passing, please review! |
When I am trying to update the video by changing the source, it's not changing the video. return <VideoPlayer { ...videoJsOptions } />
|
If the videojs embed code (a video element) is wrapped in a div with the
'data-vjs-player' attribute on it, that element will be used for the
player div and a new one will not be created. In addition, on browsers
like iOS that don't support moving the media element inside the DOM, we
will not need to clone the element and we could continue to re-use the
same video element give to us in the embed code.
This could also be extended in the future to change our embed code to a
div-only approach if we so choose.