mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-30 23:58:13 +08:00
opt: video: onreset
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -418,11 +418,7 @@ class BangumiIntroController extends CommonController {
|
|||||||
Get.find<VideoDetailController>(tag: Get.arguments['heroTag'])
|
Get.find<VideoDetailController>(tag: Get.arguments['heroTag'])
|
||||||
..plPlayerController.pause()
|
..plPlayerController.pause()
|
||||||
..makeHeartBeat()
|
..makeHeartBeat()
|
||||||
..playedTime = null
|
..onReset()
|
||||||
..videoUrl = null
|
|
||||||
..audioUrl = null
|
|
||||||
..vttSubtitlesIndex = null
|
|
||||||
..savedDanmaku = null
|
|
||||||
..epId = epId
|
..epId = epId
|
||||||
..bvid = bvid
|
..bvid = bvid
|
||||||
..cid.value = cid
|
..cid.value = cid
|
||||||
|
|||||||
@@ -635,6 +635,9 @@ class VideoDetailController extends GetxController
|
|||||||
|
|
||||||
Future _querySponsorBlock() async {
|
Future _querySponsorBlock() async {
|
||||||
positionSubscription?.cancel();
|
positionSubscription?.cancel();
|
||||||
|
videoLabel.value = '';
|
||||||
|
segmentList.clear();
|
||||||
|
_segmentProgressList = null;
|
||||||
dynamic result = await Request().get(
|
dynamic result = await Request().get(
|
||||||
'${GStorage.blockServer}/api/skipSegments',
|
'${GStorage.blockServer}/api/skipSegments',
|
||||||
queryParameters: {
|
queryParameters: {
|
||||||
@@ -643,9 +646,6 @@ class VideoDetailController extends GetxController
|
|||||||
},
|
},
|
||||||
options: _options,
|
options: _options,
|
||||||
);
|
);
|
||||||
videoLabel.value = '';
|
|
||||||
segmentList.clear();
|
|
||||||
_segmentProgressList = null;
|
|
||||||
_handleSBData(result);
|
_handleSBData(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1963,4 +1963,26 @@ class VideoDetailController extends GetxController
|
|||||||
tabCtr.dispose();
|
tabCtr.dispose();
|
||||||
super.onClose();
|
super.onClose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onReset() {
|
||||||
|
playedTime = null;
|
||||||
|
videoUrl = null;
|
||||||
|
audioUrl = null;
|
||||||
|
|
||||||
|
// danmaku
|
||||||
|
savedDanmaku = null;
|
||||||
|
|
||||||
|
// subtitle
|
||||||
|
vttSubtitlesIndex = null;
|
||||||
|
_vttSubtitles.clear();
|
||||||
|
|
||||||
|
// view point
|
||||||
|
viewPointList.clear();
|
||||||
|
|
||||||
|
// sponsor block
|
||||||
|
positionSubscription?.cancel();
|
||||||
|
videoLabel.value = '';
|
||||||
|
segmentList.clear();
|
||||||
|
_segmentProgressList = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -583,12 +583,8 @@ class VideoIntroController extends GetxController
|
|||||||
final videoDetailCtr = Get.find<VideoDetailController>(tag: heroTag)
|
final videoDetailCtr = Get.find<VideoDetailController>(tag: heroTag)
|
||||||
..plPlayerController.pause()
|
..plPlayerController.pause()
|
||||||
..makeHeartBeat()
|
..makeHeartBeat()
|
||||||
..playedTime = null
|
|
||||||
..videoUrl = null
|
|
||||||
..audioUrl = null
|
|
||||||
..updateMediaListHistory(aid)
|
..updateMediaListHistory(aid)
|
||||||
..vttSubtitlesIndex = null
|
..onReset()
|
||||||
..savedDanmaku = null
|
|
||||||
..bvid = bvid
|
..bvid = bvid
|
||||||
..oid.value = aid ?? IdUtils.bv2av(bvid)
|
..oid.value = aid ?? IdUtils.bv2av(bvid)
|
||||||
..cid.value = cid
|
..cid.value = cid
|
||||||
|
|||||||
Reference in New Issue
Block a user