mirror of
https://github.com/element-hq/element-call.git
synced 2026-10-06 03:47:16 +00:00
Set up `sdk/` as a package shaped exactly like `component/`: its own package.json with peer dependencies, the pnpm workspace marker so a host can install it as a git dependency, a build tsconfig for type emission, and a vite lib config with an externals list that `pnpm lint:externals` now checks for both library builds. The package holds only the interface for now. `createRtcSession` returns an empty object; `RtcSession`, `RtcMember`, `MemberMedia` and `TransportMetadata` are the contract Element Call's `CallViewModel` will be rebuilt on (see sdk-plan.md). The shared primitives are re-exported from `src` until the first implementation slice moves them. `sdk/dev` is the smallest consumer of the SDK: a plain page that logs in, joins a room and renders one tile per member, served by `pnpm dev:sdk` on port 3002. Playwright starts it as a third web server, and `playwright/sdk/smoke.spec.ts` has two browsers join one session. It fails on the status line with the SDK's own error until there is an implementation behind the interface. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
57 lines
1.5 KiB
HTML
57 lines
1.5 KiB
HTML
<!doctype html>
|
|
<!--
|
|
Copyright 2026 Element Creations Ltd.
|
|
|
|
SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
|
|
Please see LICENSE in the repository root for full details.
|
|
-->
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<title>MatrixRTC SDK harness</title>
|
|
<style>
|
|
body {
|
|
margin: 1rem;
|
|
font-family: system-ui, sans-serif;
|
|
}
|
|
form {
|
|
display: flex;
|
|
gap: 0.5rem;
|
|
flex-wrap: wrap;
|
|
}
|
|
#members {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
|
|
gap: 0.5rem;
|
|
}
|
|
#members video {
|
|
width: 100%;
|
|
aspect-ratio: 4 / 3;
|
|
background: #222;
|
|
}
|
|
#members h2 {
|
|
font-size: 1rem;
|
|
margin: 0.25rem 0;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<form>
|
|
<input
|
|
name="homeserver"
|
|
placeholder="homeserver"
|
|
value="https://synapse.m.localhost"
|
|
/>
|
|
<input name="username" placeholder="username" />
|
|
<input name="password" type="password" placeholder="password" />
|
|
<input name="room" placeholder="room id or alias" />
|
|
<button type="submit">Start</button>
|
|
<button type="button" id="leave" hidden>Leave</button>
|
|
</form>
|
|
<p id="status" data-testid="status"></p>
|
|
<main id="members"></main>
|
|
<script type="module" src="./main.ts"></script>
|
|
</body>
|
|
</html>
|