'Picking video file on Android 10: Error NdkMediaExtractor can't create HTTP service

I'm using Unity version 2019.4.3f1 I'm trying to load local video file on Android 10 device (Samsung A90) from the gallery but I'm not able getting this error:

2020/07/10 20:24:51.603 8430 8620 Error NdkMediaExtractor can't create http service
2020/07/10 20:24:51.603 8430 8620 Warn Unity AndroidVideoMedia: Error opening extractor: -10002
2020/07/10 20:24:51.603 8430 8620 Warn Unity (Filename:  Line: 469)
2020/07/10 20:24:51.603 8430 8620 Warn Unity

Any suggestions on how to fix this?



Solution 1:[1]

I managed to fix this issue, in my case, the problem was "URL" for the final path I used:

VideoPlayer.url = "file://" + _url;

-I removed "file://" from the final path string and now all works perfectly.

Hope this will help somebody!

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Dorin Buraca