opt: set playback speed

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-03-25 21:19:11 +08:00
parent cd3385be63
commit 018cd058ca
8 changed files with 42 additions and 44 deletions

View File

@@ -272,8 +272,8 @@ class _VideoDetailPageState extends State<VideoDetailPage>
// 结束播放退出全屏
if (!notExitFlag && autoExitFullscreen) {
plPlayerController!.triggerFullScreen(status: false);
if (plPlayerController!.doubleSpeedStatus.value) {
plPlayerController!.setDoubleSpeedStatus(false);
if (plPlayerController!.longPressStatus.value) {
plPlayerController!.setLongPressStatus(false);
}
if (plPlayerController!.controlsLock.value) {
plPlayerController!.onLockControl(false);

View File

@@ -302,8 +302,8 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
// 结束播放退出全屏
if (!notExitFlag && autoExitFullscreen) {
plPlayerController!.triggerFullScreen(status: false);
if (plPlayerController!.doubleSpeedStatus.value) {
plPlayerController!.setDoubleSpeedStatus(false);
if (plPlayerController!.longPressStatus.value) {
plPlayerController!.setLongPressStatus(false);
}
if (plPlayerController!.controlsLock.value) {
plPlayerController!.onLockControl(false);

View File

@@ -1520,7 +1520,7 @@ class _HeaderControlState extends State<HeaderControl> {
danmakuController?.updateOption(
danmakuController.option.copyWith(
duration:
danmakuDuration ~/ widget.controller.playbackSpeed),
danmakuDuration / widget.controller.playbackSpeed),
);
} catch (_) {}
}
@@ -1534,7 +1534,7 @@ class _HeaderControlState extends State<HeaderControl> {
try {
danmakuController?.updateOption(
danmakuController.option.copyWith(
staticDuration: danmakuStaticDuration ~/
staticDuration: danmakuStaticDuration /
widget.controller.playbackSpeed),
);
} catch (_) {}