startPlayer abstract method
void
startPlayer(})
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,
});