fix; set subtitle before init (#1742)

* tweka

* fix; set subtitle before init
This commit is contained in:
My-Responsitories
2025-11-15 15:34:23 +08:00
committed by GitHub
parent c89d6a5a59
commit e589f27195
3 changed files with 18 additions and 19 deletions

View File

@@ -703,7 +703,6 @@ class PlPlayerController {
seekTo,
volume,
);
callback?.call();
// 获取视频时长 00:00
_duration.value = duration ?? _videoPlayerController!.state.duration;
_position.value = _buffered.value = _sliderPosition.value =
@@ -718,6 +717,7 @@ class PlPlayerController {
// listen the video player events
startListeners();
await _initializePlayer();
callback?.call();
} catch (err, stackTrace) {
dataStatus.status.value = DataStatus.error;
if (kDebugMode) {