react-native-video-processing icon indicating copy to clipboard operation
react-native-video-processing copied to clipboard

[ANDROID] - ProcessingManager.getVideoInfo throw 'setDataSource failed'

Open LcsGrz opened this issue 5 years ago • 2 comments

Current Behavior

When you try to get information from the video with the following line of code, the error occurs

const output = await ProcessingManager.getVideoInfo('/storage/emulated/0/DCIM/Camera/VID_20200918_141428.mp4');

ANDROID 10
imagen

Expected Behavior

The expected result is that you return the video information to me This is only happening in android 10 of my phone, from the computer emulator I have no problems but it has android 9. For IOs works fine.

Your Environment

software version
react-native-video-processing From master
react-native 0.63.2
node 12.18.3

LcsGrz avatar Sep 18 '20 18:09 LcsGrz

This is due to Scoped Storage in Android 10.

https://developer.android.com/about/versions/11/privacy/storage#scoped-storage

There is a temporary solution

<manifest ... >
  <!-- This attribute is "false" by default on apps targeting
       Android 10 or higher. -->
  <application 
       android:requestLegacyExternalStorage="true" ........ >
    ......
  </application>
</manifest>

walvekarnikhil avatar Oct 16 '20 17:10 walvekarnikhil

@walvekarnikhil nice to see you again. you solved my problem again. god man. thank you. :)

viprocket1 avatar Jun 03 '21 06:06 viprocket1