如何隐藏react-native-video中的额外控件
我正在使用React-Native-video,并且正在尝试弄清楚如何仅隐藏下图中的两个按钮(标题和条形图)。 我仍然想要清理和时间。传递控件= false隐藏我不想要的一切。
这是我当前的播放器组件设置
<Video
onPlaybackRateChange={onPlaybackRateChange}
source={{ uri }}
resizeMode="contain"
useNativeDriver={true}
style={styles.video}
disableTimer={true}
controls={true}
/>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为你应该使用
controls={true}
属性隐藏控件,并使用其他包进行电影控制,例如 react-native-video-controls 或 react-native-video-player 如 文档I think you should hide controls with
controls={true}
prop and use other packages for movie control like react-native-video-controls or react-native-video-player as mentioned in documentationReact Native Video中有一个配置属性可以自定义控件,但似乎不包含字幕。
https://docs.thewidlarzgroup.com/reaeact-native-video/组件/道具#控制
There is a config property in react native video to customize the controls but it doesn't seem to include the captions.
https://docs.thewidlarzgroup.com/react-native-video/component/props#controls