initPlayer method
Implementation
initPlayer([String? headers]) async {
_hasError = false;
_errorMessage = '';
await _controller?.dispose();
await _player.dispose();
__player = Player(
configuration: const PlayerConfiguration(logLevel: MPVLogLevel.info));
if (headers != null && _player.platform is libmpvPlayer) {
(_player.platform as libmpvPlayer)
.setProperty("http-header-fields", headers);
}
_controller = await VideoController.create(_player);
initListeners();
}