appinioGmbH / flutter_packages

Dart and Flutter plugins/packages used and maintained by @appinioGmbH
187 stars 214 forks source link

Auto play video #129

Closed faizan1947 closed 1 year ago

faizan1947 commented 1 year ago

I'm not finding any parameter to turn on auto-play video

4A6F6F6E61 commented 1 year ago

You can just call the play function on the normal VideoPlayerController after the player has been initialised:

videoPlayerController = VideoPlayerController.networkUrl(Uri.tryParse(widget.url) ?? Uri())
      ..initialize().then((value) {
        setState(() {});
        videoPlayerController.play();
      });
khanmujeeb687 commented 1 year ago

Hey @faizan1947 , closing this issue because the approach by @4A6F6F6E61 is correct and should work.