mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-13 17:30:31 -07:00
feature: Added settings to force the player into certain orientations (#108)
Co-authored-by: PartyDonut <PartyDonut@users.noreply.github.com>
This commit is contained in:
parent
691293648b
commit
c32f71b368
11 changed files with 170 additions and 5 deletions
|
|
@ -16,6 +16,9 @@ _$VideoPlayerSettingsModelImpl _$$VideoPlayerSettingsModelImplFromJson(
|
|||
hardwareAccel: json['hardwareAccel'] as bool? ?? true,
|
||||
useLibass: json['useLibass'] as bool? ?? false,
|
||||
internalVolume: (json['internalVolume'] as num?)?.toDouble() ?? 100,
|
||||
allowedOrientations: (json['allowedOrientations'] as List<dynamic>?)
|
||||
?.map((e) => $enumDecode(_$DeviceOrientationEnumMap, e))
|
||||
.toSet(),
|
||||
nextVideoType:
|
||||
$enumDecodeNullable(_$AutoNextTypeEnumMap, json['nextVideoType']) ??
|
||||
AutoNextType.static,
|
||||
|
|
@ -31,6 +34,9 @@ Map<String, dynamic> _$$VideoPlayerSettingsModelImplToJson(
|
|||
'hardwareAccel': instance.hardwareAccel,
|
||||
'useLibass': instance.useLibass,
|
||||
'internalVolume': instance.internalVolume,
|
||||
'allowedOrientations': instance.allowedOrientations
|
||||
?.map((e) => _$DeviceOrientationEnumMap[e]!)
|
||||
.toList(),
|
||||
'nextVideoType': _$AutoNextTypeEnumMap[instance.nextVideoType]!,
|
||||
'audioDevice': instance.audioDevice,
|
||||
};
|
||||
|
|
@ -45,6 +51,13 @@ const _$BoxFitEnumMap = {
|
|||
BoxFit.scaleDown: 'scaleDown',
|
||||
};
|
||||
|
||||
const _$DeviceOrientationEnumMap = {
|
||||
DeviceOrientation.portraitUp: 'portraitUp',
|
||||
DeviceOrientation.landscapeLeft: 'landscapeLeft',
|
||||
DeviceOrientation.portraitDown: 'portraitDown',
|
||||
DeviceOrientation.landscapeRight: 'landscapeRight',
|
||||
};
|
||||
|
||||
const _$AutoNextTypeEnumMap = {
|
||||
AutoNextType.off: 'off',
|
||||
AutoNextType.smart: 'smart',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue