hls_proplayer 0.0.5
hls_proplayer: ^0.0.5 copied to clipboard
A customizable Flutter video player with HLS support, quality selection, and fullscreen control.
example/lib/main.dart
import 'package:flutter/material.dart';
import 'package:hls_proplayer/hls_proplayer.dart';
void main() => runApp(const MaterialApp(home: PlayerDemo()));
class PlayerDemo extends StatelessWidget {
const PlayerDemo({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.black,
body: SafeArea(
child: HlsPlayer(
url:
'https://demo.unified-streaming.com/k8s/features/stable/video/tears-of-steel/tears-of-steel.ism/.m3u8',
title: 'Demo Video',
mode: Mode.recorded,
theme: PlayerTheme(iconColor: Colors.white),
// Optional custom builders
loadingBuilder: (ctx) => const CircularProgressIndicator(),
errorBuilder:
(ctx, err) => Text(
'Error: $err',
style: const TextStyle(color: Colors.red),
),
// Optional callbacks
onPlay: () => debugPrint('play'),
onPause: () => debugPrint('pause'),
onSeek: (pos) => debugPrint('seek to $pos'),
onQualityChanged: (q) => debugPrint('quality -> $q'),
onInitialized: () => debugPrint('initialized'),
),
),
);
}
}