setMute method

Future<void> setMute(
  1. bool enabled
)

set the video player to mute or sound

enabled if is true the video player is muted

Implementation

Future<void> setMute(bool enabled) async {
  if (enabled) {
    _volumeBeforeMute = _videoPlayerController!.value.volume;
  }
  _mute.value = enabled;
  await this.setVolume(enabled ? 0 : _volumeBeforeMute);
}