@christianriedl/media 1.0.161 → 1.0.163
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/dist/iMedia.d.ts +1 -0
- package/package.json +1 -1
- package/src/views/OnlineTVsPage.vue +46 -9
- package/src/views/PhotosPage.vue +1 -1
package/dist/iMedia.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -23,7 +23,8 @@
|
|
|
23
23
|
const listHeight = ref(0);
|
|
24
24
|
const listhead = ref<ComponentPublicInstance | null>(null);
|
|
25
25
|
const audioStreams: IValueText[] = reactive([]);
|
|
26
|
-
const audioStream = ref(
|
|
26
|
+
const audioStream = ref<number | null>(null);
|
|
27
|
+
const numActiveStreams = ref("");
|
|
27
28
|
const qualities = MediaHelper.getVideoQualities();
|
|
28
29
|
const quality = ref(0);
|
|
29
30
|
let params: ITranscodeParams;
|
|
@@ -36,6 +37,9 @@
|
|
|
36
37
|
if (mediaAppConfig.useMediaBin) {
|
|
37
38
|
const rc = await mediaService.initialize(EMediaType.Online);
|
|
38
39
|
}
|
|
40
|
+
if (mediaAppConfig.useSatIp) {
|
|
41
|
+
await getActiveStreams();
|
|
42
|
+
}
|
|
39
43
|
const root = await mediaService.getOnlineTVs();
|
|
40
44
|
for (var i = 0; i < root.files.length; i++) {
|
|
41
45
|
const video = root.files[i];
|
|
@@ -61,10 +65,12 @@
|
|
|
61
65
|
let url;
|
|
62
66
|
if (mediaAppConfig.useSatIp) {
|
|
63
67
|
url = `${(mediaService as MediaService).rest.serviceUrl}apistream/satipstream?channelName=${selected.value.name}&url=${encodeURIComponent(selected.value.url)}`;
|
|
64
|
-
if (audioStream.value)
|
|
68
|
+
if (audioStream.value != null)
|
|
65
69
|
url += `&audioStream=${audioStream.value}`;
|
|
66
70
|
if (params)
|
|
67
71
|
url += `&width=${params.width}&height=${params.height}&videoBitRate=${params.videoBitRate}&audioBitRate=${params.audioBitRate}`;
|
|
72
|
+
else if (audioStream.value != null && audioStreams[audioStream.value].text.toLowerCase().startsWith('ac'))
|
|
73
|
+
url += '&audioBitRate=0';
|
|
68
74
|
}
|
|
69
75
|
else {
|
|
70
76
|
url = await epgCache.epg.requestChannelStream(selected.value.name, 'mp4', undefined, params.videoBitRate, params.scaleFactor);
|
|
@@ -92,24 +98,50 @@
|
|
|
92
98
|
selected.value = item;
|
|
93
99
|
computeListHeight();
|
|
94
100
|
if (mediaAppConfig.useSatIp) {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
101
|
+
audioStreams.splice(0, audioStreams.count);
|
|
102
|
+
audioStream.value = null;
|
|
103
|
+
await getActiveStreams();
|
|
98
104
|
}
|
|
99
105
|
const video = item as IVideoFile;
|
|
100
|
-
|
|
101
|
-
paramsText.value = params.text;
|
|
106
|
+
paramsText.value = `${video.width}x${video.height}`;
|
|
102
107
|
return;
|
|
103
108
|
}
|
|
104
109
|
}
|
|
105
110
|
function onQualityChange() {
|
|
106
111
|
const video = selected.value as IVideoFile;
|
|
107
|
-
|
|
108
|
-
|
|
112
|
+
if (quality.value > 0) {
|
|
113
|
+
params = MediaHelper.getTranscodeParams(mediaAppConfig.useSatIp, video.width, video.height, window.innerWidth, quality.value);
|
|
114
|
+
paramsText.value = params.text;
|
|
115
|
+
}
|
|
116
|
+
else {
|
|
117
|
+
params = null;
|
|
118
|
+
paramsText.value = `${video.width}x${video.height}`;
|
|
119
|
+
}
|
|
109
120
|
}
|
|
110
121
|
function listBack() {
|
|
111
122
|
router.back();
|
|
112
123
|
}
|
|
124
|
+
async function getActiveStreams() {
|
|
125
|
+
let channel = "";
|
|
126
|
+
let url = "";
|
|
127
|
+
if (selected.value.itemType == EItemType.VideoBroadcast && audioStreams.length == 0) {
|
|
128
|
+
channel = selected.value.name;
|
|
129
|
+
url = selected.value.url;
|
|
130
|
+
}
|
|
131
|
+
const mediaInfo = await mediaService.getSatIpProbe(channel, url);
|
|
132
|
+
if (mediaInfo) {
|
|
133
|
+
numActiveStreams.value = `${mediaInfo.numActiveStreams}`;
|
|
134
|
+
if (mediaInfo.audioStreams) {
|
|
135
|
+
const as = MediaHelper.getAudioStreams(mediaInfo);
|
|
136
|
+
audioStreams.splice(0, audioStreams.length, ...as);
|
|
137
|
+
audioStream.value = 0;
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
if (numActiveStreams.value > 0) {
|
|
142
|
+
window.setTimeout(async () => await getActiveStreams(), 1000);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
113
145
|
</script>
|
|
114
146
|
|
|
115
147
|
<template>
|
|
@@ -125,6 +157,11 @@
|
|
|
125
157
|
<v-list-item-subtitle>{{paramsText}}</v-list-item-subtitle>
|
|
126
158
|
</v-list-item-content>
|
|
127
159
|
</v-list-item>
|
|
160
|
+
<v-list-item v-if="mediaAppConfig.useSatIp" lines="one">
|
|
161
|
+
<v-list-item-content>
|
|
162
|
+
<v-list-item-title>{{numActiveStreams}}</v-list-item-title>
|
|
163
|
+
</v-list-item-content>
|
|
164
|
+
</v-list-item>
|
|
128
165
|
<v-card-actions>
|
|
129
166
|
<v-btn @click="listBack">
|
|
130
167
|
<v-icon icon="$back" />
|
package/src/views/PhotosPage.vue
CHANGED
|
@@ -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
|
}
|