Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Do not initialize twice
  • Loading branch information
cbenhagen committed Jan 20, 2019
commit a16cabdcaf75dc7d6fb00cca2a5670fdc9622c45
3 changes: 2 additions & 1 deletion lib/src/chewie_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ class ChewieController extends ChangeNotifier {
Future _initialize() async {
await videoPlayerController.setLooping(looping);

if (autoInitialize || autoPlay) {
if ((autoInitialize || autoPlay) &&
!videoPlayerController.value.initialized) {
await videoPlayerController.initialize();
}

Expand Down