2024-03-06 04:42:22 +01:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
2024-11-13 07:13:21 +01:00
|
|
|
import 'package:immich_mobile/widgets/asset_viewer/video_position.dart';
|
2024-03-06 04:42:22 +01:00
|
|
|
|
2024-11-13 07:13:21 +01:00
|
|
|
/// The video controls for the [videoPlayerControlsProvider]
|
2024-03-06 04:42:22 +01:00
|
|
|
class VideoControls extends ConsumerWidget {
|
|
|
|
const VideoControls({super.key});
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context, WidgetRef ref) {
|
2024-11-13 07:13:21 +01:00
|
|
|
final isPortrait =
|
|
|
|
MediaQuery.orientationOf(context) == Orientation.portrait;
|
2024-11-14 01:49:25 +01:00
|
|
|
return isPortrait
|
|
|
|
? const VideoPosition()
|
|
|
|
: const Padding(
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 60.0),
|
|
|
|
child: VideoPosition(),
|
|
|
|
);
|
2024-03-06 04:42:22 +01:00
|
|
|
}
|
|
|
|
}
|