react-native-media-kit
react-native-media-kit copied to clipboard
HLS playback fails on Android
I'm getting this issue when trying to playback HLS stream
E/AndroidRuntime(15786): java.lang.NoSuchMethodError: No direct method
(ZLcom/google/android/exoplayer/upstream/DataSource;Ljava/lang/String;Lcom/google/android/exoplayer/hls/HlsPlaylist;Lcom/google/android/exoplayer/hls/HlsTrackSelector;Lcom/google/android/exoplayer/upstream/BandwidthMeter;Lcom/google/android/exoplayer/hls/PtsTimestampAdjusterProvider;I)V in class Lcom/google/android/exoplayer/hls/HlsChunkSource; or its super classes (declaration of 'com.google.android.exoplayer.hls.HlsChunkSource' appears in /data/app/com.test-2/base.apk) E/AndroidRuntime(15786): at com.greatdroid.reactnative.media.player.trackrenderer.HlsRenderersBuilder.onSingleManifest(HlsRenderersBuilder.java:97) E/AndroidRuntime(15786): at com.greatdroid.reactnative.media.player.trackrenderer.HlsRenderersBuilder.onSingleManifest(HlsRenderersBuilder.java:39) E/AndroidRuntime(15786): at com.google.android.exoplayer.util.ManifestFetcher$SingleFetchHelper.onLoadCompleted(ManifestFetcher.java:378) E/AndroidRuntime(15786): at com.google.android.exoplayer.upstream.Loader$LoadTask.handleMessage(Loader.java:245) E/AndroidRuntime(15786): at android.os.Handler.dispatchMessage(Handler.java:102) E/AndroidRuntime(15786): at android.os.Looper.loop(Looper.java:135) E/AndroidRuntime(15786): at android.app.ActivityThread.main(ActivityThread.java:5430) E/AndroidRuntime(15786): at java.lang.reflect.Method.invoke(Native Method) E/AndroidRuntime(15786): at java.lang.reflect.Method.invoke(Method.java:372) E/AndroidRuntime(15786): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:913) E/AndroidRuntime(15786): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:706)
Btw very nice lib! I've used my custom based on exoplayer which covered android only
@undef1ned Could you pls post your test device and your hls url here? I've just tested on a Galaxy S6 using "https://devimages.apple.com.edgekey.net/streaming/examples/bipbop_4x3/bipbop_4x3_variant.m3u8", which seems playing well.
@ldn0x7dc I'm testing it on LG G4, the link above still crashes the app with the same exception. The only problem I've realised - I'm running it on RN 0.26.3 so probably that's the issue, but I actually I don't think so.
@undef1ned The RN version is irrelevant. So what is the Android version of your LG G4? On some android 4.x devices, Exoplayer does not work well.
@ldn0x7dc It's android 5.1. My own exoplayer module worked well even on Android 4.1.2
@undef1ned Well, I'll look into it. Your help is welcome to review my native exoplayer module!
rtmp and m3u8 no load :(
still facing the same problem while loading the video on my emulator 5.1 sdk
@sathi-007 Did you find any fix for this issue ? I am facing a similar issue