This commit is contained in:
legop3
2025-11-29 21:34:31 -05:00
parent b5e44100a2
commit 5ad75aa465
3 changed files with 15 additions and 7 deletions
+10 -2
View File
@@ -13,11 +13,16 @@ function normalizeEntry(entry) {
if (typeof entry === 'object') {
if (entry.type && entry.id) {
const id = String(entry.id);
const audioId = entry.audioId ? String(entry.audioId) : null;
let key = entry.key;
if (!key) {
key = entry.type === 'room' ? `room:${id}` : id;
}
return {
type: entry.type,
id,
key: entry.key || `${entry.type}:${id}`,
audioId: entry.audioId ? String(entry.audioId) : null,
key,
audioId,
};
}
if (entry.roverId) {
@@ -139,6 +144,9 @@ export function useVideoRequests(sourceList = []) {
if (sources[entry.key]) {
next[entry.key] = sources[entry.key];
}
if (entry.audioId && sources[entry.audioId]) {
next[entry.audioId] = sources[entry.audioId];
}
});
return next;
}, [normalizedKey, sources, normalizedEntries]);