play method

  1. @override
Future<void> play(
  1. Source source, {
  2. double? volume,
  3. double? balance,
  4. AudioContext? ctx,
  5. Duration? position,
  6. PlayerMode? mode,
  7. dynamic beforePlay(
    1. MiniPlayer
    )?,
})
inherited

play override handle before start function

Implementation

@override
Future<void> play(Source source,
    {double? volume,
    double? balance,
    AudioContext? ctx,
    Duration? position,
    PlayerMode? mode,
    Function(MiniPlayer)? beforePlay}) async {
  await beforePlay?.call(this);
  return super.play(
    source,
    volume: volume,
    ctx: ctx,
    position: position,
    mode: mode,
  );
}