feat: 快进、快退、拖动时时间戳展示、关闭自动播放时处理、单p播放完成处理
This commit is contained in:
@ -50,6 +50,10 @@ class VideoDetailController extends GetxController
|
||||
Box user = GStrorage.user;
|
||||
Box localCache = GStrorage.localCache;
|
||||
PlPlayerController plPlayerController = PlPlayerController();
|
||||
// 是否开始自动播放 存在多p的情况下,第二p需要为true
|
||||
RxBool autoPlay = true.obs;
|
||||
// 视频资源是否有效
|
||||
RxBool isEffective = true.obs;
|
||||
|
||||
@override
|
||||
void onInit() {
|
||||
@ -130,12 +134,17 @@ class VideoDetailController extends GetxController
|
||||
),
|
||||
// 硬解
|
||||
enableHA: true,
|
||||
autoplay: true,
|
||||
autoplay: autoPlay.value,
|
||||
seekTo: defaultST,
|
||||
duration: Duration(milliseconds: duration),
|
||||
);
|
||||
}
|
||||
|
||||
// 手动点击播放
|
||||
handlePlay() {
|
||||
plPlayerController.togglePlay();
|
||||
}
|
||||
|
||||
// 视频链接
|
||||
queryVideoUrl() async {
|
||||
var result = await VideoHttp.videoUrl(cid: cid, bvid: bvid);
|
||||
|
||||
Reference in New Issue
Block a user