Skip to content

Commit

Permalink
feat: added example debug
Browse files Browse the repository at this point in the history
  • Loading branch information
henri2h committed Apr 4, 2022
1 parent 6f9e622 commit c17107b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion example/lib/app/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class _ChewieDemoState extends State<ChewieDemo> {
}

List<String> srcs = [
"https://upload.wikimedia.org/wikipedia/commons/2/2c/Earth_rotation_during_Galileo_flyby_%28PIA00114%29_%28color-adjusted%29.webm",
"https://assets.mixkit.co/videos/preview/mixkit-daytime-city-traffic-aerial-view-56-large.mp4",
"https://assets.mixkit.co/videos/preview/mixkit-a-girl-blowing-a-bubble-gum-at-an-amusement-park-1226-large.mp4"
];
Expand Down Expand Up @@ -153,7 +154,10 @@ class _ChewieDemoState extends State<ChewieDemo> {

Future<void> toggleVideo() async {
await _videoPlayerController1.pause();
currPlayIndex = currPlayIndex == 0 ? 1 : 0;
currPlayIndex += 1;
if (currPlayIndex >= srcs.length) {
currPlayIndex = 0;
}
await initializePlayer();
}

Expand Down
6 changes: 5 additions & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ dependencies:
flutter:
sdk: flutter
provider: ^6.0.1
video_player: ^2.2.7
video_player:
git:
url: https://github.com/henri2h/plugins.git
ref: henri/enhance-seeking-mechanism-test
path: packages/video_player/video_player
wakelock: ^0.6.1+1
very_good_analysis: ^2.4.0

Expand Down

0 comments on commit c17107b

Please sign in to comment.