VideoPlayerController _controller = VideoPlayerController.network('https://flutter.github.io/assets-for-api-docs/assets/videos/bee.mp4')
..initialize().then((_) {
// Ensure the first frame is shown after the video is initialized, even before the play button has been pressed.
});
Duration durationOfVideo = _controller.value.duration;
2条答案
按热度按时间brgchamk1#
你也可以用ffmpeg包进行同样的操作,只是做:
j2cgzkjk2#
您可以使用视频控制器: