Where the user may move each registered channel's surface, by key. Replaced only when the channels change.
The user's moves, oldest first, one per surface: what the host saves.
Where each registered channel's surface is placed, by key. Replaced only when a placement changes.
The channel whose surface is on the stage, or null.
The stage's surfaces. The array is replaced only when a surface or a placement changes, so it binds cheaply.
Where the user may move a channel's surface; nowhere for a channel without a surface in this session.
The session's channels changed: a surface whose plugin is no longer among them is dropped. Moves are kept.
Starts from saved moves, such as the user's last layout.
Moves a channel's surface. Returns false, changing nothing, for a channel without a surface in this session, a
placement its channel does not allow, or the placement it already has.
Where a channel's surface goes when it leaves the stage (the user leaves the focus layout, or the channel lets go of it): where its channel places it, or the first of picture-in-picture, tab and hidden that it allows.
The plugin behind a surface, or null once its channel has left.
A channel with a surface got its tab. Registering its key again follows the channel's new plugin instance.
Forgets every move: each surface returns to where its channel places it.
The channel whose tab the panel is showing, or null when it shows none (another tab, collapsed, hidden).
Which channel surfaces the call overlay's stage (
mj-media-stage) holds, and where each one shows.Placement. Every surface starts where its channel's registry row places it (
SurfacePlacement: its tab, unless the row says otherwise). The user moves it to the stage (it fills the call), into a picture-in-picture box, to its tab, or out of sight, within the placements the row allows; the moves are kept in order, one per surface, and resolved byResolveSurfacePlacements, so the most recent move to the stage wins it, the surface it displaces returns to where its channel places it, and picture-in-picture boxes stack newest first. The host saves Moves and loads them back (LoadMoves), so a layout carries over to later sessions.Creation. A channel's surface is created the first time it is seen (its tab shows it, or it is on the stage or in a picture-in-picture box) and kept until the channel leaves the session. Moving it, hiding the panel or switching tabs only changes where it shows, so a whiteboard keeps its view and a stream keeps playing.
Pure state with no Angular: the overlay reports the session's channels, the channel tab the panel is showing and the user's moves, and binds Surfaces to the stage.