Skip to content

Commit 75424d9

Browse files
committed
Complete 0.4v
2 parents a9948d7 + c07c0b1 commit 75424d9

27 files changed

+924
-312
lines changed

.vscode/launch.json

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "Flutter",
9+
"request": "launch",
10+
"type": "dart"
11+
}
12+
]
13+
}

CHANGELOG.md

+19-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,26 @@
1-
## [0.1.0] - Spring.
1+
## [0.4.0] - Permanence.
22

3-
* Added `IQScreen` class that enable user to use a plyer as a screen.
3+
* Support `Html` & `Css` styles.
4+
* Fixed player bugs.
5+
* Enhance code logic.
6+
* Provide a dartdoc comments for all package.
7+
8+
## [0.3.0-beta.1] - Frost.
9+
10+
* Added `IQTheme` to customization your ui.
11+
* Fixed bugs with forward & backward.
12+
* Enhance code logic.
13+
14+
## [0.2.1] - Storm.
15+
16+
* Edit Readme file.
417

518
## [0.2.0] - Storm.
619

720
* Added `SubtitleProvider` class that enable user to use a subtitle from files, assets, network, string.
821
* Added `IQParser` class to display subtitle data.
922
* Added `SubtitleBloc` class to use with `IQParser`.
23+
24+
## [0.1.0] - Spring.
25+
26+
* Added `IQScreen` class that enable user to use a plyer as a screen.

README.md

+72-6
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,21 @@ Simple video player with subtitle wrote for Flutter.
1010
1111
> Proudly based on [BLoC](https://pub.dev/packages/flutter_bloc).
1212
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+
1416
## 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.
1820
4. [x] Support Subtitles:
1921
1. [x] VTT format
2022
2. [ ] SRT format
2123
3. [ ] User define format
2224
5. [x] **IQScreen:** a video player scaffold screen.
2325
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.
2528

2629

2730
# Installation
@@ -98,6 +101,21 @@ BlocProvider<SubtitleBloc>(
98101
);
99102
```
100103

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+
101119
# Using
102120

103121
1. Start using `IQScreen` with Navigator:
@@ -142,9 +160,38 @@ class MyParser extends StatelessWidget {
142160
143161
> Note: What is the reason for creating `MyParser`? [see this](https://bloclibrary.dev/#/faqs?id=blocproviderof-fails-to-find-bloc)
144162
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+
145191
# Example
146192
```dart
147193
import 'package:flutter/material.dart';
194+
import 'package:flutter_spinkit/flutter_spinkit.dart';
148195
import 'package:iqplayer/iqplayer.dart';
149196
150197
void main() {
@@ -190,7 +237,26 @@ class MyHomePage extends StatelessWidget {
190237
'https://d11b76aq44vj33.cloudfront.net/media/720/video/5def7824adbbc.mp4',
191238
),
192239
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+
},
194260
),
195261
),
196262
),

example/lib/main.dart

+64-19
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import 'package:flutter/material.dart';
2+
import 'package:flutter_spinkit/flutter_spinkit.dart';
23
import 'package:iqplayer/iqplayer.dart';
34

45
void main() {
@@ -31,27 +32,71 @@ class MyHomePage extends StatelessWidget {
3132
title: Text(title),
3233
),
3334
body: Center(
34-
child: RaisedButton(
35-
child: Text('Open IQPlayer'),
36-
onPressed: () {
37-
Navigator.push(
38-
context,
39-
MaterialPageRoute(
40-
builder: (BuildContext context) => IQScreen(
41-
title: title,
42-
description: 'Simple video as a demo video',
43-
videoPlayerController: VideoPlayerController.network(
44-
'https://d11b76aq44vj33.cloudfront.net/media/720/video/5def7824adbbc.mp4',
45-
),
46-
subtitleProvider: SubtitleProvider.fromNetwork(
47-
'https://duoidi6ujfbv.cloudfront.net/media/0/subtitles/5675420c9d9a3.vtt'
35+
child: Column(
36+
children: [
37+
RaisedButton(
38+
child: Text('Open IQPlayer'),
39+
onPressed: () {
40+
Navigator.push(
41+
context,
42+
MaterialPageRoute(
43+
builder: (BuildContext context) => IQScreen(
44+
title: title,
45+
description: 'Simple video as a demo video',
46+
videoPlayerController: VideoPlayerController.network(
47+
'https://d11b76aq44vj33.cloudfront.net/media/720/video/5def7824adbbc.mp4',
48+
),
49+
subtitleProvider: SubtitleProvider.fromString(
50+
"""WEBVTT
51+
52+
00:00:00.650 --> 00:00:03.000
53+
<p style="color:blue">Hello World</p>
54+
55+
00:00:03.024 --> 00:00:07.524
56+
<i>Mindmarker je krátká zpráva formou
57+
videa, souborů PDF...</i>
58+
59+
00:00:07.548 --> 00:00:12.448
60+
<span style='color:brown'>colorful</span>
61+
62+
00:00:12.472 --> 00:00:16.072
63+
Mindmarker budeš obdržovat
64+
ve specifický chvílích...
65+
66+
00:00:16.100 --> 00:00:20.100
67+
abychom lépe utužili tvé znalosti.""",
68+
),
69+
// subtitleProvider: SubtitleProvider.fromNetwork(
70+
// 'https://duoidi6ujfbv.cloudfront.net/media/0/subtitles/5675420c9d9a3.vtt'),
71+
iqTheme: IQTheme(
72+
loadingProgress: SpinKitCircle(
73+
color: Colors.red,
74+
),
75+
playButtonColor: Colors.transparent,
76+
videoPlayedColor: Colors.indigo,
77+
playButton: (BuildContext context, bool isPlay,
78+
AnimationController animationController) {
79+
if (isPlay)
80+
return Icon(
81+
Icons.pause_circle_filled,
82+
color: Colors.red,
83+
size: 50,
84+
);
85+
return Icon(
86+
Icons.play_circle_outline,
87+
color: Colors.red,
88+
size: 50,
89+
);
90+
},
91+
),
92+
),
4893
),
49-
),
50-
),
51-
);
52-
},
94+
);
95+
},
96+
),
97+
],
5398
),
5499
),
55100
);
56101
}
57-
}
102+
}

0 commit comments

Comments
 (0)