mirror of
https://github.com/vector-im/element-call.git
synced 2026-11-13 01:12:29 +00:00
ClientProvider had a `client` prop and a `loadClient` prop and ran the session in an effect: restoring, exposing setClient, changePassword and logout, and holding the "load" broadcast. It takes one `ClientSession` now and only renders what the session says, so the context carries the session itself rather than a parallel `ClientState` shape. - main.tsx builds a `StandaloneClientSession` for the SPA and a `pendingHostClientSession` for the widget; App.tsx no longer waits for the widget client itself. The component wraps the host's client in a `hostClientSession`. - The login and registration pages call `session.login` and `session.register`, and sign a registration in with `setSignedIn` once they are done with the account, in place of `setClient`. The two wrapper hooks and `utils/spa` go; their logic lives in the holder. - `useClient` and `useClientLegacy` keep their shapes minus `setClient`; `useClientSession` and `useClientSessionState` are the new way in. Logging out leaves for home and resets analytics from `useClientLegacy`, as before, around the session's own logout. - `useClientDisconnected` reads the session state directly. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@element-hq/element-call-component
Element Call as a React component, rendered in the host application's page instead of in an iframe. Experimental.
See Element Call as a component in the Element Call README for usage.