Key media tiles by the membership id

The bumped js-sdk reports the legacy identity as rtcBackendIdentity for every membership, so a device that rejoins after an improper leave, which has two memberships until the stale one expires, produced two tiles with the same key and crashed the call view. The membership id tells them apart; the audio renderer keys by it too.
This commit is contained in:
Timo K. authored and Timo committed 2026-10-14 10:23:29 +02:00
1 parent 289260531b
commit 432ebadd44
2 files changed
+6 -2

No files matched your search

+5 -1
View File
@@ -658,9 +658,13 @@ export function createCallViewModel$(
function* ([members, duplicateTiles]) {
for (const member of members) {
const mediaId = `${member.userId}:${member.deviceId}`;
// A device that rejoins after an improper leave has two
// memberships until the stale one expires, so the key is the
// membership's own id, which the backend identity no longer
// tells apart
for (let dup = 0; dup < 1 + duplicateTiles; dup++) {
yield {
keys: [dup, mediaId, member.rtcBackendIdentity],
keys: [dup, mediaId, member.memberId],
data: member,
};
}