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!.state.volume / 100;
}
_mute.value = enabled;
await setVolume(enabled ? 0 : _volumeBeforeMute, videoPlayerVolume: true);
}