setSubscriptionDuration method
Specify the callbacks frenquency, before calling startPlayer
.
The default value is 0 (zero) which means that there is no callbacks.
This verb will be Deprecated soon.
Example:
myPlayer.setSubscriptionDuration(Duration(milliseconds: 100));
Implementation
Future<void> setSubscriptionDuration(Duration duration) async {
_logger.d('FS:---> setSubscriptionDuration ');
await _waitOpen();
if (!_isInited) {
throw Exception('Player is not open');
}
var state = await TauPlayerPlatform.instance
.setSubscriptionDuration(this, duration: duration);
_playerState = PlayerState.values[state];
_logger.d('FS:<---- setSubscriptionDuration ');
}