mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-14 17:55:58 -07:00
feat: Customizable shortcuts/hotkeys (#439)
This implements the logic for allowing hotkeys with modifiers. Implemented globalhotkeys and videocontrol hotkeys Also implements saving the forward backwards seconds to the user. Co-authored-by: PartyDonut <PartyDonut@users.noreply.github.com>
This commit is contained in:
parent
23385d8e62
commit
fa30e634b4
29 changed files with 1360 additions and 162 deletions
|
|
@ -38,6 +38,14 @@ _$VideoPlayerSettingsModelImpl _$$VideoPlayerSettingsModelImplFromJson(
|
|||
$enumDecode(_$SegmentSkipEnumMap, e)),
|
||||
) ??
|
||||
defaultSegmentSkipValues,
|
||||
hotKeys: (json['hotKeys'] as Map<String, dynamic>?)?.map(
|
||||
(k, e) => MapEntry(
|
||||
$enumDecode(_$VideoHotKeysEnumMap, k),
|
||||
e == null
|
||||
? null
|
||||
: KeyCombination.fromJson(e as Map<String, dynamic>)),
|
||||
) ??
|
||||
const {},
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$VideoPlayerSettingsModelImplToJson(
|
||||
|
|
@ -60,6 +68,8 @@ Map<String, dynamic> _$$VideoPlayerSettingsModelImplToJson(
|
|||
'audioDevice': instance.audioDevice,
|
||||
'segmentSkipSettings': instance.segmentSkipSettings.map((k, e) =>
|
||||
MapEntry(_$MediaSegmentTypeEnumMap[k]!, _$SegmentSkipEnumMap[e]!)),
|
||||
'hotKeys': instance.hotKeys
|
||||
.map((k, e) => MapEntry(_$VideoHotKeysEnumMap[k]!, e)),
|
||||
};
|
||||
|
||||
const _$BoxFitEnumMap = {
|
||||
|
|
@ -123,3 +133,19 @@ const _$MediaSegmentTypeEnumMap = {
|
|||
MediaSegmentType.outro: 'outro',
|
||||
MediaSegmentType.intro: 'intro',
|
||||
};
|
||||
|
||||
const _$VideoHotKeysEnumMap = {
|
||||
VideoHotKeys.playPause: 'playPause',
|
||||
VideoHotKeys.seekForward: 'seekForward',
|
||||
VideoHotKeys.seekBack: 'seekBack',
|
||||
VideoHotKeys.mute: 'mute',
|
||||
VideoHotKeys.volumeUp: 'volumeUp',
|
||||
VideoHotKeys.volumeDown: 'volumeDown',
|
||||
VideoHotKeys.nextVideo: 'nextVideo',
|
||||
VideoHotKeys.prevVideo: 'prevVideo',
|
||||
VideoHotKeys.nextChapter: 'nextChapter',
|
||||
VideoHotKeys.prevChapter: 'prevChapter',
|
||||
VideoHotKeys.fullScreen: 'fullScreen',
|
||||
VideoHotKeys.skipMediaSegment: 'skipMediaSegment',
|
||||
VideoHotKeys.exit: 'exit',
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue