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