Closed krunalbad closed 2 years ago
Wrap your player by view or Touchable component, set onPress={() => []} with empty function, or give pointerEvents="none"
@Navipro70 I meant the default controls that come from the RNVideo. if controls={true} then it will display the default controls view from the player my goal is to set it to true and also not let the default control of the player be displayed so that the AVPlayer can show the controls in the notification center if controls are true then the notification center can show the controls on the lock screen but I want to set my custom control view also while the controls={true} is enabled
Expected Behavious:
@krunalbad If I'm correctly understand your issue, my previous message is answer for your question.
You said that RNVideo show controllers on tap like this https://developer.apple.com/design/human-interface-guidelines/airplay/images/AirPlay_VideoScreen_2x.png but you want not show them. Just block onPress event (all events by tap) on RNVideo component. pointerEvents="none" will help
Next just wrap RNVideoView with TouchableWithoutFeedback and set onPress event to show your custom controllers.
I realize this logic in my app and it works. But maybe I can mistake, because my RNVideo component was used for audio, and didn't show video. I don't quite remember: Is on mount event trigger default RNVideo controllers to show or not? (But I think not show).
Also, if I'm not mistaken, when the application is closed but is in RAM, controls elements in the notification center (except for audio) are blocked.
@krunalbad Do you find any solution for this? please share solutions if do you find any.
didn't find any. ended using https://github.com/tanguyantoine/react-native-music-control @vishalhyperspace
Even if controls are enabled i just want to hide controls view only because if controls are enabled it shows the playback in notification centre the only thing i want to achieve is to hide controls view only while the controls prop is enabled true. Is it possible?