@christianriedl/media 1.0.67 → 1.0.68
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.
|
|
3
|
+
"version": "1.0.68",
|
|
4
4
|
"description": "RIC media interfaces",
|
|
5
5
|
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"author": "Christian Riedl",
|
|
19
19
|
"license": "ISC",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@christianriedl/utils": "^1.0.
|
|
21
|
+
"@christianriedl/utils": "^1.0.82",
|
|
22
22
|
"@christianriedl/rest": "^1.0.48",
|
|
23
23
|
"@christianriedl/epg": "^1.0.26"
|
|
24
24
|
},
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
const props = defineProps<{ folder: IMediaFolder }>();
|
|
7
7
|
const emits = defineEmits<{ (e: 'close'): void }>();
|
|
8
8
|
|
|
9
|
+
const title = `Download '${props.folder.Name}' (${props.folder.Files.length} Bilder)`
|
|
9
10
|
const getMedia = inject(getMediaSymbol)!;
|
|
10
11
|
const mediaService = getMedia();
|
|
11
12
|
|
|
@@ -43,7 +44,7 @@
|
|
|
43
44
|
|
|
44
45
|
<template>
|
|
45
46
|
<v-card class="bg-media" :width="500">
|
|
46
|
-
<v-card-title class="headline">
|
|
47
|
+
<v-card-title class="headline">{{title}}</v-card-title>
|
|
47
48
|
<v-card-subtitle>Only 'Original' height includes metadata</v-card-subtitle>
|
|
48
49
|
<v-card-text>
|
|
49
50
|
<v-container>
|
|
@@ -57,9 +58,12 @@
|
|
|
57
58
|
dense solo hide-details single-line>
|
|
58
59
|
</v-select>
|
|
59
60
|
</v-col>
|
|
60
|
-
<v-col cols="
|
|
61
|
+
<v-col cols="3">
|
|
61
62
|
<v-text-field type="number" v-model="quality" density="compact" hide-details></v-text-field>
|
|
62
63
|
</v-col>
|
|
64
|
+
<v-col cols="1">
|
|
65
|
+
<p>%</p>
|
|
66
|
+
</v-col>
|
|
63
67
|
</v-row>
|
|
64
68
|
<v-row dense align="center">
|
|
65
69
|
<v-col cols="4" class="font-weight-bold">Height</v-col>
|
|
@@ -71,9 +75,12 @@
|
|
|
71
75
|
dense solo hide-details single-line>
|
|
72
76
|
</v-select>
|
|
73
77
|
</v-col>
|
|
74
|
-
<v-col cols="
|
|
78
|
+
<v-col cols="3">
|
|
75
79
|
<v-text-field type="number" v-model="height" density="compact" hide-details></v-text-field>
|
|
76
80
|
</v-col>
|
|
81
|
+
<v-col cols="1">
|
|
82
|
+
<p>px</p>
|
|
83
|
+
</v-col>
|
|
77
84
|
</v-row>
|
|
78
85
|
</v-container>
|
|
79
86
|
</v-card-text>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { inject, ref, reactive, computed, onMounted, onBeforeMount, onUnmounted, nextTick, watch } from 'vue';
|
|
3
|
+
import type { ComponentPublicInstance } from 'vue';
|
|
3
4
|
import { useRouter, useRoute } from 'vue-router';
|
|
4
5
|
import { IAppState, IAppConfig, EDevice, EBrowser, Dictionary, Helper, appStateSymbol, appConfigSymbol } from '@christianriedl/utils';
|
|
5
6
|
import { EMediaType, IPictureFile, MediaService, IMediaAppConfig, EPictureQuality, getMediaSymbol } from '@christianriedl/media';
|
|
@@ -26,6 +27,7 @@
|
|
|
26
27
|
const cycle = ref(false);
|
|
27
28
|
const interval = ref(8000);
|
|
28
29
|
const hasCoordinates = ref(false);
|
|
30
|
+
const carousel = ref<ComponentPublicInstance | null>(null);
|
|
29
31
|
let origUrl = "";
|
|
30
32
|
let gpsLng: number[];
|
|
31
33
|
let gpsLat: number[];
|
|
@@ -40,6 +42,8 @@
|
|
|
40
42
|
|
|
41
43
|
async function start(): Promise<boolean> {
|
|
42
44
|
window.document.addEventListener('keydown', onKey);
|
|
45
|
+
if (carousel.value)
|
|
46
|
+
appState.fullScreenElement.value = carousel.value.$el as HTMLElement;
|
|
43
47
|
let folder = mediaService.folders[folderId];
|
|
44
48
|
if(!folder) {
|
|
45
49
|
const split = folderId.split(/[.|]/);
|
|
@@ -73,6 +77,7 @@
|
|
|
73
77
|
await start();
|
|
74
78
|
});
|
|
75
79
|
onUnmounted(() => {
|
|
80
|
+
appState.fullScreenElement.value = null;
|
|
76
81
|
window.document.removeEventListener('keydown', onKey);
|
|
77
82
|
});
|
|
78
83
|
|
|
@@ -136,14 +141,15 @@
|
|
|
136
141
|
keyDialog.value = true;
|
|
137
142
|
}, 500);
|
|
138
143
|
}
|
|
139
|
-
return;
|
|
140
144
|
}
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
145
|
+
else {
|
|
146
|
+
const msecDiff = new Date().getTime() - mouseDownTime;
|
|
147
|
+
if (msecDiff < 500)
|
|
148
|
+
keyDialog.value = true;
|
|
149
|
+
else
|
|
150
|
+
onKeyClick("KeyF");
|
|
151
|
+
mouseDownTime = 0;
|
|
152
|
+
}
|
|
147
153
|
}
|
|
148
154
|
function onMouseDown() {
|
|
149
155
|
mouseDownTime = new Date().getTime();
|
|
@@ -196,8 +202,10 @@
|
|
|
196
202
|
await appState.exitFullScreen();
|
|
197
203
|
}
|
|
198
204
|
else {
|
|
199
|
-
|
|
200
|
-
|
|
205
|
+
if (carousel.value) {
|
|
206
|
+
const element = carousel.value.$el as HTMLElement;
|
|
207
|
+
await appState.setFullScreen(element);
|
|
208
|
+
}
|
|
201
209
|
}
|
|
202
210
|
break;
|
|
203
211
|
case "KeyP":
|
|
@@ -342,7 +350,7 @@
|
|
|
342
350
|
|
|
343
351
|
<template>
|
|
344
352
|
<v-container fluid :style="heightStyle" class="bg-grey-darken-3 pa-0">
|
|
345
|
-
<v-carousel hide-delimiters :show-arrows="false" v-model="index"
|
|
353
|
+
<v-carousel ref="carousel" hide-delimiters :show-arrows="false" v-model="index"
|
|
346
354
|
:width="width" :height="height" :cycle="cycle" :interval="interval"
|
|
347
355
|
@click="onClick" @mousedown="onMouseDown" @update:modelValue="infoDialog = false">
|
|
348
356
|
<v-carousel-item v-for="item in items" :key="item.DLNAID">
|
package/src/views/PhotosPage.vue
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { inject, ref, reactive, computed, onMounted, onUnmounted, nextTick, watch } from 'vue';
|
|
3
|
+
import type { ComponentPublicInstance } from 'vue';
|
|
3
4
|
import { useRouter } from 'vue-router';
|
|
4
5
|
import { IAppState, IAppConfig, EDevice, EBrowser, appStateSymbol, appConfigSymbol, Helper } from '@christianriedl/utils';
|
|
5
6
|
import { EItemType, EMediaType, IMediaFolder, IMediaItem, IPhotoSelection, MediaService, getMediaSymbol, IMediaAppConfig } from '@christianriedl/media';
|
|
@@ -19,7 +20,7 @@
|
|
|
19
20
|
const items: IMediaItem[] = reactive([]);
|
|
20
21
|
const selected = reactive<IPhotoSelection>(mediaService.photoSelection);
|
|
21
22
|
const listHeight = ref(0);
|
|
22
|
-
const listhead = ref<
|
|
23
|
+
const listhead = ref<ComponentPublicInstance|null>(null);
|
|
23
24
|
const uploadVisible = ref(false);
|
|
24
25
|
|
|
25
26
|
const roots: string[] = ['Jahr', 'Orte', 'Ereignisse', 'Personen'];
|
|
@@ -74,8 +75,8 @@
|
|
|
74
75
|
function computeListHeight() {
|
|
75
76
|
nextTick(() => {
|
|
76
77
|
let height = appState.bodyHeight.value;
|
|
77
|
-
if (listhead.value
|
|
78
|
-
height = height - listhead.value
|
|
78
|
+
if (listhead.value) {
|
|
79
|
+
height = height - (listhead.value.$el as HTMLElement).clientHeight;
|
|
79
80
|
}
|
|
80
81
|
listHeight.value = height;
|
|
81
82
|
})
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { inject, ref, reactive, computed, onMounted, onUnmounted, nextTick, watch } from 'vue';
|
|
3
|
+
import type { ComponentPublicInstance } from 'vue';
|
|
3
4
|
import { useRouter } from 'vue-router';
|
|
4
5
|
import { IAppState, EScope, appStateSymbol } from '@christianriedl/utils';
|
|
5
6
|
import { DvbService, getDvbServiceSymbol } from '@christianriedl/epg';
|
|
@@ -17,7 +18,7 @@
|
|
|
17
18
|
const items: IMediaItem[] = reactive([]);
|
|
18
19
|
const selected = ref<IMediaItem>({ Name: 'Root', ItemType: EItemType.Root } as IMediaFolder);
|
|
19
20
|
const listHeight = ref(0);
|
|
20
|
-
const listhead = ref<
|
|
21
|
+
const listhead = ref<ComponentPublicInstance|null>(null);
|
|
21
22
|
|
|
22
23
|
const backVisible = computed(() => selected.value.ItemType != EItemType.VideoRoot);
|
|
23
24
|
const playVisible = computed(() => selected.value.ItemType == EItemType.VideoItem || selected.value.ItemType == EItemType.VideoBroadcast);
|
|
@@ -36,8 +37,8 @@
|
|
|
36
37
|
function computeListHeight() {
|
|
37
38
|
nextTick(() => {
|
|
38
39
|
let height = appState.bodyHeight.value;
|
|
39
|
-
if (listhead.value
|
|
40
|
-
height = height - listhead.value
|
|
40
|
+
if (listhead.value) {
|
|
41
|
+
height = height - (listhead.value.$el as HTMLElement).clientHeight;
|
|
41
42
|
}
|
|
42
43
|
listHeight.value = height;
|
|
43
44
|
})
|