onPlayerSourceStateChanged property

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

Reports the changes of playback state.

When the state of the media player changes, the SDK triggers this callback to report the current playback state.

  • state The playback state. See MediaPlayerState.
  • reason The reason for the changes in the media player status. See MediaPlayerReason.

Implementation

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