question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Android] cannot run video m3u8

See original GitHub issue

I have a m3u8 link, it runs perfectly on IOS, but cannot run on Android The exception is {"error": {"extra": -1004, "what": 1}} I was known that is error from Android’s Media Player and the solution is “enable exoplayer” I tried but cannot use that player First, I editted react-native.config.js like below image but It’s not working Second, I editted settings.gradle like

include ':react-native-video'
project(':react-native-video').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-video/android-exoplayer')

But there was crash when Video was mounted and the error in logcat is

Didn't find class com.google.android.exoplayer2.video.videolistener

I don’t know what I can do now

"react-native": "0.64.0",
"react-native-video": "^5.1.1",
"react-native-video-cache": "^2.0.5",
"react-native-multiple-video-player": "https://github.com/lamlengend98/-lamnt-react-native-multi-video",

Here is all video libraries which I’m using

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:13 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
evoactivitycommented, Sep 14, 2022

The latest version of the library is not yet available on NPM

Update your package.json to one of these, reinstall and try your app again. v6 alpha

"react-native-video": "react-native-video/react-native-video",

v5.2.1

"react-native-video": "react-native-video/react-native-video#support/5.2.X",

Edit: Looks like this was released on npm so these will also work v6 alpha

"react-native-video": "^6.0.0-alpha.3",

v5.2.1

"react-native-video": "^5.2.1",
0reactions
freeboubcommented, Sep 15, 2022

@lamlengend98 can you explain how did you found the root cause ? Because if you where able to download the content manually, you shouldn’t need this certificate? Is the isclearTextTraffic enough? Thank you

Edit I want to complete this PR: https://github.com/react-native-video/react-native-video/pull/2858

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix error "Can't play this video"? (m3u8) file
1.If your video is corrupted then videoplayer shows that dialog.. 2.if your video is completed and not corrupted then try this, videoView ...
Read more >
Fixes 2022: Cannot Load M3U8 in Google Chrome on Windows
1. Enable access to the browser through Firewall · 2. Allow all cookies on the browser · 3. Disable extensions resulting in “Can't...
Read more >
Is there any way to convert a M3U8 file formatted video to a ...
Recently I download M3U8 videos but find out that I can't directly open them on my computer. But here are three ways I...
Read more >
Introduction to HTTP Live Streaming: HLS on Android and More
Only the index M3U8 file needs a dynamic version, the single streams (variant M3U8 files) can still be stored as static files. Preparing...
Read more >
m3u8 - Play from online URL - Apps on Google Play
m3u8 player is a simple video player application that can play any valid online video urls. It is capable of playing m3u8, hls,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found