onPlayerSourceStateChanged property

void Function(MediaPlayerState state, MediaPlayerReason reason)? onPlayerSourceStateChanged
final

Reports changes in player state.

When the player state changes, the SDK triggers this callback to report the new playback state.

  • state The new playback state. See MediaPlayerState.
  • reason The reason for the player state change. See MediaPlayerReason.

Implementation

final void Function(MediaPlayerState state, MediaPlayerReason reason)?
    onPlayerSourceStateChanged;