playVoice method
Play a Voice Line (URL)
Triggers onDucking if withDucking is true, then plays the URL.
Params
path: remote audio URL (CDN, server, etc.)withDucking: override for this call (defaulttrue)
Implementation
Future<void> playVoice(String path, [bool withDucking = true]) async {
this.withDucking = withDucking;
if (path.isEmpty) return;
if (this.withDucking && onDucking != null) {
await onDucking!();
}
await play(path);
}