From 44c7c44a27cd3342ec63fdc4434506b6b5ef3ebd Mon Sep 17 00:00:00 2001 From: bggRGjQaUbCoE Date: Tue, 7 Oct 2025 10:37:01 +0800 Subject: [PATCH] tweaks Closes #1354 Signed-off-by: bggRGjQaUbCoE --- .../progress_bar/audio_video_progress_bar.dart | 6 +++--- lib/http/live.dart | 11 ++++++----- lib/pages/video/view.dart | 17 +++++++++++++++++ lib/plugin/pl_player/controller.dart | 2 ++ 4 files changed, 28 insertions(+), 8 deletions(-) diff --git a/lib/common/widgets/progress_bar/audio_video_progress_bar.dart b/lib/common/widgets/progress_bar/audio_video_progress_bar.dart index 467ff1c9..26c0f2e7 100644 --- a/lib/common/widgets/progress_bar/audio_video_progress_bar.dart +++ b/lib/common/widgets/progress_bar/audio_video_progress_bar.dart @@ -701,7 +701,7 @@ class _RenderProgressBar extends RenderBox { /// void _drawProgressBarWithoutLabels(Canvas canvas) { final barWidth = size.width; - final barHeight = 2 * _thumbRadius; + final barHeight = _heightWhenNoLabels(); _drawProgressBar(canvas, Offset.zero, Size(barWidth, barHeight)); } @@ -815,16 +815,16 @@ class _RenderProgressBar extends RenderBox { void increaseAction() { final newValue = _thumbValue + _semanticActionUnit; _thumbValue = (newValue).clamp(0.0, 1.0); + onSeek?.call(_currentThumbDuration()); markNeedsPaint(); markNeedsSemanticsUpdate(); - onSeek?.call(_currentThumbDuration()); } void decreaseAction() { final newValue = _thumbValue - _semanticActionUnit; _thumbValue = (newValue).clamp(0.0, 1.0); + onSeek?.call(_currentThumbDuration()); markNeedsPaint(); markNeedsSemanticsUpdate(); - onSeek?.call(_currentThumbDuration()); } } diff --git a/lib/http/live.dart b/lib/http/live.dart index 1be9031f..c4f8c7d2 100644 --- a/lib/http/live.dart +++ b/lib/http/live.dart @@ -83,18 +83,19 @@ abstract final class LiveHttp { }) async { var res = await Request().get( Api.liveRoomInfo, - queryParameters: { + queryParameters: await WbiSign.makSign({ 'room_id': roomId, - 'protocol': '0, 1', - 'format': '0, 1, 2', - 'codec': '0, 1', + 'protocol': '0,1', + 'format': '0,1,2', + 'codec': '0,1,2', 'qn': qn, 'platform': 'web', 'ptype': 8, 'dolby': 5, 'panorama': 1, if (onlyAudio) 'only_audio': 1, - }, + 'web_location': 444.8, + }), ); if (res.data['code'] == 0) { return Success(RoomPlayInfoData.fromJson(res.data['data'])); diff --git a/lib/pages/video/view.dart b/lib/pages/video/view.dart index 0fea5af9..2314c450 100644 --- a/lib/pages/video/view.dart +++ b/lib/pages/video/view.dart @@ -557,6 +557,23 @@ class _VideoDetailPageVState extends State hideStatusBar(); } } + if (Utils.isMobile) { + if (!isPortrait && + !isFullScreen && + plPlayerController != null && + videoDetailController.autoPlay.value) { + WidgetsBinding.instance.addPostFrameCallback((_) { + plPlayerController!.triggerFullScreen( + status: true, + mode: FullScreenMode.gravity, + ); + }); + } else if (isPortrait && isFullScreen) { + WidgetsBinding.instance.addPostFrameCallback((_) { + plPlayerController!.triggerFullScreen(status: false); + }); + } + } return Obx( () { final isFullScreen = this.isFullScreen; diff --git a/lib/plugin/pl_player/controller.dart b/lib/plugin/pl_player/controller.dart index 75ed34f1..c12de204 100644 --- a/lib/plugin/pl_player/controller.dart +++ b/lib/plugin/pl_player/controller.dart @@ -1526,6 +1526,7 @@ class PlPlayerController { Future triggerFullScreen({ bool status = true, bool inAppFullScreen = false, + FullScreenMode? mode, }) async { if (isFullScreen.value == status) return; @@ -1536,6 +1537,7 @@ class PlPlayerController { toggleFullScreen(status); + mode ??= this.mode; if (status) { if (Utils.isMobile) { hideStatusBar();