mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-07 21:48:14 -08:00
feat: Add fillScreen and videoFit to native player options
This commit is contained in:
parent
63203f39df
commit
318f32c7e6
8 changed files with 148 additions and 23 deletions
|
|
@ -2,6 +2,7 @@ import 'dart:io';
|
|||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
|
||||
|
|
@ -51,6 +52,16 @@ final pigeonPlayerSettingsSyncProvider = Provider<void>((ref) {
|
|||
},
|
||||
skipBackward: (userData?.userSettings?.skipBackDuration ?? const Duration(seconds: 15)).inMilliseconds,
|
||||
skipForward: (userData?.userSettings?.skipForwardDuration ?? const Duration(seconds: 30)).inMilliseconds,
|
||||
fillScreen: value.fillScreen,
|
||||
videoFit: switch (value.videoFit) {
|
||||
BoxFit.fill => pigeon.VideoPlayerFit.fill,
|
||||
BoxFit.contain => pigeon.VideoPlayerFit.contain,
|
||||
BoxFit.cover => pigeon.VideoPlayerFit.cover,
|
||||
BoxFit.fitWidth => pigeon.VideoPlayerFit.fitWidth,
|
||||
BoxFit.fitHeight => pigeon.VideoPlayerFit.fitHeight,
|
||||
BoxFit.none => pigeon.VideoPlayerFit.none,
|
||||
BoxFit.scaleDown => pigeon.VideoPlayerFit.scaleDown,
|
||||
},
|
||||
acceptedOrientations: (value.allowedOrientations?.toList() ?? DeviceOrientation.values)
|
||||
.map(
|
||||
(e) => switch (e) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue