react-native-video: Error => {"extra": -2147483648, "what": 1}
Bug
Error while playing videos from specific URLs. I get the following log for onError function:- {“error”: {“extra”: -2147483648, “what”: 1}}
Platform
Which player are you experiencing the problem on:
- Android ExoPlayer
- Haven’t tested on IOS yet
Environment info
React native info output:
OS: Windows 10 10.0.18362
CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
Memory: 5.06 GB / 15.88 GB
Binaries:
Node: 13.9.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.0 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 6.14.2 - C:\Program Files\nodejs\npm.CMD
IDEs:
Android Studio: Version 3.5.0.0 AI-191.8026.42.35.6010548
npmPackages:
react: 16.9.0 => 16.9.0
react-native: 0.61.5 => 0.61.5
Library version: 5.0.2
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 7
- Comments: 24
No. Sorry for being blunt. That was supposed to go into AndroidManifest.xml in the application tag
Like this
android:usesCleartextTraffic="true"I tried this https://github.com/react-native-community/react-native-video/issues/1747#issuecomment-531736338 and then it threw unrecognised media format error. And then I used usesCleartextTraffic to make it work. Finally got it working.
I added this to the file:
I solved it by modifying my
settings.gradleas mentioned in the setup guide (Android installation):include ‘:react-native-video’ project(‘:react-native-video’).projectDir = new File(rootProject.projectDir, ‘…/node_modules/react-native-video/android-exoplayer’)
I didn’t modify any other files.
“react-native”: “0.63.3” “react-native-video”: “^5.1.0-alpha8”
Thanks! But still its not working for me.
@rananajam1 @Darkiring I researched it a bit. These are the error codes from the Android Media player. https://developer.android.com/reference/android/media/MediaPlayer.OnErrorListener
MEDIA_ERROR_SYSTEM (-2147483648) - low-level system error.
Same issue
This worked for me ❤️
dependencies need add to the “react-native.config.js”, not the “metro.config.js”