forked from md-siam/package_of_the_day
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvideo_player.dart
More file actions
43 lines (39 loc) · 1.25 KB
/
Copy pathvideo_player.dart
File metadata and controls
43 lines (39 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import 'package:flutter/material.dart';
import 'package:video_player/video_player.dart';
import 'player_widget.dart';
class MyVideoPlayer extends StatelessWidget {
const MyVideoPlayer({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.deepPurple[100],
appBar: AppBar(
title: const Text('Video Player'),
),
body: Column(
children: [
VideoPlayerWidget(
isLooping: true,
isMute: false,
videoPlayerController: VideoPlayerController.network(
'https://flutter.github.io/assets-for-api-docs/assets/videos/bee.mp4',
/// Set `mixWithOthers: true` for playing multiple videos
/// simultaneously
///
videoPlayerOptions: VideoPlayerOptions(mixWithOthers: true),
),
),
const SizedBox(height: 30),
VideoPlayerWidget(
isLooping: true,
isMute: true,
videoPlayerController: VideoPlayerController.asset(
'assets/videos/bullfinch.mp4',
videoPlayerOptions: VideoPlayerOptions(mixWithOthers: true),
),
),
],
),
);
}
}