playRemote static method
Implementation
static playRemote(String remotePath, {int? duration}) async {
// url
try {
await advancedPlayer.play(UrlSource(remotePath));
if (duration != null && duration > 0) {
Future.delayed(
Duration(seconds: duration), () => advancedPlayer.stop());
}
} catch (e) {
Log().exception(e, caller: 'playRemote($remotePath)');
}
}