@christianriedl/media 1.0.163 → 1.0.165

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.163",
3
+ "version": "1.0.165",
4
4
  "description": "RIC media interfaces",
5
5
 
6
6
  "main": "dist/index.js",
@@ -49,6 +49,7 @@
49
49
  items.splice(0, items.length, ...root.files);
50
50
  computeListHeight();
51
51
  });
52
+ onUnmounted(() => selected.value.itemType = EItemType.None);
52
53
 
53
54
  watch(appState.bodyHeight, () => computeListHeight());
54
55
 
@@ -98,7 +99,7 @@
98
99
  selected.value = item;
99
100
  computeListHeight();
100
101
  if (mediaAppConfig.useSatIp) {
101
- audioStreams.splice(0, audioStreams.count);
102
+ audioStreams.splice(0, audioStreams.length);
102
103
  audioStream.value = null;
103
104
  await getActiveStreams();
104
105
  }
@@ -122,6 +123,9 @@
122
123
  router.back();
123
124
  }
124
125
  async function getActiveStreams() {
126
+ if (selected.value.itemType == EItemType.None) {
127
+ return; // unmounted
128
+ }
125
129
  let channel = "";
126
130
  let url = "";
127
131
  if (selected.value.itemType == EItemType.VideoBroadcast && audioStreams.length == 0) {
@@ -130,16 +134,15 @@
130
134
  }
131
135
  const mediaInfo = await mediaService.getSatIpProbe(channel, url);
132
136
  if (mediaInfo) {
133
- numActiveStreams.value = `${mediaInfo.numActiveStreams}`;
137
+ numActiveStreams.value = `${mediaInfo.numActiveStreams} active streams`;
134
138
  if (mediaInfo.audioStreams) {
135
139
  const as = MediaHelper.getAudioStreams(mediaInfo);
136
140
  audioStreams.splice(0, audioStreams.length, ...as);
137
141
  audioStream.value = 0;
138
- return;
139
142
  }
140
- }
141
- if (numActiveStreams.value > 0) {
142
- window.setTimeout(async () => await getActiveStreams(), 1000);
143
+ if (mediaInfo.numActiveStreams > 0) {
144
+ window.setTimeout(async () => await getActiveStreams(), 1000);
145
+ }
143
146
  }
144
147
  }
145
148
  </script>