@@ -66,24 +66,30 @@ class _VideoWidgetState extends State<VideoWidget> {
66
66
_videoController = VideoPlayerController .asset (sourceUri.path);
67
67
break ;
68
68
case 'file' :
69
- _videoController = VideoPlayerController .file (File .fromUri (sourceUri));
69
+ _videoController =
70
+ VideoPlayerController .file (File .fromUri (sourceUri));
70
71
break ;
71
72
default :
72
- _videoController = VideoPlayerController .network (sourceUri.toString ());
73
+ _videoController =
74
+ VideoPlayerController .network (sourceUri.toString ());
73
75
break ;
74
76
}
75
77
_chewieController = ChewieController (
76
78
videoPlayerController: _videoController! ,
77
- placeholder: attributes['poster' ] != null && attributes['poster' ]! .isNotEmpty
78
- ? Image .network (attributes['poster' ]! )
79
- : Container (color: Colors .black),
79
+ placeholder:
80
+ attributes['poster' ] != null && attributes['poster' ]! .isNotEmpty
81
+ ? Image .network (attributes['poster' ]! )
82
+ : Container (color: Colors .black),
80
83
autoPlay: attributes['autoplay' ] != null ,
81
84
looping: attributes['loop' ] != null ,
82
85
showControls: attributes['controls' ] != null ,
83
86
autoInitialize: true ,
84
- aspectRatio: _width == null || _height == null ? null : _width! / _height! ,
85
- deviceOrientationsOnEnterFullScreen: widget.deviceOrientationsOnEnterFullScreen,
86
- deviceOrientationsAfterFullScreen: widget.deviceOrientationsAfterFullScreen,
87
+ aspectRatio:
88
+ _width == null || _height == null ? null : _width! / _height! ,
89
+ deviceOrientationsOnEnterFullScreen:
90
+ widget.deviceOrientationsOnEnterFullScreen,
91
+ deviceOrientationsAfterFullScreen:
92
+ widget.deviceOrientationsAfterFullScreen,
87
93
);
88
94
widget.callback? .call (
89
95
widget.context.tree.element, _chewieController! , _videoController! );
0 commit comments