@christianriedl/media 1.0.165 → 1.0.167
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)
|
|
@@ -103,14 +105,12 @@
|
|
|
103
105
|
audioStream.value = null;
|
|
104
106
|
await getActiveStreams();
|
|
105
107
|
}
|
|
106
|
-
|
|
107
|
-
paramsText.value = `${video.width}x${video.height}`;
|
|
108
|
-
return;
|
|
108
|
+
onQualityChange();
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
function onQualityChange() {
|
|
112
112
|
const video = selected.value as IVideoFile;
|
|
113
|
-
if (quality.value > 0) {
|
|
113
|
+
if (quality.value > 0 || !mediaAppConfig.useSatIp) {
|
|
114
114
|
params = MediaHelper.getTranscodeParams(mediaAppConfig.useSatIp, video.width, video.height, window.innerWidth, quality.value);
|
|
115
115
|
paramsText.value = params.text;
|
|
116
116
|
}
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
router.back();
|
|
124
124
|
}
|
|
125
125
|
async function getActiveStreams() {
|
|
126
|
-
if (selected.value
|
|
126
|
+
if (!selected.value) {
|
|
127
127
|
return; // unmounted
|
|
128
128
|
}
|
|
129
129
|
let channel = "";
|