@christianriedl/media 1.0.166 → 1.0.168
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
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
|
|
20
20
|
const items: IMediaItem[] = reactive([]);
|
|
21
21
|
const itemIndex = ref(0);
|
|
22
|
-
const selected = ref<IMediaItem>(
|
|
22
|
+
const selected = ref<IMediaItem | null>(null);
|
|
23
23
|
const listHeight = ref(0);
|
|
24
24
|
const listhead = ref<ComponentPublicInstance | null>(null);
|
|
25
25
|
const audioStreams: IValueText[] = reactive([]);
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
let params: ITranscodeParams;
|
|
31
31
|
const paramsText = ref('');
|
|
32
32
|
|
|
33
|
-
const playVisible = computed(() => selected.value.itemType == EItemType.VideoBroadcast);
|
|
33
|
+
const playVisible = computed(() => selected.value && selected.value.itemType == EItemType.VideoBroadcast);
|
|
34
34
|
|
|
35
35
|
onMounted(async () => {
|
|
36
36
|
mediaService.log.info('OnlineTVs created');
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
items.splice(0, items.length, ...root.files);
|
|
50
50
|
computeListHeight();
|
|
51
51
|
});
|
|
52
|
-
onUnmounted(() => selected.value
|
|
52
|
+
onUnmounted(() => selected.value = null);
|
|
53
53
|
|
|
54
54
|
watch(appState.bodyHeight, () => computeListHeight());
|
|
55
55
|
|
|
@@ -64,6 +64,8 @@
|
|
|
64
64
|
}
|
|
65
65
|
async function play() {
|
|
66
66
|
let url;
|
|
67
|
+
if (!selected.value)
|
|
68
|
+
return;
|
|
67
69
|
if (mediaAppConfig.useSatIp) {
|
|
68
70
|
url = `${(mediaService as MediaService).rest.serviceUrl}apistream/satipstream?channelName=${selected.value.name}&url=${encodeURIComponent(selected.value.url)}`;
|
|
69
71
|
if (audioStream.value != null)
|
|
@@ -121,7 +123,7 @@
|
|
|
121
123
|
router.back();
|
|
122
124
|
}
|
|
123
125
|
async function getActiveStreams() {
|
|
124
|
-
if (selected.value
|
|
126
|
+
if (!selected.value) {
|
|
125
127
|
return; // unmounted
|
|
126
128
|
}
|
|
127
129
|
let channel = "";
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { useRouter } from 'vue-router';
|
|
5
5
|
import { IAppState, EScope, appStateSymbol, appConfigSymbol, IValueText } from '@christianriedl/utils';
|
|
6
6
|
import { DvbService, getDvbServiceSymbol } from '@christianriedl/epg';
|
|
7
|
-
import { EItemType, IMediaFolder, IMediaItem, MediaHelper, getMediaSymbol, getMediaBinSymbol, IMediaService, IMediaAppConfig, ITranscodeParams, IVideoFile } from '@christianriedl/media';
|
|
7
|
+
import { EItemType, EMediaType, IMediaFolder, IMediaItem, MediaHelper, getMediaSymbol, getMediaBinSymbol, IMediaService, IMediaAppConfig, ITranscodeParams, IVideoFile } from '@christianriedl/media';
|
|
8
8
|
|
|
9
9
|
const appState = inject(appStateSymbol)!;
|
|
10
10
|
const appConfig = inject(appConfigSymbol)!;
|
|
@@ -34,6 +34,9 @@
|
|
|
34
34
|
|
|
35
35
|
onMounted(async () => {
|
|
36
36
|
mediaService.log.info('RecordedTVs created');
|
|
37
|
+
if (mediaAppConfig.useMediaBin) {
|
|
38
|
+
const rc = await mediaService.initialize(EMediaType.Video);
|
|
39
|
+
}
|
|
37
40
|
const root = await mediaService.getRecordedTVs();
|
|
38
41
|
selected.value = root;
|
|
39
42
|
items.splice(0, items.length, ...root.files);
|