mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-16 09:31:20 -04:00
wuhg
This commit is contained in:
@@ -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]);
|
||||
|
||||
Reference in New Issue
Block a user