duration property
Implementation
Future<Duration> get duration async {
if (_playerIsCreated == false) {
TTFLogger.e(_logTag,
'get duration: player not created, please await createPlayer first');
return Duration.zero;
}
double durationInMilliSeconds =
await engineInstanceMethodChannel.invokeMethod("getDuration") ?? 0.0;
return Duration(milliseconds: durationInMilliSeconds.ceil());
}