Future initializePlayer() async {
videoController = VideoPlayerController.networkUrl(Uri.parse(widget.url));
await Future.wait([videoController.initialize()]);
chewieController = ChewieController(
videoPlayerController: videoController,
aspectRatio: widget.aspectRatio,
autoPlay: widget.autoPlay,
looping: widget.looping,
isLive: true,
showOptions: false,
// useRootNavigator: false,
// controlsSafeAreaMinimum: EdgeInsets.fromLTRB(0, 0, 0, 20),
allowPlaybackSpeedChanging: false,
allowMuting: false, //声音
// placeholder: placeHolder,
materialProgressColors: progressColors,
customControls: const MaterialControls(
showPlayButton: true,
));
setState(() {});
}