restart method

Future<void> restart({
  1. String? startTime,
})

重新起流开始播放 startTime 重新起流的开始时间, 其它信息都在startDevRecordByTime方法中保存在原生, 将原始信息中的 startTime 进行更新, 重新起流 若startTime 为空, 原生不更新

Implementation

Future<void> restart({String? startTime}) async {
  if (_status != MediaStatus.stopped) {
    return;
  }
  _playHandle = await _mediaPlayer.restart(
      msg: SurfaceMessage(playHandle: _playHandle, textureId: textureId),
      startTime: startTime);
  _createdSurface!.playHandle = _playHandle;
  _onCreate();
}