native_cast_player 0.1.0
native_cast_player: ^0.1.0 copied to clipboard
Native video player with YouTube-style AirPlay casting on iOS: AVPlayer external playback, paused-frame keep-alive for third-party TVs. Chromecast planned.
import 'package:flutter/material.dart';
import 'player_screen.dart';
/// Public HLS test stream (Big Buck Bunny) served over HTTPS, so no App
/// Transport Security exceptions are needed in Info.plist.
const String kTestStreamUrl =
'https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8';
void main() {
runApp(const NativeCastPlayerExampleApp());
}
class NativeCastPlayerExampleApp extends StatelessWidget {
const NativeCastPlayerExampleApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Native Cast Player',
debugShowCheckedModeBanner: false,
theme: ThemeData(
useMaterial3: true,
brightness: Brightness.dark,
colorSchemeSeed: Colors.red,
scaffoldBackgroundColor: const Color(0xFF0F0F0F),
appBarTheme: const AppBarTheme(backgroundColor: Colors.black),
),
home: const PlayerScreen(
videoUrl: kTestStreamUrl,
title: 'Big Buck Bunny — HLS test stream',
),
);
}
}