opt video scheme

Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-01-27 11:20:03 +08:00
parent fa348db7c5
commit 110469961d
5 changed files with 32 additions and 19 deletions

View File

@@ -132,6 +132,10 @@ class VideoDetailController extends GetxController
String? audioUrl;
Duration? defaultST;
Duration? playedTime;
String get playedTimePos {
final pos = playedTime?.inMilliseconds;
return pos == null || pos == 0 ? '' : '?t=${pos / 1000}';
}
// 亮度
double? brightness;

View File

@@ -143,7 +143,8 @@ class PgcIntroController extends CommonIntroController {
showDialog(
context: context,
builder: (_) {
String videoUrl = '${HttpString.baseUrl}/bangumi/play/ep$epId';
String videoUrl =
'${HttpString.baseUrl}/bangumi/play/ep$epId${videoDetailCtr.playedTimePos}';
return AlertDialog(
clipBehavior: Clip.hardEdge,
contentPadding: const EdgeInsets.symmetric(vertical: 12),

View File

@@ -302,7 +302,8 @@ class UgcIntroController extends CommonIntroController with ReloadMixin {
context: context,
builder: (_) {
final videoDetail = this.videoDetail.value;
String videoUrl = '${HttpString.baseUrl}/video/$bvid';
String videoUrl =
'${HttpString.baseUrl}/video/$bvid${videoDetailCtr.playedTimePos}';
return AlertDialog(
clipBehavior: Clip.hardEdge,
contentPadding: const EdgeInsets.symmetric(vertical: 12),