Skip to content
pubscout

better_native_video_player

1.9.2, released 3 days ago by an unverified publisher

Native AVPlayer and ExoPlayer video player for iOS and Android with custom Flutter overlays.

Uses material_ui
$ flutter pub add better_native_video_player
Source repository

What it does

Plays HLS, MP4, and local video files using true native decoders (AVPlayer on iOS and ExoPlayer on Android) while allowing custom Flutter UI overlays. It supports features like PiP, Chromecast, AirPlay, background audio, DRM, and offline downloads.

AI-written summary of version 1.8.1, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need robust native video playback (HLS, DRM, adaptive streaming) on iOS and Android.
  • You want to build custom video controls or overlays entirely in Flutter.
  • You require advanced features like Picture-in-Picture, AirPlay, Chromecast, and background audio.

Skip it when

  • You need web or desktop video playback capabilities.
  • You want a completely pre-styled, zero-config default video UI out of the box.

Strengths

  • Leverages true native players (AVPlayer and ExoPlayer) for decoding and buffering.
  • Comprehensive feature set including HLS, DRM, Chromecast, AirPlay, PiP, and background playback.
  • Allows complete customization of the controls and overlay via Flutter widgets.

Weaknesses

  • Playback is limited to iOS and Android only (not supported on web or desktop).
  • Requires platform-specific configuration for background modes and permissions.

Setup

Kind
Plugin (native code)
Effort
Medium
Code generation
No
Direct dependencies
2

Requires iOS background mode configuration (audio, picture-in-picture) and optional local network permissions for Chromecast discovery in Info.plist.

import 'package:better_native_video_player/better_native_video_player.dart';
import 'package:flutter/material.dart';

class VideoPage extends StatefulWidget {
  const VideoPage({super.key});

  @override
  State<VideoPage> createState() => _VideoPageState();
}

class _VideoPageState extends State<VideoPage> {
  final _controller = NativeVideoPlayerController(id: 1, autoPlay: true);

  @override
  void initState() {
    super.initState();
    _start();
  }

  Future<void> _start() async {
    await _controller.initialize();
    await _controller.load(
      url: 'https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8',
    );
  }

  @override
  void dispose() {
    _controller.dispose();
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return AspectRatio(
      aspectRatio: 16 / 9,
      child: NativeVideoPlayer(controller: _controller),
    );
  }
}

Alternatives

Packages that do the same job and could replace better_native_video_player.

  • video_player

    You prefer the official Flutter team's standard video plugin with simpler setup.

  • just_audio

    You are building an audio-first app rather than a video player.

Works with

Packages commonly used together with better_native_video_player: ones it builds on, ones built on it, and its own family.