Closed maksymhcode-care closed 1 month ago
Thank you for your feature request. We will review it and get back to you if we need more information.
Yes this would be a great thing to have
This should be implemented on js side. Register on the event in Video.tsx and save the state to a ref. The accessor just needs to return the value on the ref. (Can also be implemented on the app side, but it can but integrated in the package). Ping @seyedmostafahasani I know you start something similar.
Yeah this could be implemented as @freeboub suggests.
The way the exoplayer lets us keep track of state is by isPlayingChanged
events in any class that implements Player.Listener
(in rnv, the class ReactExoplayerView
does).
I believe you @maksymhcode-care could implement in your video player containing component the following currently though:
const videoIsPlaying = useRef(false);
<Video
onPlaybackStateStateChanged={(data) => videoIsPlaying.current = data.isPlaying}
/>
Yeah this could be implemented as @freeboub suggests. The way the exoplayer lets us keep track of state is by
isPlayingChanged
events in any class that implementsPlayer.Listener
(in rnv, the classReactExoplayerView
does).I believe you @maksymhcode-care could implement in your video player containing component the following currently though:
const videoIsPlaying = useRef(false); <Video onPlaybackStateStateChanged={(data) => videoIsPlaying.current = data.isPlaying} />
Yeah, something like that would works, thanks
Description
Not crucial, but do you think getting play/pause state from ref can be added?
Why it is needed ?
Having ability to get this state locally can help with optimization
Possible implementation
No response
Code sample
No response