-
-
Notifications
You must be signed in to change notification settings - Fork 41
Closed
Labels
bugSomething isn't working correctlySomething isn't working correctlyquestionFurther information is requestedFurther information is requested
Description
Is there an existing issue for this?
- I have searched the existing issues
Bug Description
Package: cached_video_player_plus: ^4.0.0
Platform: Android (tested on Samsung SM-F127G, Android 13)
🐞 Problem
When attempting to play a video from a local file path using:
_player = CachedVideoPlayerPlus.file(File(videoPath));
The player throws this error:
PlatformException(VideoError, Video player had error androidx.media3.exoplayer.ExoPlaybackException: Source error, null, null)
However, videos from network URLs work perfectly.
Steps to Reproduce
use _player = CachedVideoPlayerPlus.file(File(videoPath));
await _player?.initialize();
Package Version
4.0.0
Platform(s)
Android, iOS
Flutter Channel
stable
Flutter Doctor Output
[✓] Flutter (Channel stable, 3.32.5, on macOS 15.4 24E248 darwin-x64, locale en-IN) [1,918ms]
• Flutter version 3.32.5 on channel stable at /Users/dreamworld/fvm/versions/3.32.5
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision fcf2c11572 (3 weeks ago), 2025-06-24 11:44:07 -0700
• Engine revision dd93de6fb1
• Dart version 3.8.1
• DevTools version 2.45.1
[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0) [5.3s]
• Android SDK at /Users/dreamworld/Library/Android/sdk
• Platform android-35, build-tools 35.0.0
• Java binary at: /Library/Java/JavaVirtualMachines/jdk-17.0.1.jdk/Contents/Home/bin/java
This JDK is specified in your Flutter configuration.
To change the current JDK, run: `flutter config --jdk-dir="path/to/jdk"`.
• Java version Java(TM) SE Runtime Environment (build 17.0.1+12-LTS-39)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 16.0) [4.9s]
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 16A242d
• CocoaPods version 1.16.2
[✓] Chrome - develop for the web [28ms]
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2024.2) [27ms]
• 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 21.0.3+-79915915-b509.11)
[✓] Connected device (3 available) [7.3s]
• SM F127G (mobile) • RZ8T306NGZW • android-arm64 • Android 13 (API 33)
• macOS (desktop) • macos • darwin-x64 • macOS 15.4 24E248 darwin-x64
• Chrome (web) • chrome • web-javascript • Google Chrome 138.0.7204.101
! Error: Browsing on the local area network for Ankit’s iPhone. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac.
The device must be opted into Developer Mode to connect wirelessly. (code -27)
! Error: Browsing on the local area network for iPhone XR White. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac.
The device must be opted into Developer Mode to connect wirelessly. (code -27)
[✓] Network resources [1,487ms]
• All expected network resources are available.Minimal Reproduction Code
_player = widget.isFile
? CachedVideoPlayerPlus.file(
File(widget.videoUrl),
)
: CachedVideoPlayerPlus.networkUrl(
Uri.parse(widget.videoUrl),
invalidateCacheIfOlderThan: const Duration(days: 2),
);
await _player?.initialize().then(
(value) {
_chewieController = ChewieController(
videoPlayerController: _player!.controller,
aspectRatio: _player!.controller.value.aspectRatio,
allowMuting: true,
looping: true,
useRootNavigator: true,
autoInitialize: true,
showOptions: false,
deviceOrientationsAfterFullScreen: [
DeviceOrientation.portraitUp,
],
deviceOrientationsOnEnterFullScreen: [
DeviceOrientation.landscapeLeft,
DeviceOrientation.landscapeRight,
],
cupertinoProgressColors: ChewieProgressColors(
playedColor: AppColor.colorFFFFFF,
handleColor: AppColor.colorFFFFFF,
bufferedColor: AppColor.color3B3B3B,
),
materialProgressColors: ChewieProgressColors(
playedColor: AppColor.colorFFFFFF,
handleColor: AppColor.colorFFFFFF,
bufferedColor: AppColor.color3B3B3B,
),
);
},
);Relevant Log Output
PlatformException(VideoError, Video player had error androidx.media3.exoplayer.ExoPlaybackException: Source error, null, null)Device Information
Android (tested on Samsung SM-F127G, Android 13)Additional Context
No response
Would you like to work on this issue?
- I'm interested in working on this issue
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't working correctlySomething isn't working correctlyquestionFurther information is requestedFurther information is requested