React-native: Black screen for HTML5 video player in Android WebView

Created on 18 Jan 2017  路  4Comments  路  Source: facebook/react-native

Description

  1. Created new project
react-native init webview_example
  1. Replaced text nodes with:
        <WebView
          javaScriptEnabled={true}
          style={{flex: 1}}
          source={{uri: `https://www.youtube.com/embed/IPV3rQtctkM`}}
        />
  1. Run.

  2. Video does not show (only black screen) but audio does play fine

Reproduction

Full source code is https://github.com/mehcode/rn-scratchpad/blob/master/index.android.js

Solution

I have no idea. I've been poking it for awhile.

Additional Information

  • React Native version: 0.40.0
  • Platform: Android v7
  • Operating System: Linux

Some more information. That example works 100% in Android <= 6. The bug seems to only exist in Android 7+. There must be a difference to WebView usage that we're not handling.


Another update. I've reduced this bug down to just raw android and have the same behavior.

https://github.com/mehcode/scratchpad

Locked

All 4 comments

@mehcode I have the exact same problem on Android Nexus 5 emulator. The embedded video only has audio. Do you have any solution now?

I just gave up and use react-native-video

Hi there! This issue is being closed because it has been inactive for a while. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. Either way, we're automatically closing issues after a period of inactivity. Please do not take it personally!

If you think this issue should definitely remain open, please let us know. The following information is helpful when it comes to determining if the issue should be re-opened:

  • Does the issue still reproduce on the latest release candidate? Post a comment with the version you tested.
  • If so, is there any information missing from the bug report? Post a comment with all the information required by the issue template.
  • Is there a pull request that addresses this issue? Post a comment with the PR number so we can follow up.

If you would like to work on a patch to fix the issue, contributions are very welcome! Read through the contribution guide, and feel free to hop into #react-native if you need help planning your contribution.

Did the original problem occur in the emulator and on actual device as well? (hint: maybe emulator only?, second hint, make sure you haven't disabled hardware acceleration accidentally).

Was this page helpful?
0 / 5 - 0 ratings