startPlayer abstract method

void startPlayer(
  1. String url, {
  2. required bool autoPlay,
  3. void onData(
    1. dynamic
    )?,
  4. void onError(
    1. dynamic
    )?,
})

Starts the player with the given url. Optionally, it can auto-play the content.

  • url: The streaming URL that the player should start playing.
  • autoPlay: If true, the player starts playing the content automatically.
  • onData: Callback function to handle data events from the player.
  • onError: Callback function to handle error events from the player.

Implementation

void startPlayer(
  String url, {
  required bool autoPlay,
  void Function(dynamic)? onData,
  void Function(dynamic)? onError,
});