@christianriedl/media 1.0.70 → 1.0.71

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@christianriedl/media",
3
- "version": "1.0.70",
3
+ "version": "1.0.71",
4
4
  "description": "RIC media interfaces",
5
5
 
6
6
  "main": "dist/index.js",
@@ -2,7 +2,7 @@
2
2
  import { inject, ref, reactive, computed, onMounted, onBeforeMount, onUnmounted, nextTick, watch } from 'vue';
3
3
  import type { ComponentPublicInstance } from 'vue';
4
4
  import { useRouter, useRoute } from 'vue-router';
5
- import { IAppState, IAppConfig, EDevice, EBrowser, Dictionary, Helper, appStateSymbol, appConfigSymbol } from '@christianriedl/utils';
5
+ import { IAppState, IAppConfig, EDevice, EDirection, Dictionary, Helper, appStateSymbol, appConfigSymbol } from '@christianriedl/utils';
6
6
  import { EMediaType, IPictureFile, MediaService, IMediaAppConfig, EPictureQuality, getMediaSymbol } from '@christianriedl/media';
7
7
 
8
8
  const router = useRouter();
@@ -42,6 +42,7 @@
42
42
 
43
43
  async function start(): Promise<boolean> {
44
44
  window.document.addEventListener('keydown', onKey);
45
+ appState.navigate.value = onNavigate;
45
46
  if (carousel.value)
46
47
  appState.fullScreenElement.value = carousel.value.$el as HTMLElement;
47
48
  let folder = mediaService.folders[folderId];
@@ -79,7 +80,14 @@
79
80
  onUnmounted(() => {
80
81
  appState.fullScreenElement.value = null;
81
82
  window.document.removeEventListener('keydown', onKey);
83
+ appState.navigate.value = onNavigate;
82
84
  });
85
+ function onNavigate(direction: EDirection): void {
86
+ if (direction === EDirection.Left)
87
+ onKeyClick("ArrowLeft")
88
+ if (direction === EDirection.Right)
89
+ onKeyClick("ArrowRight")
90
+ }
83
91
 
84
92
  function getQuality(pictureQuality: EPictureQuality) {
85
93
  return pictureQuality % 1000;