-
-
Notifications
You must be signed in to change notification settings - Fork 173
Expand file tree
/
Copy pathvideo_player_settings.g.dart
More file actions
210 lines (196 loc) · 8.28 KB
/
Copy pathvideo_player_settings.g.dart
File metadata and controls
210 lines (196 loc) · 8.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'video_player_settings.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
_VideoPlayerSettingsModel _$VideoPlayerSettingsModelFromJson(
Map<String, dynamic> json) =>
_VideoPlayerSettingsModel(
screenBrightness: (json['screenBrightness'] as num?)?.toDouble(),
videoFit: $enumDecodeNullable(_$BoxFitEnumMap, json['videoFit']) ??
BoxFit.contain,
fillScreen: json['fillScreen'] as bool? ?? false,
hardwareAccel: json['hardwareAccel'] as bool? ?? true,
useLibass: json['useLibass'] as bool? ?? true,
enableTunneling: json['enableTunneling'] as bool? ?? false,
bufferSize: (json['bufferSize'] as num?)?.toInt() ?? 32,
playerOptions:
$enumDecodeNullable(_$PlayerOptionsEnumMap, json['playerOptions']),
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.smart,
maxHomeBitrate:
$enumDecodeNullable(_$BitrateEnumMap, json['maxHomeBitrate']) ??
Bitrate.original,
maxInternetBitrate:
$enumDecodeNullable(_$BitrateEnumMap, json['maxInternetBitrate']) ??
Bitrate.original,
audioDevice: json['audioDevice'] as String?,
segmentSkipSettings:
(json['segmentSkipSettings'] as Map<String, dynamic>?)?.map(
(k, e) => MapEntry($enumDecode(_$MediaSegmentTypeEnumMap, k),
$enumDecode(_$SegmentSkipEnumMap, e)),
) ??
defaultSegmentSkipValues,
hotKeys: (json['hotKeys'] as Map<String, dynamic>?)?.map(
(k, e) => MapEntry($enumDecode(_$VideoHotKeysEnumMap, k),
KeyCombination.fromJson(e as Map<String, dynamic>)),
) ??
const {},
screensaver:
$enumDecodeNullable(_$ScreensaverEnumMap, json['screensaver']) ??
Screensaver.logo,
enableSpeedBoost: json['enableSpeedBoost'] as bool? ?? false,
speedBoostRate: (json['speedBoostRate'] as num?)?.toDouble() ?? 2.0,
enableDoubleTapSeek: json['enableDoubleTapSeek'] as bool? ?? true,
enableAdvancedVideoOptions:
json['enableAdvancedVideoOptions'] as bool? ?? false,
enableEdgeGestures: json['enableEdgeGestures'] as bool? ?? true,
reverseEdgeGestures: json['reverseEdgeGestures'] as bool? ?? false,
enablePictureInPicture: json['enablePictureInPicture'] as bool? ?? true,
enableReplayGain: json['enableReplayGain'] as bool? ?? true,
replayGainVolumeLevel: $enumDecodeNullable(
_$ReplayGainVolumeLevelEnumMap, json['replayGainVolumeLevel']) ??
ReplayGainVolumeLevel.quiet,
enablePlayPauseFade: json['enablePlayPauseFade'] as bool? ?? true,
playPauseFadeDurationMs:
(json['playPauseFadeDurationMs'] as num?)?.toInt() ?? 175,
enableCrossfade: json['enableCrossfade'] as bool? ?? true,
crossfadeDurationMs:
(json['crossfadeDurationMs'] as num?)?.toInt() ?? 400,
);
Map<String, dynamic> _$VideoPlayerSettingsModelToJson(
_VideoPlayerSettingsModel instance) =>
<String, dynamic>{
'screenBrightness': instance.screenBrightness,
'videoFit': _$BoxFitEnumMap[instance.videoFit]!,
'fillScreen': instance.fillScreen,
'hardwareAccel': instance.hardwareAccel,
'useLibass': instance.useLibass,
'enableTunneling': instance.enableTunneling,
'bufferSize': instance.bufferSize,
'playerOptions': _$PlayerOptionsEnumMap[instance.playerOptions],
'internalVolume': instance.internalVolume,
'allowedOrientations': instance.allowedOrientations
?.map((e) => _$DeviceOrientationEnumMap[e]!)
.toList(),
'nextVideoType': _$AutoNextTypeEnumMap[instance.nextVideoType]!,
'maxHomeBitrate': _$BitrateEnumMap[instance.maxHomeBitrate]!,
'maxInternetBitrate': _$BitrateEnumMap[instance.maxInternetBitrate]!,
'audioDevice': instance.audioDevice,
'segmentSkipSettings': instance.segmentSkipSettings.map((k, e) =>
MapEntry(_$MediaSegmentTypeEnumMap[k]!, _$SegmentSkipEnumMap[e]!)),
'hotKeys': instance.hotKeys
.map((k, e) => MapEntry(_$VideoHotKeysEnumMap[k]!, e)),
'screensaver': _$ScreensaverEnumMap[instance.screensaver]!,
'enableSpeedBoost': instance.enableSpeedBoost,
'speedBoostRate': instance.speedBoostRate,
'enableDoubleTapSeek': instance.enableDoubleTapSeek,
'enableAdvancedVideoOptions': instance.enableAdvancedVideoOptions,
'enableEdgeGestures': instance.enableEdgeGestures,
'reverseEdgeGestures': instance.reverseEdgeGestures,
'enablePictureInPicture': instance.enablePictureInPicture,
'enableReplayGain': instance.enableReplayGain,
'replayGainVolumeLevel':
_$ReplayGainVolumeLevelEnumMap[instance.replayGainVolumeLevel]!,
'enablePlayPauseFade': instance.enablePlayPauseFade,
'playPauseFadeDurationMs': instance.playPauseFadeDurationMs,
'enableCrossfade': instance.enableCrossfade,
'crossfadeDurationMs': instance.crossfadeDurationMs,
};
const _$BoxFitEnumMap = {
BoxFit.fill: 'fill',
BoxFit.contain: 'contain',
BoxFit.cover: 'cover',
BoxFit.fitWidth: 'fitWidth',
BoxFit.fitHeight: 'fitHeight',
BoxFit.none: 'none',
BoxFit.scaleDown: 'scaleDown',
};
const _$PlayerOptionsEnumMap = {
PlayerOptions.libMDK: 'libMDK',
PlayerOptions.libMPV: 'libMPV',
PlayerOptions.nativePlayer: 'nativePlayer',
};
const _$DeviceOrientationEnumMap = {
DeviceOrientation.portraitUp: 'portraitUp',
DeviceOrientation.landscapeLeft: 'landscapeLeft',
DeviceOrientation.portraitDown: 'portraitDown',
DeviceOrientation.landscapeRight: 'landscapeRight',
};
const _$AutoNextTypeEnumMap = {
AutoNextType.off: 'off',
AutoNextType.smart: 'smart',
AutoNextType.static: 'static',
};
const _$BitrateEnumMap = {
Bitrate.original: 'original',
Bitrate.auto: 'auto',
Bitrate.b120Mbps: 'b120Mbps',
Bitrate.b80Mbps: 'b80Mbps',
Bitrate.b60Mbps: 'b60Mbps',
Bitrate.b40Mbps: 'b40Mbps',
Bitrate.b20Mbps: 'b20Mbps',
Bitrate.b15Mbps: 'b15Mbps',
Bitrate.b10Mbps: 'b10Mbps',
Bitrate.b8Mbps: 'b8Mbps',
Bitrate.b6Mbps: 'b6Mbps',
Bitrate.b4Mbps: 'b4Mbps',
Bitrate.b3Mbps: 'b3Mbps',
Bitrate.b1_5Mbps: 'b1_5Mbps',
Bitrate.b720Kbps: 'b720Kbps',
Bitrate.b420Kbps: 'b420Kbps',
};
const _$SegmentSkipEnumMap = {
SegmentSkip.none: 'none',
SegmentSkip.askToSkip: 'askToSkip',
SegmentSkip.skipOnce: 'skipOnce',
SegmentSkip.skip: 'skip',
};
const _$MediaSegmentTypeEnumMap = {
MediaSegmentType.unknown: 'unknown',
MediaSegmentType.commercial: 'commercial',
MediaSegmentType.preview: 'preview',
MediaSegmentType.recap: 'recap',
MediaSegmentType.outro: 'outro',
MediaSegmentType.intro: 'intro',
};
const _$VideoHotKeysEnumMap = {
VideoHotKeys.playPause: 'playPause',
VideoHotKeys.seekForward: 'seekForward',
VideoHotKeys.seekBack: 'seekBack',
VideoHotKeys.seekForwardInstant: 'seekForwardInstant',
VideoHotKeys.seekBackInstant: 'seekBackInstant',
VideoHotKeys.stepForward: 'stepForward',
VideoHotKeys.stepBack: 'stepBack',
VideoHotKeys.mute: 'mute',
VideoHotKeys.volumeUp: 'volumeUp',
VideoHotKeys.volumeDown: 'volumeDown',
VideoHotKeys.speedUp: 'speedUp',
VideoHotKeys.speedDown: 'speedDown',
VideoHotKeys.nextVideo: 'nextVideo',
VideoHotKeys.prevVideo: 'prevVideo',
VideoHotKeys.nextChapter: 'nextChapter',
VideoHotKeys.prevChapter: 'prevChapter',
VideoHotKeys.fullScreen: 'fullScreen',
VideoHotKeys.skipMediaSegment: 'skipMediaSegment',
VideoHotKeys.takeScreenshot: 'takeScreenshot',
VideoHotKeys.takeScreenshotClean: 'takeScreenshotClean',
VideoHotKeys.exit: 'exit',
};
const _$ScreensaverEnumMap = {
Screensaver.disabled: 'disabled',
Screensaver.dvd: 'dvd',
Screensaver.logo: 'logo',
Screensaver.time: 'time',
Screensaver.black: 'black',
};
const _$ReplayGainVolumeLevelEnumMap = {
ReplayGainVolumeLevel.quiet: 'quiet',
ReplayGainVolumeLevel.normal: 'normal',
ReplayGainVolumeLevel.loud: 'loud',
};