Built-in <Video /> controls showing even when controls prop is set to false
#3,129 创建于 2023年5月25日
仓库指标
- 星标
- (7,677 个星标)
- PR 合并指标
- (平均合并 2天 3小时) (30 天内合并 11 个 PR)
描述
Bug
I'm trying to implement custom controls for the video, but the built in controls don't go away.
Platform
React Native Windows Which player are you experiencing the problem on: Windows UWP
Environment info
React native info output:
System:
OS: Windows 10 10.0.22621
CPU: (8) x64 Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz
Memory: 16.89 GB / 31.92 GB
Binaries:
Node: 18.16.0 - C:\Program Files\nodejs\node.EXE
Yarn: Not Found
npm: 9.5.1 - C:\Program Files\nodejs\npm.CMD
Watchman: Not Found
SDKs:
Android SDK: Not Found
Windows SDK:
AllowDevelopmentWithoutDevLicense: Enabled
Versions: 10.0.18362.0, 10.0.19041.0, 10.0.22000.0
IDEs:
Android Studio: Not Found
Visual Studio: 17.5.33627.172 (Visual Studio Enterprise 2022), 16.11.33529.622 (Visual Studio Enterprise 2019)
Languages:
Java: Not Found
npmPackages:
@react-native-community/cli: Not Found
react: 18.1.0 => 18.1.0
react-native: 0.70.6 => 0.70.6
react-native-windows: 0.70.10 => 0.70.10
npmGlobalPackages:
*react-native*: Not Found
"react-native": "0.70.6", "react-native-video": "^5.2.1", "react-native-windows": "0.70.10",
Steps To Reproduce
- Set controls prop on Video to false
- Observe the controls still appear
Expected behaviour
- Set controls prop on Video to false
- Controls hidden
Reproducible sample code
<Video onTouchStart={summonControls} style={styles.backgroundVideo} source={source} controls={false} paused={!isPlaying} muted={isMuted} volume={volume} onProgress={onProgress} onLoad={onPlayerLoad} onEnd={onEnd} onError={onPlayerError} onAudioBecomingNoisy={() => setIsPlaying(false)} poster={poster} fullscreen={isFullScreen} resizeMode={resizeMode} ref={_player} textTracks={textTracks} selectedTextTrack={isCCOn ? selectedTextTrack : undefined} disableFullscreen={true} {...otherProps} />