add pip backward/forward btns

Closes #2251

Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-06-01 10:04:11 +08:00
parent fb9568a628
commit 9ac37d6fb3
8 changed files with 247 additions and 26 deletions

View File

@@ -276,6 +276,7 @@ class PlPlayerController with BlockConfigMixin {
}
late bool _isAutoEnterPip = false;
bool get isAutoEnterPip => _isAutoEnterPip;
static bool get _isCurrVideoPage {
final routing = Get.routing;
@@ -296,6 +297,8 @@ class PlPlayerController with BlockConfigMixin {
autoEnter: autoEnter,
width: state.width == 0 ? width : state.width,
height: state.height == 0 ? height : state.height,
isLive: isLive,
isPlaying: playerStatus.isPlaying,
);
}
}
@@ -1075,18 +1078,10 @@ class PlPlayerController with BlockConfigMixin {
// }
// }),
// 媒体通知监听
if (videoPlayerServiceHandler != null) ...[
playerStatus.listen((PlayerStatus event) {
videoPlayerServiceHandler!.onStatusChange(
event,
isBuffering.value,
isLive,
);
}),
if (videoPlayerServiceHandler != null)
positionSeconds.listen((int event) {
videoPlayerServiceHandler!.onPositionChange(Duration(seconds: event));
}),
],
];
}