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.
2026-10-14 10:23:29 +02:00
committed by Timo
parent 289260531b
commit 432ebadd44
2 changed files with 6 additions and 2 deletions
+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,
};
}
+1 -1
View File
@@ -100,7 +100,7 @@ export const MemberAudioRenderer: FC<MemberAudioRendererProps> = ({
<div style={{ display: "none" }}>
{members.map((member) => (
<MemberAudio
key={member.rtcBackendIdentity}
key={member.memberId}
tracks$={member.tracks$}
muted={muted}
plugins={plugins}