Closed huxaiphaer closed 3 years ago
For play/pause, the Video
widget takes a desiredState
parameter.
PlayerState _desiredState = PlayerState.PLAYING;
You will have to keep this in your stateful widget, pass it as parameter to the Video
widget and change its value to play/pause stream. The widget can detect the change and will update the player accordingly. For example to pause stream see below.
setState(() {
_desiredState = PlayerState.PAUSED;
});
Is there a way (Programmatically ) of playing and stopping the stream ?