Core Video Player
A customizable video player widget for Flutter. Built on top of video_player, core_video_player provides a ready-made layout and controls, plus extra functionality such as fullscreen, picture-in-picture, subtitles, Chromecast hooks, and automatic reconnection handling.
| Android | iOS | macOS | Web | |
|---|---|---|---|---|
| Support | SDK 24+ | 13.0+ | 10.15+ | Any* |

Features
- Playback controls (play/pause, seek, forward/rewind 10s, speed, resolution switching)
- Fullscreen mode
- Picture-in-picture (Android only)
- Subtitles (SRT and WebVTT)
- Keeps the screen on during playback
- Automatic connectivity checks and reconnection
- Chromecast UI hooks (click and layout events only — connection and playback are handled through your own Cast integration)
- Fully customizable icon set
Getting started
Add core_video_player to your pubspec.yaml:
or
flutter pub add core_video_player
dependencies:
core_video_player: ^1.1.0
Then install the dependency:
flutter pub get
Usage
import 'package:core_video_player/core_video_player.dart';
// Create a controller.
final playerController = CorePlayerController.init();
// (Optional) Register callbacks for player events.
playerController.events = CorePlayerEvents(
onInitialized: (datasource) {},
onPlay: (state) {},
);
// Set the video to be played.
playerController.changeDatasource(
CorePlayerDatasource(
title: 'My video',
description: 'Video description',
hasNext: false,
hasPrev: false,
resolutions: {
CorePlayerResolution.p480: Uri.parse('https://example.com/video.mp4'),
},
),
);
// Render the player.
CorePlayer(playerController)
Customizing icons
The default icons can be overridden through CorePlayerConfig:
final playerController = CorePlayerController.init(
config: CorePlayerConfig(
icons: CorePlayerIcons(
arrow_back: CoreIconData(Icons.arrow_back_ios, size: 20, color: Colors.white),
),
),
);
Roadmap
xPlayback controlsxFullscreen (does not control device rotation)xPicture-in-picture (Android only)xSubtitlesxKeep screen on during playbackxConnectivity check and automatic reconnectionxChromecast (click and layout events only — connection and playback must be handled through your own integration)-Background playback (opt-in configuration)-Device rotation control (opt-in configuration)-Status bar controls (opt-in configuration)
Running the example
cd example
flutter run
Testing
For first-time users, install the very_good_cli:
dart pub global activate very_good_cli
To run all unit tests:
very_good test --coverage