init method
加载视频,在init后,应当开始下载视频内容
Implementation
@override
Future<void> init({
ControllerSetter<VideoPlayerController>? afterInit,
}) async {
if (prepared) return;
await _syncCall(() async {
await this.controller.initialize();
await this.controller.setLooping(true);
afterInit ??= this._afterInit;
await afterInit?.call(this.controller);
_prepared = true;
});
if (_disposeLock != null) {
_disposeLock?.complete();
_disposeLock = null;
}
}