mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-07-11 03:40:08 +08:00
@@ -736,15 +736,10 @@ class VideoDetailController extends GetxController
|
||||
}
|
||||
|
||||
Future<void> playerInit({
|
||||
String? video,
|
||||
String? audio,
|
||||
Duration? seekToTime,
|
||||
Duration? duration,
|
||||
bool? autoplay,
|
||||
Volume? volume,
|
||||
bool autoFullScreenFlag = false,
|
||||
}) async {
|
||||
Duration? seek = seekToTime ?? defaultST ?? playedTime;
|
||||
Duration? seek = defaultST ?? playedTime;
|
||||
if (seek == null || seek == Duration.zero) {
|
||||
seek = getFirstSegment();
|
||||
}
|
||||
@@ -757,15 +752,13 @@ class VideoDetailController extends GetxController
|
||||
hasDashAudio: entry.hasDashAudio,
|
||||
)
|
||||
: NetworkSource(
|
||||
videoSource: video ?? videoUrl!,
|
||||
audioSource: audio ?? audioUrl,
|
||||
videoSource: videoUrl!,
|
||||
audioSource: audioUrl,
|
||||
),
|
||||
seekTo: seek,
|
||||
duration:
|
||||
duration ??
|
||||
(data.timeLength == null
|
||||
? null
|
||||
: Duration(milliseconds: data.timeLength!)),
|
||||
duration: data.timeLength == null
|
||||
? null
|
||||
: Duration(milliseconds: data.timeLength!),
|
||||
isVertical: isVertical.value,
|
||||
aid: aid,
|
||||
bvid: bvid,
|
||||
@@ -781,7 +774,7 @@ class VideoDetailController extends GetxController
|
||||
},
|
||||
width: firstVideo.width,
|
||||
height: firstVideo.height,
|
||||
volume: volume ?? this.volume,
|
||||
volume: volume,
|
||||
autoFullScreenFlag: autoFullScreenFlag,
|
||||
);
|
||||
|
||||
@@ -815,14 +808,13 @@ class VideoDetailController extends GetxController
|
||||
return;
|
||||
}
|
||||
currLang.value = language;
|
||||
queryVideoUrl(defaultST: playedTime);
|
||||
queryVideoUrl(fromReset: true);
|
||||
}
|
||||
|
||||
Volume? volume;
|
||||
|
||||
// 视频链接
|
||||
Future<void> queryVideoUrl({
|
||||
Duration? defaultST,
|
||||
bool fromReset = false,
|
||||
bool autoFullScreenFlag = false,
|
||||
}) async {
|
||||
@@ -866,11 +858,13 @@ class VideoDetailController extends GetxController
|
||||
|
||||
volume = data.volume;
|
||||
|
||||
final progress = args.remove('progress');
|
||||
if (progress != null) {
|
||||
this.defaultST = Duration(milliseconds: progress);
|
||||
} else if (defaultST == null && data.lastPlayTime != null) {
|
||||
this.defaultST = Duration(milliseconds: data.lastPlayTime!);
|
||||
if (!fromReset) {
|
||||
final progress = args.remove('progress');
|
||||
if (progress != null) {
|
||||
defaultST = Duration(milliseconds: progress);
|
||||
} else {
|
||||
defaultST = Duration(milliseconds: data.lastPlayTime);
|
||||
}
|
||||
}
|
||||
|
||||
if (!isUgc && !fromReset && plPlayerController.enablePgcSkip) {
|
||||
|
||||
Reference in New Issue
Block a user