getDuration method

Future<double> getDuration()

To get the total duration

获取总时长

Implementation

Future<double> getDuration() async {
  if (_isNeedDisposed) return 0;
  await _initPlayer.future;
  DoubleMsg doubleMsg = await _vodPlayerApi.getDuration(PlayerMsg()..playerId = _playerId);
  return doubleMsg.value ?? 0;
}