getPlayerState method
Query the current state to the Tau Core layer.
Most of the time, the App will not use this verb, but will use the playerState variable. This is seldom used when the App wants to get an updated value the background state.
Implementation
Future<PlayerState> getPlayerState() async {
await _waitOpen();
if (!_isInited) {
throw Exception('Player is not open');
}
var state = await TauPlayerPlatform.instance.getPlayerState(this);
_playerState = PlayerState.values[state];
return _playerState;
}