-
Notifications
You must be signed in to change notification settings - Fork 123
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
Multi Video Support #119
Comments
Hi, thanks for the issue. May I ask for an example use case of this? I'm trying to understand why anyone would need to do this :) |
I'm setting up a split player where I have 2 videos side by side. I have one controller that syncs both videos & controls the state of both videos. My I'd have two connects like this: /**
* The first video element on the dom.
*/
const VideoContainerOne = videoConnect(
SplitPlayerView,
mapStateToProps,
mapVideoElToProps,
defaultMergeProps,
'split-player__video1',
);
/**
* The second video element on the dom.
*/
export default videoConnect(
VideoContainerOne,
mapStateToPropsTwo,
mapVideoElToPropsTwo,
defaultMergeProps,
'split-player__video2',
); lmk if you need more clarification! |
Are you then using MapStateToProps to pass the |
yep! How does this work? Can I get permission to submit a PR? |
Feel free to submit a PR for me to look at! |
Instead of defaulting to find the first video element in the dom, pass in a videoID as the 4th argument to the HOC so that
this.videoEl
is the selected video based on videoId. Default to first video element when the argument is not passed.I've already added this & would like to make a PR.
The text was updated successfully, but these errors were encountered: