AssetsAudioPlayerGroup constructor
AssetsAudioPlayerGroup({
- bool showNotification = _defaultShowNotification,
- required PlayerGroupMetasCallback updateNotification,
- bool notificationStopEnabled = _defaultNotificationStopEnabled,
- PlayerGroupCallback? onNotificationOpened,
- PlayerGroupCallback? onNotificationPlay,
- PlayerGroupCallback? onNotificationPause,
- PlayerGroupCallback? onNotificationStop,
- bool respectSilentMode = _defaultRespectSilentMode,
- PlayInBackground playInBackground = _defaultPlayInBackground,
Implementation
AssetsAudioPlayerGroup({
this.showNotification = _defaultShowNotification,
required this.updateNotification,
this.notificationStopEnabled = _defaultNotificationStopEnabled,
this.onNotificationOpened,
this.onNotificationPlay,
this.onNotificationPause,
this.onNotificationStop,
this.respectSilentMode = _defaultRespectSilentMode,
this.playInBackground = _defaultPlayInBackground,
}) {
// default action, can be overriden using player.onErrorDo = (error, player) { ACTION };
onErrorDo = (group, errorHandler) {
if (kDebugMode) {
print(errorHandler.error.message);
}
errorHandler.player.stop();
};
}