Open amitmehtacode opened 3 months ago
@amitmehtacode If you want to enhance the behavior, you should improve controlsStyles property
@freeboub But how can I hide forward and backward icon on version 6.0.0 as controlsStyles are not supported in 6.0.0 version
no
@freeboub also checked on version 6.1.1 after adding
controlsStyles={{
hideSeekBar: true
}}
The seekBar is still not hidden.
@freeboub also checked on version 6.1.1 after adding
controlsStyles={{ hideSeekBar: true }}
The seekBar is still not hidden.
Just retested in sample app, it works fine 🤔
@freeboub please find the recording version: 6.1.1
@freeboub how can I remove the forward and backward icons? I only want the play and pause icons in it.
@amitmehtacode The showNotificationControls prop enables the Android media session. I'm not sure why you want to disable the backward and forward buttons, but if you want to block functionality, you should remove the listener rather than blocking the UI, because the media session controls all external controls together, including the physical buttons, not just notifications.
@YangJonghun In one of my use case I only want to show play and pause icon. Also I highly appreciated if you can guide me for the same with code how do I remove the listener. Also if it is possible to hide the icon ?
@amitmehtacode https://github.com/TheWidlarzGroup/react-native-video/blob/master/android/src/main/java/com/brentvatne/exoplayer/VideoPlaybackService.kt https://github.com/TheWidlarzGroup/react-native-video/blob/master/android/src/main/java/com/brentvatne/exoplayer/VideoPlaybackCallback.kt
you need to patch above codes for build media session without predefined buttons(and callbacks)
@freeboub also checked on version 6.1.1 after adding
controlsStyles={{ hideSeekBar: true }}
The seekBar is still not hidden.
Just retested in sample app, it works fine 🤔
@freeboub hideSeekBar just works on video play controller. I think he wants to hide it on notification.
@freeboub also checked on version 6.1.1 after adding
controlsStyles={{ hideSeekBar: true }}
The seekBar is still not hidden.
Just retested in sample app, it works fine 🤔
@freeboub hideSeekBar just works on video play controller. I think he wants to hide it on notification.
Yes
@freeboub I want to hide these 3 controls from the notification screen. How can this be done? Additionally, there should be an option to show or remove them through props.
For now there is not prop for doing it - if you need it for commercial project you can contact TheWidlarzGroup here
@amitmehtacode https://github.com/TheWidlarzGroup/react-native-video/blob/0a1085ce03152d58d98da408dbe79e76fa5ebc1a/android/src/main/java/com/brentvatne/exoplayer/VideoPlaybackService.kt#L123 This is where those play and pause icons and functionality are created. This is where you can make some edits and then run the examples/basic
with yarn run android
.
Description
want an option to hide or show the controls in a React Native video music control.
Why it is needed ?
want an option to hide or show specific controls in a React Native video music control, as in some cases you may not want a particular control to be visible.
Possible implementation
Technical POV how to do it
Code sample
Code sample