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.

Video not playing in Android

See original GitHub issue

Hi i have a problem with the Android Player, the video is not loading only in Android but works well in iOS. It’s loading endlessly…

Here is the code :

<YouTube
          ref={this._youTubeRef}
          apiKey="ApiKEY"
          videoId={this.state.videoUrls}
          play={this.state.isPlaying}
          loop={this.state.isLooping}
          fullscreen={this.state.fullscreen}
          controls={0}
          style={[
            { height: PixelRatio.roundToNearestPixel(this.state.playerWidth / (16 / 9)) },
            styles.player,
          ]}
          onError={e => {
            this.setState({ error: e.error });
          }}
          onReady={e => {
            this.setState({ isReady: true });
          }}
          onChangeState={e => {
            this.setState({ status: e.state });
          }}
          onChangeQuality={e => {
            this.setState({ quality: e.quality });
          }}
          onChangeFullscreen={e => {
            this.setState({ fullscreen: e.isFullscreen });
          }}
          onProgress={e => {
            this.setState({ currentTime: e.currentTime });
          }}
        />

Thanks for the help

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:2
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
ppv94commented, Nov 13, 2019

place your youtube API key it will work in android also. and also keep controls={1}

0reactions
leonid-osymcommented, May 12, 2020

Have the same issue. It happens only with some particular videos. At the same time ios works well.

Read more comments on GitHub >

github_iconTop Results From Across the Web

7 Methods to Fix Video Not Playing on Android Phone
Potential Fixes for video not playing on your Android phone · Method 1: Restart or reboot your Phone · Method 2: Clear cache...
Read more >
Why Won't Videos Play on My Android Phone Anymore? Fixed
Viruses on your Android device can corrupt system or app files rendering them incapable of playing videos. They may also corrupt stored video...
Read more >
Fix videos & games that won't play - Google Chrome Help
Fix videos & games that won't play ; Step 1: Update Chrome. Videos and games sometimes need the latest version of Chrome. On...
Read more >
How to Fix Video Not Playing on Android Phone? - iMyFone
If you cannot play video on an Android phone, try to restart your device. It will stop conflicting software operating in the background...
Read more >
How Do You Fix Can't Play Video on Android Error?
How Do You Fix Can't Play Video on Android Error? · Solution 1: Force Reboot Phone · Solution 2: Clear Device Cache ·...
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