mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-06-01 08:38:18 +08:00
tweaks
Closes #1354 Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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']));
|
||||
|
||||
@@ -557,6 +557,23 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
||||
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;
|
||||
|
||||
@@ -1526,6 +1526,7 @@ class PlPlayerController {
|
||||
Future<void> 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();
|
||||
|
||||
Reference in New Issue
Block a user