Controls doesn't appear on Android
See original GitHub issueCurrent behavior
My component video doesn’t work on Android, the controls simply doesn’t appear, on iPhone works 100%.
Reproduction steps
Run on Android simulator.
Expected behavior
The controls (play, pause, stop…) should appear
Platform
Which player are you experiencing the problem on:
- Android ExoPlayer
Video sample
settings.gradle
include ':react-native-video'
project(':react-native-video').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-video/android-exoplayer')
build.gradle
dependencies {
[...]
implementation project(':react-native-video')
[...]
}
MainApplication.java
[...]
import com.brentvatne.react.ReactVideoPackage;
[...]
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(new MainReactPackage(), new RNFirebasePackage(), new RNFirebaseAuthPackage(),
new OrientationPackage(), new ReactVideoPackage(), new RNFirebaseDatabasePackage(),
new RNGoogleSigninPackage(), new VectorIconsPackage(), new FastImageViewPackage());
}
Component
<Video
onEnd={this.onEnd}
onLoad={this.onLoad}
onLoadStart={this.onLoadStart}
onProgress={this.onProgress}
paused={this.state.paused}
controls={true}
resizeMode="content"
source={{ uri: phyxPlayList.currentVideo }}
width={width}
height={videoHeight}
ref={videoPlayer => (this.videoPlayer = videoPlayer)}
/>
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Android Phone Buttons Don't Work? 5 Fixes and Workarounds
1. Check if the Button Is Really Dead · Reboot Your Phone · Boot Into Safe Mode · Diagnose Your Phone's Hardware Buttons....
Read more >Controls doesn't appear on Android · Issue #1278 - GitHub
My component video doesn't work on Android, the controls simply doesn't appear, on iPhone works 100%. Reproduction steps. Run on Android ...
Read more >Navigation bar does not appear on Samsung phone
Open Settings, tap Display, and then tap Navigation bar. Turn off Swipe gestures. Tap Buttons to disable gestures and restore the navigation buttons....
Read more >Android 11 Media Controls often don't show up when using ...
Settings app > Apps & notifications > See all apps. Select Pixel launcher. Then tap on Storage & cache > clear cache >...
Read more >How to Enable Parental Controls on Android Devices - YouTube
Giving kids access to an Android device can bring many potential issues. Here's how to avoid them by setting up Parental Controls on...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
On iOS, the system provides a default set of controls that are intended for developers who don’t want to build their own controls.
Android doesn’t have a similar feature, so we’d have to build it or include the sample controls provided by ExoPlayer. Imo, those look like crap so I have not wanted to include them, it makes more sense to use a package like react-native-media-controls or build your own.
I have a set of controls that are fairly nice that I could release as a separate module but haven’t gotten approval from my employer to open source them.
DOM refers to react-native-dom implementation of React Native for the web. The html5 video element spec requires it to provide a set of controls.
Opened a PR (https://github.com/react-native-community/react-native-video/pull/1414) for showing the controls in Android Exoplayer.