mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-15 02:05:58 -07:00
fix: Improved and fixed some of the videoPlayer controls (#241)
Co-authored-by: PartyDonut <PartyDonut@users.noreply.github.com>
This commit is contained in:
parent
effa97e0d8
commit
178af97294
5 changed files with 75 additions and 14 deletions
|
|
@ -17,6 +17,7 @@ import 'package:fladder/providers/settings/client_settings_provider.dart';
|
|||
import 'package:fladder/providers/settings/video_player_settings_provider.dart';
|
||||
import 'package:fladder/providers/video_player_provider.dart';
|
||||
import 'package:fladder/screens/shared/default_title_bar.dart';
|
||||
import 'package:fladder/screens/shared/media/components/item_logo.dart';
|
||||
import 'package:fladder/screens/video_player/components/video_playback_information.dart';
|
||||
import 'package:fladder/screens/video_player/components/video_player_controls_extras.dart';
|
||||
import 'package:fladder/screens/video_player/components/video_player_options_sheet.dart';
|
||||
|
|
@ -245,7 +246,8 @@ class _DesktopControlsState extends ConsumerState<DesktopControls> {
|
|||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
IconButton(
|
||||
onPressed: () => minimizePlayer(context),
|
||||
|
|
@ -255,12 +257,20 @@ class _DesktopControlsState extends ConsumerState<DesktopControls> {
|
|||
),
|
||||
),
|
||||
const SizedBox(width: 16),
|
||||
Expanded(
|
||||
child: Text(
|
||||
currentItem?.title ?? "",
|
||||
style: Theme.of(context).textTheme.titleLarge,
|
||||
if (currentItem != null)
|
||||
Expanded(
|
||||
child: ConstrainedBox(
|
||||
constraints: BoxConstraints(
|
||||
maxHeight: 150.clamp(50, MediaQuery.sizeOf(context).height * 0.25).toDouble(),
|
||||
),
|
||||
child: ItemLogo(
|
||||
item: currentItem,
|
||||
imageAlignment: Alignment.topLeft,
|
||||
textStyle: Theme.of(context).textTheme.headlineLarge,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 16),
|
||||
if (AdaptiveLayout.of(context).inputDevice == InputDevice.touch)
|
||||
Tooltip(
|
||||
message: context.localized.stop,
|
||||
|
|
@ -380,7 +390,7 @@ class _DesktopControlsState extends ConsumerState<DesktopControls> {
|
|||
child: IconButton(
|
||||
onPressed: () => closePlayer(), icon: const Icon(IconsaxOutline.close_square))),
|
||||
const Spacer(),
|
||||
if (AdaptiveLayout.viewSizeOf(context) >= ViewSize.desktop &&
|
||||
if (AdaptiveLayout.viewSizeOf(context) >= ViewSize.tablet &&
|
||||
ref.read(videoPlayerProvider).hasPlayer) ...{
|
||||
if (bitRateOptions?.isNotEmpty == true)
|
||||
Tooltip(
|
||||
|
|
@ -390,6 +400,9 @@ class _DesktopControlsState extends ConsumerState<DesktopControls> {
|
|||
icon: const Icon(IconsaxOutline.speedometer),
|
||||
),
|
||||
),
|
||||
},
|
||||
if (AdaptiveLayout.of(context).inputDevice == InputDevice.pointer &&
|
||||
AdaptiveLayout.viewSizeOf(context) > ViewSize.phone) ...[
|
||||
Listener(
|
||||
onPointerSignal: (event) {
|
||||
if (event is PointerScrollEvent) {
|
||||
|
|
@ -405,7 +418,7 @@ class _DesktopControlsState extends ConsumerState<DesktopControls> {
|
|||
),
|
||||
),
|
||||
const FullScreenButton(),
|
||||
}
|
||||
]
|
||||
].addInBetween(const SizedBox(width: 8)),
|
||||
),
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue