jhomlala / betterplayer

Better video player for Flutter, with multiple configuration options. Solving typical use cases!
Apache License 2.0
932 stars 1.04k forks source link

[BUG] Pre caching video on Android is not more than 0% progress #1162

Open nicolasalves-attri opened 1 year ago

nicolasalves-attri commented 1 year ago

Hello friend,

I have this problem when using Pre Cache on Android, I tried with the exact same package as it is here in the repository, I just had to update Gradle to version 1.7.10, as it was not compiling.

It turns out that when I request the Pre Cache of the video, I only receive an image that has been completed, and it does not show any more errors in the log.

02-01 23:01:49.479 D/CacheWorker(13049): Completed pre cache of http://sample.vodobox.com/skate_phantom_flex_4k/skate_phantom_flex_4k.m3u8: 0%

02-01 23:01:49.483 I/WM-WorkerWrapper(13049): Worker result SUCCESS for Work [ id=4df58d41-625c-4181-94d9-ebe3161b9fbc, tags={ com.jhomlala.better_player.CacheWorker, http://sample.vodobox.com/skate_phantom_flex_4k/skate_phantom_flex_4k.m3u8 } ]

I tested it on the emulator and also on two physical devices, both showed the same message.

Flutter doctor

[✓] Flutter (Channel main, 3.7.0-31.0.pre.9, on macOS 13.1 22C65 darwin-arm64, locale pt-BR) • Flutter version 3.7.0-31.0.pre.9 on channel main at /Users/nicolas/Dev/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 7477d7ac79 (2 days ago), 2023-01-30 16:00:18 -0500 • Engine revision 396c7fd0bd • Dart version 3.0.0 (build 3.0.0-179.0.dev) • DevTools version 2.20.1

[✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1) • Android SDK at /Users/nicolas/Library/Android/sdk • Platform android-33, build-tools 32.1.0-rc1 • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840) • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.1) • Xcode at /Applications/Xcode.app/Contents/Developer • Build 14B47b • CocoaPods version 1.11.3

[✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.2) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)

[✓] VS Code (version 1.74.3) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.58.0

[✓] Connected device (3 available) • SM G570M (mobile) • 42003e87007625d9 • android-arm • Android 8.0.0 (API 26) • macOS (desktop) • macos • darwin-arm64 • macOS 13.1 22C65 darwin-arm64 • Chrome (web) • chrome • web-javascript • Google Chrome 109.0.5414.119

[✓] HTTP Host Availability • All required HTTP hosts are available

• No issues found!

Better Player version

Is anyone already going through this? Thanks!