AudioPlayer constructor
AudioPlayer({
- String? playerId,
Creates a new instance and assigns an unique id to it.
Implementation
AudioPlayer({String? playerId}) : playerId = playerId ?? _uuid.v4() {
_onPlayerCompleteStreamSubscription = onPlayerComplete.listen((_) {
state = PlayerState.completed;
if (releaseMode == ReleaseMode.release) {
_source = null;
}
});
}