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.

Videos not playing on android, only plays audio on Android. Works on iOS.

See original GitHub issue

Bug description:

When ever you try to play a video whether it’s Youtube, Vimeo, Dailymotion, it just plays audio, in place of video only black screen in displayed. You can hear the video playing but no visuals are displayed. It works perfectly fine on iOS.

To Reproduce:

import { WebView } from 'react-native-webview';

render() {
    return (
        <WebView source={{ uri: 'https://www.youtube.com/watch?v=X-x7eZOdBFM' }} />
    );
  }

Expected behavior:

Should play the video 🤷

Screenshots/Videos:

image

https://user-images.githubusercontent.com/13523678/114420476-fbce3f00-9bd1-11eb-9680-29510506dbba.mov

Environment:

  • OS: Android
  • OS version: 10
  • react-native version: 0.63.2
  • react-native-webview version: 10.9.2 and 11.3.2

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6

github_iconTop GitHub Comments

2reactions
SurajMDurgadcommented, Jul 7, 2021

This issue was a bug with webview in android, nothing to do with react-native-webview. This issue was resolved. Ideally if you have set android:hardwareAccelerated="true" in Manifest.xml the videos should play.

0reactions
aneena-thomascommented, Jul 13, 2021

Hi @SurajMDurgad in which manifest I need to add this one android:hardwareAccelerated=“true”? in library manifest or app manifest

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fix Videos Not Playing on Android Phone with 9 Proven Ways
To fix the YouTube videos not playing on Android, you can simply erase its cache. Just go to its Settings > Apps >...
Read more >
How to Fix Videos Not Playing on Android Phone
Read on to know how to fix videos not playing on Android phone when your mobile videos do not play properly or give...
Read more >
7 Methods to Fix Video Not Playing on Android Phone
Open Settings. Scroll and open Storage/ Application Manager. Select Clear Cache. Once you have cleared cache data, go to the gallery, open the ......
Read more >
The Effective Solutions to Fix Videos Not Playing on Android
How to Fix Can't Play This Video on Android Phone · 1. Re-download the Video · 2. Restart Your Phone/Tablet · 3. Update...
Read more >
Can't Play Videos On Your Android And IPhone? Try These ...
How to Troubleshoot Videos Not Playing on Phone? · Force Quit the Media Player · Reboot the Device · Check the Internet Connection...
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