diff --git a/lib/src/widgets/video_app.dart b/lib/src/widgets/video_app.dart index 9598c27a..f66aaa26 100644 --- a/lib/src/widgets/video_app.dart +++ b/lib/src/widgets/video_app.dart @@ -18,7 +18,9 @@ class _VideoAppState extends State { void initState() { super.initState(); - _controller = VideoPlayerController.asset(widget.videoUrl) + _controller = widget.videoUrl.startsWith('http') + ? VideoPlayerController.network(widget.videoUrl) + : VideoPlayerController.asset(widget.videoUrl) ..initialize().then((_) { // Ensure the first frame is shown after the video is initialized, // even before the play button has been pressed.