@christianriedl/media 1.0.164 → 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.164",
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
 
@@ -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) {
@@ -135,11 +139,10 @@
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>