A React component for playing a variety of URLs, including file paths, YouTube, Facebook, Twitch, SoundCloud, Streamable, Vimeo, Wistia and DailyMotion
I have a custom component thats contains a single <ReactPlayer>. I am calling my component <VideoPlayer>. If I have multiple <VideoPlayer>'s on one page, they can be played simultaneously and I have manually pause the other one.
Expected Behavior
I want to come up with a solution that will pause whatever other players are playing. I've tried doing custom events but I am not sure how to reference the player that is playing. Any ideas? I am using vimeo as the host of these videos if that makes a difference.
Current Behavior
I have a custom component thats contains a single
<ReactPlayer>
. I am calling my component<VideoPlayer>
. If I have multiple<VideoPlayer>
's on one page, they can be played simultaneously and I have manually pause the other one.Expected Behavior
I want to come up with a solution that will pause whatever other players are playing. I've tried doing custom events but I am not sure how to reference the player that is playing. Any ideas? I am using vimeo as the host of these videos if that makes a difference.