core_video_player 1.1.1 copy "core_video_player: ^1.1.1" to clipboard
core_video_player: ^1.1.1 copied to clipboard

PlatformAndroid

A customizable video player widget for Flutter. Playback controls (play/pause, seek, forward/rewind 10s, speed, resolution switching) and other features.

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.

pub Stars


Android iOS macOS Web
Support SDK 24+ 13.0+ 10.15+ Any*

The example app running in iOS

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 #

  • ✅ Playback controls
  • ✅ Fullscreen (does not control device rotation)
  • ✅ Picture-in-picture (Android only)
  • ✅ Subtitles
  • ✅ Keep screen on during playback
  • ✅ Connectivity check and automatic reconnection
  • ✅ Chromecast (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
0
likes
150
points
33
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A customizable video player widget for Flutter. Playback controls (play/pause, seek, forward/rewind 10s, speed, resolution switching) and other features.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

async, audio_video_progress_bar, connectivity_plus, floating, flutter, http, keep_screen_on, platform, video_player

More

Packages that depend on core_video_player