web_video_player 0.0.1-dev.1 web_video_player: ^0.0.1-dev.1 copied to clipboard
A Flutter Web Video Player
import 'package:flutter/material.dart';
import 'package:web_video_player/player.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Web Video Player',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: const MyHome(),
);
}
}
class MyHome extends StatelessWidget {
const MyHome({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Media Collection Previewer'),
),
body: const Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
WebVideoPlayer(
url:
'https://flutter.github.io/assets-for-api-docs/assets/videos/butterfly.mp4',
autoPlay: true,
),
],
),
),
);
}
}