m3u8 format not working.
dolphylimitinf opened this issue · 1 comments
Hi, I am developing an android app using this library I need to play certain video formats. But it works with mp4 and other formats but m3u8 format always generates an error. I used the below given code. Please reply asap. Thank you in advance!!
Code used :
Uri mp4VideoUri =Uri.parse("m3u8 link");
final MediaSource videoSource = new HlsMediaSource(mp4VideoUri, dataSourceFactory,
1,mainHandler,null);
final LoopingMediaSource loopingSource = new LoopingMediaSource(videoSource);
Error genearated :
07-28 11:51:41.530 32038-32038/com.ayalus.exoplayer2example E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.ayalus.exoplayer2example, PID: 32038
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/exoplayer2/source/AdaptiveMediaSourceEventListener$EventDispatcher;
at com.google.android.exoplayer2.source.hls.HlsMediaSource.(HlsMediaSource.java:78)
at com.google.android.exoplayer2.source.hls.HlsMediaSource.(HlsMediaSource.java:68)
at com.ayalus.exoplayer2example.MainActivity.onCreate(MainActivity.java:175)
at android.app.Activity.performCreate(Activity.java:6666)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2706)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2818)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1541)
at android.os.Handler.dispatchMessage(Handler.java:110)
at android.os.Looper.loop(Looper.java:203)
at android.app.ActivityThread.main(ActivityThread.java:6320)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1085)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:946)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.exoplayer2.source.AdaptiveMediaSourceEventListener$EventDispatcher" on path: DexPathList[[zip file "/data/app/com.ayalus.exoplayer2example-2/base.apk", zip file "/data/app/com.ayalus.exoplayer2example-2/split_lib_dependencies_apk.apk", zip file "/data/app/com.ayalus.exoplayer2example-2/split_lib_slice_0_apk.apk", zip file "/data/app/com.ayalus.exoplayer2example-2/split_lib_slice_1_apk.apk", zip file "/data/app/com.ayalus.exoplayer2example-2/split_lib_slice_2_apk.apk", zip file "/data/app/com.ayalus.exoplayer2example-2/split_lib_slice_3_apk.apk", zip file "/data/app/com.ayalus.exoplayer2example-2/split_lib_slice_4_apk.apk", zip file "/data/app/com.ayalus.exoplayer2example-2/split_lib_slice_5_apk.apk", zip file "/data/app/com.ayalus.exoplayer2example-2/split_lib_slice_6_apk.apk", zip file "/data/app/com.ayalus.exoplayer2example-2/split_lib_slice_7_apk.apk", zip file "/data/app/com.ayalus.exoplayer2example-2/split_lib_slice_8_apk.apk", zip file "/data/app/com.ayalus.exoplayer2example-2/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.ayalus.exoplayer2example-2/lib/arm64, /system/lib64, /vendor/lib64, /system/vendor/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at com.google.android.exoplayer2.source.hls.HlsMediaSource.(HlsMediaSource.java:78)
at com.google.android.exoplayer2.source.hls.HlsMediaSource.(HlsMediaSource.java:68)
at com.ayalus.exoplayer2example.MainActivity.onCreate(MainActivity.java:175)
at android.app.Activity.performCreate(Activity.java:6666)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2706)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2818)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1541)
at android.os.Handler.dispatchMessage(Handler.java:110)
at android.os.Looper.loop(Looper.java:203)
at android.app.ActivityThread.main(ActivityThread.java:6320)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1085)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:946)
Hi, And I need one more help regarding autoplay the next video one after the other.