Open Hackoak opened 1 year ago
Hi @Hackoak, Thank you for your feedback, currently the package doesn't support playing local m3u8 files, it only supports network URLs. However, we will have a research for this issue and if there is any update for the package we will notify you asap and if not we will provide the reason.
I am facing an issue with playing the local m3u8 file on both Android & iOS. I tried on both assets & the direct file that path point to local getExternalStorageDirectory() & getApplicationDocumentsDirectory() directories;
Logs listed below
On Android
I/flutter (22508): Parsed url data end : playlist.m3u8 I/flutter (22508): --- Current Video Status --- I/flutter (22508): offline : true I/flutter (22508): --- :3 Done url check --- I/flutter (22508): --- Player status --- I/flutter (22508): play url : assets/m3u8/playlist.m3u8 I/flutter (22508): offline : true I/flutter (22508): --- start playing ––– I/ExoPlayerImpl(22508): Release 7528ab3 [ExoPlayerLib/2.18.1] [generic_x86_arm, AOSP on IA Emulator, Google, 28] [goog.exo.core, goog.exo.exoplayer, goog.exo.decoder, goog.exo.hls, goog.exo.datasource] I/ExoPlayerImpl(22508): Release 8c90d1e [ExoPlayerLib/2.18.1] [generic_x86_arm, AOSP on IA Emulator, Google, 28] [goog.exo.core, goog.exo.exoplayer, goog.exo.decoder, goog.exo.hls, goog.exo.datasource] I/System.out(22508): Keeping screen on I/ExoPlayerImpl(22508): Init 101ca94 [ExoPlayerLib/2.18.1] [generic_x86_arm, AOSP on IA Emulator, Google, 28] I/Choreographer(22508): Skipped 30 frames! The application may be doing too much work on its main thread. I/flutter (22508): Parsed url data end : playlist.m3u8 I/flutter (22508): --- Current Video Status --- I/flutter (22508): offline : true I/flutter (22508): --- :3 Done url check --- I/flutter (22508): --- Player status --- I/flutter (22508): play url : assets/m3u8/playlist.m3u8 I/flutter (22508): offline : true I/flutter (22508): --- start playing ––– I/System.out(22508): Keeping screen on I/ExoPlayerImpl(22508): Init 762388a [ExoPlayerLib/2.18.1] [generic_x86_arm, AOSP on IA Emulator, Google, 28] E/ExoPlayerImplInternal(22508): Playback error E/ExoPlayerImplInternal(22508): com.google.android.exoplayer2.ExoPlaybackException: Source error E/ExoPlayerImplInternal(22508): at com.google.android.exoplayer2.ExoPlayerImplInternal.handleIoException(ExoPlayerImplInternal.java:632) E/ExoPlayerImplInternal(22508): at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:604) E/ExoPlayerImplInternal(22508): at android.os.Handler.dispatchMessage(Handler.java:102) E/ExoPlayerImplInternal(22508): at android.os.Looper.loop(Looper.java:193) E/ExoPlayerImplInternal(22508): at android.os.HandlerThread.run(HandlerThread.java:65) E/ExoPlayerImplInternal(22508): Caused by: com.google.android.exoplayer2.upstream.FileDataSource$FileDataSourceException: java.io.FileNotFoundException: /assets/m3u8/playlist.m3u8: open failed: ENOENT (No such file or directory) E/ExoPlayerImplInternal(22508): at com.google.android.exoplayer2.upstream.FileDataSource.openLocalFile(FileDataSource.java:201) E/ExoPlayerImplInternal(22508): at com.google.android.exoplayer2.upstream.FileDataSource.open(FileDataSource.java:112) E/ExoPlayerImplInternal(22508): at com.google.android.exoplayer2.upstream.DefaultDataSource.open(DefaultDataSource.java:258) E/ExoPlayerImplInternal(22508): at com.google.android.exoplayer2.upstream.StatsDataSource.open(StatsDataSource.java:84) E/ExoPlayerImplInternal(22508): at com.google.android.exoplayer2.upstream.DataSourceInputStream.checkOpened(DataSourceInputStream.java:99)
On IOS
flutter: Parsed url data end : playlist.m3u8 flutter: --- Current Video Status --- offline : true --- :3 Done url check --- flutter: --- Player status --- play url : assets/m3u8/playlist.m3u8 offline : true --- start playing ––– flutter: PlatformException(VideoError, Failed to load video: The operation couldn’t be completed. (CoreMediaErrorDomain error -12865.), null, null)
Usage
Hope these logs will help to solve this issue. Once again thanks for solving the issue I reported yesterday, Thank you!