Widget ID: shared-control. API: documented below. Needs a connection to another participant: see widgets that need a connection.

Purpose

Participants use your site together. One starts a session and invites the others; those who join see the same page, and every member can click, type, scroll and follow links. The widget's window lists the members and an activity feed (Alice: Typing); invitations arrive as notifications.

How it works

  • The page is shown in a frame. When the session starts, your page is shown in a frame that keeps the session, camera and microphone running across page loads. Your pages must allow being framed by the same origin (X-Frame-Options: SAMEORIGIN or no header; frame-ancestors 'self'). A page that cannot be framed, or a link to another site, opens in a new tab for the member who followed it, and they are offered to share their screen with Weei's screen sharing so the others can follow; the session goes on, and the other members stay on the page before. Where the browser blocks the new tab, that member leaves the session.
  • One size for everyone. The frame takes the largest size every member's window can show — the smallest width and height among them — and is centred on larger screens, so the page is laid out alike on a phone and a laptop.
  • Actions, not pixels. Members' clicks, input, checkboxes and scrolling are applied on the other members' pages; forms are submitted only by the member who submits them. Elements are found as in Recording Demos; when an element is not on a member's page, their feed says so instead of acting on another element.
  • Pointers. Members' pointers and clicks are shown over the page with their names. Pointers are shared only with the members of the session.
  • Recordings. A recording can be started during a session; it records every member. A recording can be played during a session; it plays for every member.

Getting the API

The API is available as soon as loadWeei() resolves, if the widget is enabled for your site. The widget window does not need to be open.

JavaScript
const weei = await window.weeiReady;
const sharedControl = weei.widgetsApi.get('shared-control');
if (!sharedControl) throw new Error('Shared control is not enabled for this site.');
MethodBehavior
isActive()Whether this browser is in a session.
start()Starts a session and invites everyone connected, or shows the running one. Shows a notice instead when nobody is connected or a demo is being recorded.
leave()Leaves the session. When one member is left, the session ends for them too.
members()The peer IDs of the other members; empty outside a session.

Good to know

  • Actions on elements marked data-weei-no-replay are not applied on the other members' pages, and elements marked data-weei-ignore are not shared. Password fields are never shared.
  • A session cannot be started while a demo is being recorded on its own; start the session first, then record.