ByteArkPlayer constructor
ByteArkPlayer({
- Key? key,
- required ByteArkPlayerConfig playerConfig,
- ByteArkPlayerListener? listener,
- double? width,
- double? height,
Creates a ByteArkPlayer widget.
Requires a playerConfig
for setting up the media source and configurations.
Optionally takes width
and height
to specify the player dimensions.
Implementation
ByteArkPlayer({
super.key,
required this.playerConfig,
this.listener,
this.width,
this.height,
}) {
// Generate a unique playerId using Uuid
_playerId = const Uuid().v4();
_controller = MethodChannelByteArkPlayerFlutter(_playerId);
_initEventListener();
}