Open tomsseisums opened 5 years ago
Hmm, if I understood correctly, it's possible to get a ref
to SanityMuxPlayer and then call getVideoElement
to get the actual video reference.
I wonder, should forwardRef
still be implemented or the current way is sufficient?
Yes, you can access the video element with .getVideoElement
.
Using forwardRef
could be nice as well!
@tomsseisums @skogsmaskin how can you call a class method on a rendered React Element?
The only work around I've found is to create a ref wrapping the video player, and then do ref.current.querySelector('video')
.
Not elegant but it works!
What you think of exposing the underlying
<video>
with a forwardRef?One could then hook into various API's to set up custom systems, including custom controls.