appError
Emitted when something unexpected or not allowed happens in the room.
Here is a list of the possible error names:
permissions-rejected-> emitted when user tries to screen share, but browser doesn't have enough permissions for itnot-allowed-> emitted when a not allowed action was requested by the user. For example if a user tries to start a recording and recording is not supported in the room, you will receive anot-allowedtype.forbidden-action-> emitted when a forbidden action was requested by the user. For example if a user tries to end a session and doesn't have a permission to do so, then theforbidden-actiontype.authorization-failed-> emitted when a user's authorization into the room is rejected — for example a display name that fails room validation.command-failed-> emitted when an SDK method call fails to be processed on the room side. Thedata.commandfield tells you which method failed. Ifdata.commandis"connect", treat this as fatal: the room did not finish loading and will not recover on its own — reload the iframe or show your own error state rather than treating it as a single failed call.virtual-bg-> emitted for virtual background problems. Historically this covered invalidconfigureVirtualBackground()options only; it now also reports that a requested virtual background was not applied. See Virtual background not applied below.
Sample payload
{
"type": "appError",
"data": {
"name": "not-allowed",
"message": "Recording disabled. You’ll need to edit this room’s properties to record sessions in this room",
"data": {
"type": "recording"
}
}
}Starting from v0.0.58 of @digitalsamba/embedded-sdk, not-allowed can also occur when you call a session-only command (recording, screenshare, whiteboard actions, remote-user actions, hand raise/lower, and similar) before you've joined the session, or after you've left or the session has ended. In that case data.type is "not-joined" and data also includes the command name:
If your integration inspects data on not-allowed errors, make sure it tolerates data.type values it doesn't recognize yet and the additional data.command field — don't assume data only ever has a type key.
message on command-failed always follows the template Failed to process SDK command "<command>", where <command> is the exact method/command name you called.
Virtual background not applied
A virtual background you requested can end up not being applied — either because the participant's device cannot run virtual backgrounds at all, or because applying it failed. Previously this was silent: the participant simply kept their raw camera and your application was never told. It is now reported as an appError with name: "virtual-bg" and a data.reason field.
This matters most when you pass enforce: true to configureVirtualBackground(), because the virtual background panel is hidden from the participant, so nobody in the session notices either.
Sample payload
data.virtualBackgroundConfig describes the background you requested, in exactly the same shape as the virtualBackgroundChanged event — not the background that is now active. It is the requested configuration precisely because that configuration was not applied.
data.reason
unsupported
This device cannot run virtual backgrounds. The request is refused; the participant continues on their raw camera.
failed
The device can run virtual backgrounds, but applying this one failed.
Sample subscription code
Timing and how often it fires
If the background is applied successfully on a later attempt, you receive a normal virtualBackgroundChanged event. A virtual-bg appError is never retracted, so the last VB event you received is always the current truth.
Last updated