AudioPlayer constructor

AudioPlayer({
  1. PlayerMode mode = PlayerMode.MEDIA_PLAYER,
  2. String? playerId,
})

Creates a new instance and assigns an unique id to it.

Implementation

AudioPlayer({this.mode = PlayerMode.MEDIA_PLAYER, String? playerId})
    : playerId = playerId ?? _uuid.v4() {
  players[this.playerId] = this;
  notificationService = NotificationService(_invokeMethod);
}