question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Controls doesn't appear on Android

See original GitHub issue

Current 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

https://youtu.be/Aa8UKZVNckw

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:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
cobarxcommented, Oct 14, 2018

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.

0reactions
IbrahimSulaicommented, Jan 4, 2019

Opened a PR (https://github.com/react-native-community/react-native-video/pull/1414) for showing the controls in Android Exoplayer.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found