Search Issue Tracker

By Design

Votes

14

Found in

2019.1.5f1

2020.1

Issue ID

1163390

Regression

No

[Android] Video is not being rendered when using URL on some Android devices

Mobile

-

To reproduce:
1. Open attached project VideoPlayerAndroidQ.zip
2. Build and run to android device

Actual result: Video is not playing in application
Expected result: video should play normally

Reproduced on: 2017.4.32f1; 2020.1.0a1

Tested and reproduced:
VLNQA00173, Xiaomi Redmi 6Pro (Redmi 6 Pro), Android 9, CPU: Snapdragon 625 MSM8953, GPU: Adreno (TM) 506
VLNQA00022, Xiaomi Redmi Note 3 (Redmi Note 3), Android 5.1.1, CPU: Snapdragon 617 MSM8952, GPU: Adreno (TM) 510
VLNQA00054, Xiaomi MI 4LTE (MI 4LTE), Android 6.0.1, CPU: Snapdragon 801 MSM8974AC, GPU: Adreno (TM) 330
VLNQA00262, Sony Xperia XZ Premium (G8141), Android 9, CPU: Snapdragon 835 MSM8998, GPU: Adreno (TM) 540

Tested and not reproduced:
VLNQA00277, Asus ROG Phone (ASUS_Z01QD), Android 8.1.0, CPU: Snapdragon 845 SDM845, GPU: Adreno (TM) 630
----------, Xiaomi Mi 5 (MI 5), Android 6.0.1, CPU: Snapdragon 820 MSM8996, GPU: Adreno (TM) 530
VLNQA00219, Samsung Galaxy Note9 (SM-N960U), Android 8.1.0, CPU: Snapdragon 845 SDM845, GPU: Adreno (TM) 630
VLNQA00125, Google Pixel 2 (Pixel 2), Android 8.1.0, CPU: Snapdragon 835 MSM8998, GPU: Adreno (TM) 540
VLNQA00286, Meizu - (PRO 5), Android 7.0, CPU: Exynos 7 Octa 7420, GPU: Mali-T760

Note: no repro on standalone
Note: User gets error line with W/Unity: AndroidVideoMedia: Error opening extractor: -10000

  1. Resolution Note (2020.1.X):

    The critical thing is in the Player Settings. If the "Target API Level" is Android 9 or later, then this bug seems to happen.

    In the AndroidManifest.xml file, which Unity generates for you, you can add stuff if necessary. There are some instructions on how to do this here: https://docs.unity3d.com/Manual/android-manifest.html. The problem is that when targeting Android 9 or later, cleartext network traffic is no longer allowed by default. So, "http" URLs are no longer allowed by default. "https" should be fine. You can change this by modifying the following in your AndroidManifest.xml:
    <application android:isGame="true" android:usesCleartextTraffic="true">

Comments (13)

  1. jaguartallerdigital

    Sep 18, 2019 23:27

    Reproduced on a Xiaomi Mi Lite 8 / Xiaomi Mi 8 / Xiaomi Mi 9 / Xiaomi MIX 2S. All with Android 9

    On an Iphone 6 works ok. Dual-core 1.4 GHz Typhoon (ARM v8-based) / 16GB 1GB RAM

    Is there any chance to avoid this issue using a Video Player asset like UMP Pro or MPMP? We are short of time and can't wait for a bug solution

  2. BrunoCroci

    Sep 16, 2019 16:49

    We're also able to reproduce that on 2017.4.27f1.

    But the error we get is slightly different:

    `E/NdkMediaExtractor(11617): can't create http service
    W/Unity(11617): AndroidVideoMedia: Error opening extractor: -10002`

  3. Danny_What

    Sep 10, 2019 22:59

    Hello, following is the portion of AndroidManifest which is in apk.

    <uses-sdk
    android:minSdkVersion="19"
    android:targetSdkVersion="28" />

    <uses-permission
    android:name="android.permission.INTERNET" />

    <uses-permission
    android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

    <uses-permission
    android:name="android.permission.READ_EXTERNAL_STORAGE" />

    As you can see, there are WRITE_EXTERNAL_STORAGE & READ_EXTERNAL_STORAGE. With setting, this bug still can be produced which means it can't be resolved by design.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.