-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
flutter/plugins
#1552Labels
c: crashStack traces logged to the consoleStack traces logged to the consolep: video_playerThe Video Player pluginThe Video Player pluginpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.
Description
I upgraded to this version of the plugin and on iOS on an iPhone 8+ I am getting:
[ +391 ms] [VERBOSE-2:dart_error.cc(16)] Unhandled exception:
[ ] Bad state: Future already completed
[ ] #0 _AsyncCompleter.complete (dart:async/future_impl.dart:39:31)
[ ] #1 VideoPlayerController.initialize.eventListener (package:video_player/video_player.dart:227:33)
[ ] #2 _RootZone.runUnaryGuarded (dart:async/zone.dart:1316:10)
[ ] #3 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)
[ ] #4 _DelayedData.perform (dart:async/stream_impl.dart:584:14)
[ ] #5 _StreamImplEvents.handleNext (dart:async/stream_impl.dart:700:11)
[ ] #6 _PendingEvents.schedule.<anonymous closure> (dart:async/stream_impl.dart:660:7)
[ ] #7 _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
[ ] #8 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
I don't see any particular problems, but my customer on his iPhone 6 cannot see the streaming video until the first redraw of the video player (e.g. turning it landscape). I need the video to start playing as soon a possible, but this does not seem to affect this exception, it is always thrown. the initState method is:
_controller = new VideoPlayerController.network(
event.cameras[0].url,
)
..addListener(() {
final bool isPlaying = _controller.value.isPlaying;
if (isPlaying != _isPlaying) {
setState(() {
_isPlaying = isPlaying;
});
}
if (_controller.value.hasError) {
print("error: ${_controller.value.errorDescription}");
}
})
..initialize().then((_) {
setState(() {
_controller.play();
});
});and the video player creation is straight from the example.
darioxtx, diegoveloper, PierLuca93, mbenci, eminden and 11 more
Metadata
Metadata
Assignees
Labels
c: crashStack traces logged to the consoleStack traces logged to the consolep: video_playerThe Video Player pluginThe Video Player pluginpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.