@christianriedl/media 1.0.160 → 1.0.162
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
package/src/views/MusicPage.vue
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { inject, ref, reactive, computed, onMounted, onUnmounted, nextTick, watch, StyleValue } from 'vue';
|
|
3
|
+
import type { ComponentPublicInstance } from 'vue';
|
|
3
4
|
import { useRouter } from 'vue-router';
|
|
4
5
|
import { IAppState, Helper, EDevice, EScope, appStateSymbol, IAppConfig, appConfigSymbol } from '@christianriedl/utils';
|
|
5
6
|
import { Authorize, authorizeSymbol } from '@christianriedl/rest';
|
|
@@ -42,7 +43,7 @@
|
|
|
42
43
|
const downloadVisible = computed(() => playingTrackUrl.value && !isMobile);
|
|
43
44
|
const audio = ref<HTMLAudioElement | null>(null);
|
|
44
45
|
const paused = ref(false);
|
|
45
|
-
const listhead = ref<
|
|
46
|
+
const listhead = ref<ComponentPublicInstance | null>(null);
|
|
46
47
|
const positionText = computed(() => {
|
|
47
48
|
if (playingTrack.value) {
|
|
48
49
|
if (playingTrack.value.duration > 0)
|
|
@@ -102,8 +103,8 @@
|
|
|
102
103
|
function computeListHeight() {
|
|
103
104
|
nextTick(() => {
|
|
104
105
|
let height = appState.bodyHeight.value;
|
|
105
|
-
if (listhead.value
|
|
106
|
-
height = height - listhead.value
|
|
106
|
+
if (listhead.value) {
|
|
107
|
+
height = height - (listhead.value.$el as HTMLElement).clientHeight;
|
|
107
108
|
}
|
|
108
109
|
listHeight.value = height;
|
|
109
110
|
})
|
|
@@ -92,9 +92,13 @@
|
|
|
92
92
|
selected.value = item;
|
|
93
93
|
computeListHeight();
|
|
94
94
|
if (mediaAppConfig.useSatIp) {
|
|
95
|
+
audioStreams.splice(0, audioStreams.count);
|
|
96
|
+
audioStream.value = 0;
|
|
95
97
|
const mediaInfo = await mediaService.getSatIpProbe(item.name, item.url);
|
|
96
|
-
|
|
97
|
-
|
|
98
|
+
if (mediaInfo) {
|
|
99
|
+
const as = MediaHelper.getAudioStreams(mediaInfo);
|
|
100
|
+
audioStreams.splice(0, audioStreams.length, ...as);
|
|
101
|
+
}
|
|
98
102
|
}
|
|
99
103
|
const video = item as IVideoFile;
|
|
100
104
|
params = MediaHelper.getTranscodeParams(mediaAppConfig.useSatIp, video.width, video.height, window.innerWidth, quality.value);
|
package/src/views/PhotosPage.vue
CHANGED
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
const downloadFolder = ref<IMediaFolder | null>(null);
|
|
35
35
|
const selectedYear = ref<number | undefined>(undefined);
|
|
36
36
|
const selectedName = ref<string | undefined>(undefined);
|
|
37
|
-
const scrollElement = ref<
|
|
37
|
+
const scrollElement = ref<ComponentPublicInstance | null>(null);
|
|
38
38
|
|
|
39
39
|
window.addEventListener('popstate', onPopState);
|
|
40
40
|
function onPopState(event: any) {
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
if (scrollTop > 0 && scrollElement.value) {
|
|
73
73
|
nextTick(() => {
|
|
74
74
|
// Scoll to this position
|
|
75
|
-
const el = scrollElement.value
|
|
75
|
+
const el = scrollElement.value.$el as HTMLElement;
|
|
76
76
|
el?.scrollTo(0, scrollTop);
|
|
77
77
|
});
|
|
78
78
|
}
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
108
|
function showPictures(folder: IMediaFolder) {
|
|
109
|
-
if (folder.
|
|
109
|
+
if (folder.itemType == EItemType.PictureAlbum) {
|
|
110
110
|
selected.selectedAlbum = folder;
|
|
111
111
|
router.push({ path: 'photoalbum', query: { id: folder.dlnaid } });
|
|
112
112
|
}
|
package/src/views/VideosPage.vue
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { inject, ref, reactive, computed, onMounted, onUnmounted, nextTick, watch, StyleValue } from 'vue';
|
|
3
|
+
import type { ComponentPublicInstance } from 'vue';
|
|
3
4
|
import { useRouter } from 'vue-router';
|
|
4
5
|
import { IAppState, EDevice, EScope, appStateSymbol, appConfigSymbol, IValueText } from '@christianriedl/utils';
|
|
5
6
|
import { Authorize, authorizeSymbol } from '@christianriedl/rest';
|
|
@@ -30,7 +31,7 @@
|
|
|
30
31
|
const itemIndex = ref(0);
|
|
31
32
|
const selected = ref<IMediaItem>({ name: 'Root', itemType: EItemType.Root } as IMediaFolder);
|
|
32
33
|
const listHeight = ref(0);
|
|
33
|
-
const listhead = ref<
|
|
34
|
+
const listhead = ref<ComponentPublicInstance | null>(null);
|
|
34
35
|
const dialog = ref(false);
|
|
35
36
|
const showItem = ref<IVideoFile|null>(null);
|
|
36
37
|
const uploadVisible = ref(false);
|
|
@@ -86,8 +87,8 @@
|
|
|
86
87
|
function computeListHeight() {
|
|
87
88
|
nextTick(() => {
|
|
88
89
|
let height = appState.bodyHeight.value;
|
|
89
|
-
if (listhead.value
|
|
90
|
-
height = height - listhead.value
|
|
90
|
+
if (listhead.value) {
|
|
91
|
+
height = height - (listhead.value.$el as HTMLElement).clientHeight;
|
|
91
92
|
}
|
|
92
93
|
listHeight.value = height;
|
|
93
94
|
})
|