Skip to content

Commit

Permalink
fixed bug when maximized participant is leaving
Browse files Browse the repository at this point in the history
  • Loading branch information
matthme committed Jul 6, 2024
1 parent be5906e commit 12e10ed
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"start": "AGENTS=1 npm run network",
"network": "hc s clean && npm run build:happ && UI_PORT=8888 concurrently \"npm start -w ui\" \"npm run launch:happ\"",
"test": "npm run build:zomes && hc app pack workdir --recursive && npm t -w tests",
"applet-dev": "concurrently \"UI_PORT=8888 npm run start -w ui\" \"we-dev-cli --agent-idx 1 --dev-config ./we.dev.config.ts\" \"sleep 10 && we-dev-cli --agent-idx 2 --dev-config ./we.dev.config.ts\"",
"applet-dev": "concurrently \"UI_PORT=8888 npm run start -w ui\" \"we-dev-cli --agent-idx 1 --dev-config ./we.dev.config.ts\" \"sleep 10 && we-dev-cli --agent-idx 2 --dev-config ./we.dev.config.ts --sync-time 20000\"",
"applet-dev-3": "concurrently \"UI_PORT=8888 npm run start -w ui\" \"we-dev-cli --agent-idx 1 --dev-config ./we.dev.config.ts\" \"sleep 10 && we-dev-cli --agent-idx 2 --dev-config ./we.dev.config.ts\" \"sleep 10 && we-dev-cli --agent-idx 3 --dev-config ./we.dev.config.ts\"",
"applet-dev-1": "concurrently \"UI_PORT=8888 npm run start -w ui\" \"we-dev-cli --agent-idx 1 --dev-config ./we.dev.config.ts\"",
"help": "we-dev-cli --help",
Expand Down
4 changes: 4 additions & 0 deletions ui/src/room-view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,10 @@ export class RoomView extends LitElement {
peer.destroy();

const openConnections = this._openConnections;
const relevantConnection = openConnections[encodeHashToBase64(connectingAgent)];
if (this._maximizedVideo === relevantConnection.connectionId) {
this._maximizedVideo = undefined;
}
delete openConnections[encodeHashToBase64(connectingAgent)];
this._openConnections = openConnections;
this.requestUpdate();
Expand Down

0 comments on commit 12e10ed

Please sign in to comment.