setMute method
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);
}