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