Creates VideoPlayerController
using video_player, plays video obtained from the network, tracks its state, and exposes playback controls.
Depends on video_player.
dependencies:
flutter_use_video: ^0.0.2
class Sample extends HookWidget {
@override
Widget build(BuildContext context) {
final videoController = useNetworkVideo(
dataSource: "https://flutter.github.io/assets-for-api-docs/assets/videos/bee.mp4",
autoPlay: true,
looping: true,
);
return Container(
child: VideoPlayer(videoController),
);
}
}