refactor device orientation

Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-04-06 15:16:21 +08:00
parent db74eccf77
commit 3097b56816
16 changed files with 218 additions and 264 deletions

View File

@@ -300,10 +300,7 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
void didChangeAppLifecycleState(AppLifecycleState state) {
if (!plPlayerController.continuePlayInBackground.value) {
late final player = plPlayerController.videoPlayerController;
if (const [
AppLifecycleState.paused,
AppLifecycleState.detached,
].contains(state)) {
if (const <AppLifecycleState>[.paused, .detached].contains(state)) {
if (player != null && player.state.playing) {
_pauseDueToPauseUponEnteringBackgroundMode = true;
player.pause();