@@ -10,18 +10,21 @@ Simple video player with subtitle wrote for Flutter.
10
10
11
11
> Proudly based on [ BLoC] ( https://pub.dev/packages/flutter_bloc ) .
12
12
13
- ![ Screenshot_1588590912] ( https://user-images.githubusercontent.com/33749659/80967088-75847700-8e1e-11ea-83fc-db6d4c056f26.png )
13
+
14
+ ![ Screenshot_1589120660] ( https://user-images.githubusercontent.com/33749659/81501966-bdeed980-92e3-11ea-88b5-365cfe93bd1a.png )
15
+
14
16
## Features
15
- 1 . [x] Play videos from assets, files, network by ` VideoPlayerController ` from video_player.
16
- 2 . [x] Parse subtitles from assets, files, network ` SubtitleProvider ` class.
17
- 3 . [ ] Custom theme you can use with ` IQTheme ` class.
17
+ 1 . [x] Play video from Assets, Files, Network by ` VideoPlayerController ` from video_player.
18
+ 2 . [x] Parse subtitles from Assets, Files, Network ` SubtitleProvider ` class.
19
+ 3 . [x ] Custom theme you can use with ` IQTheme ` class.
18
20
4 . [x] Support Subtitles:
19
21
1 . [x] VTT format
20
22
2 . [ ] SRT format
21
23
3 . [ ] User define format
22
24
5 . [x] ** IQScreen:** a video player scaffold screen.
23
25
6 . [ ] ** IQPlayer:** a widget enable you to watch video implement with your screen.
24
- 7 . [x] ** IQParser:** a subtitle package that view subtitles, included the widget and parser
26
+ 7 . [x] ** IQParser:** a subtitle package that view subtitles, included the widget and parser.
27
+ 8 . [x] ** IQTheme:** to make your customizations on player ui and make it more integrated with your own app.
25
28
26
29
27
30
# Installation
@@ -98,6 +101,21 @@ BlocProvider<SubtitleBloc>(
98
101
);
99
102
```
100
103
104
+
105
+ 4 . ** IQTheme:**
106
+ > Note: You can customize your theme on ` IQScreen ` , ` IQPlayer ` or ` IQParser ` with this class.
107
+
108
+ > You have +17 option to customize theme!
109
+
110
+ ``` dart
111
+ IQScreen(
112
+ ...
113
+ iqTheme: IQTheme(
114
+ ...
115
+ ),
116
+ );
117
+ ```
118
+
101
119
# Using
102
120
103
121
1 . Start using ` IQScreen ` with Navigator:
@@ -142,9 +160,38 @@ class MyParser extends StatelessWidget {
142
160
143
161
> Note: What is the reason for creating ` MyParser ` ? [ see this] ( https://bloclibrary.dev/#/faqs?id=blocproviderof-fails-to-find-bloc )
144
162
163
+
164
+ 3 . You can use ` IQTheme ` to customize ui like:
165
+
166
+ > You have +17 option to customize theme!
167
+
168
+ ``` dart
169
+ IQTheme(
170
+ loadingProgress: SpinKitCircle(
171
+ color: Colors.red,
172
+ ),
173
+ playButtonColor: Colors.transparent,
174
+ videoPlayedColor: Colors.indigo,
175
+ playButton: (bool isPlay) {
176
+ if (isPlay)
177
+ return Icon(
178
+ Icons.pause_circle_filled,
179
+ color: Colors.red,
180
+ size: 50,
181
+ );
182
+ return Icon(
183
+ Icons.play_circle_outline,
184
+ color: Colors.red,
185
+ size: 50,
186
+ );
187
+ },
188
+ );
189
+ ```
190
+
145
191
# Example
146
192
``` dart
147
193
import 'package:flutter/material.dart';
194
+ import 'package:flutter_spinkit/flutter_spinkit.dart';
148
195
import 'package:iqplayer/iqplayer.dart';
149
196
150
197
void main() {
@@ -190,7 +237,26 @@ class MyHomePage extends StatelessWidget {
190
237
'https://d11b76aq44vj33.cloudfront.net/media/720/video/5def7824adbbc.mp4',
191
238
),
192
239
subtitleProvider: SubtitleProvider.fromNetwork(
193
- 'https://duoidi6ujfbv.cloudfront.net/media/0/subtitles/5675420c9d9a3.vtt'
240
+ 'https://duoidi6ujfbv.cloudfront.net/media/0/subtitles/5675420c9d9a3.vtt'),
241
+ iqTheme: IQTheme(
242
+ loadingProgress: SpinKitCircle(
243
+ color: Colors.red,
244
+ ),
245
+ playButtonColor: Colors.transparent,
246
+ videoPlayedColor: Colors.indigo,
247
+ playButton: (bool isPlay) {
248
+ if (isPlay)
249
+ return Icon(
250
+ Icons.pause_circle_filled,
251
+ color: Colors.red,
252
+ size: 50,
253
+ );
254
+ return Icon(
255
+ Icons.play_circle_outline,
256
+ color: Colors.red,
257
+ size: 50,
258
+ );
259
+ },
194
260
),
195
261
),
196
262
),
0 commit comments