Web Component Reference
Our web component allows you to embed Whereby's pre-built UI on any webpage. It provides a simple readable integration and exposes local client events and commands between our platform and yours.
Installation
When using React or a bundler like Webpack, Rollup, Parcel, etc
You can use a hostRoomUrl
instead of the roomUrl
, if you want to give the user host privileges
If you aren't using a bundler or a library containing a bundler you can access the component code directly from our CDN using a simple Script tag in your site
Attributes of the component
The web component has a variety of attributes available to customize the meeting experience for your users. It’s possible for each participant in a meeting to have different attribute combinations.
Attribute | Value | Description |
---|---|---|
| Nothing (on) or | Turn off acoustic echo cancellation on audio |
| Nothing (on) or | Turn off acoustic echo cancellation on audio |
|
| Enter meeting with audio off |
| Nothing (on) or | Enables/Disables the noise cancelation feature |
| Nothing (off) or | Automatically hide the self view in the bottom right |
| Nothing (on) or | Automatically spotlight the local "host" on room join |
| Image URL - Must be HTTPS and cannot contain query params | Set the avatar picture of the participant. The image must be a |
|
| Render without background to let embedding app render its own |
|
| Hide the entire bottom tool bar. Useful if creating buttons using commands |
| Nothing (on) or | Show/hide the Breakout Groups feature for the meeting host. |
| Nothing (on) or | Disable camera access for the local participant, allowing for only audio input |
|
| Set the default camera effect to be used. |
| Nothing (on) or | Enable/disable chat |
| Nothing(off) or | Enable/disable Whereby's call quality monitoring interface |
| 100 character string - Excluding | Set displayname of participant |
| Up to 36 alphanumeric characters (details) | Custom identifier for the participant. Can be searched in insights endpoints |
| Nothing (on) or | Float the self view to the bottom right |
| "Group Name(s)" - EX: "orange, banana, coconut" | Predefine up to 20 groups for the breakout groups function. |
| Nothing (en) or | Set the meeting UI language to match your product or service. Select from either English en, French fr, Italian it, German de, Norwegian nb, Danish da, Dutch nl, Portuguese pt, Polish pl, Spanish es, Hindi hi, Czech cs, Chinese (Complex) zh-hant or Japanese jp. |
| Nothing (on) or | Enable/disable the leave button |
| Nothing (on) or | Show/hide the language picker |
| Nothing (on) or | Show/hide the room lock button and settings toggle |
| Nothing (on) or | Show/hide the logo in the room header |
| Nothing (on) or | Use a lower resolution by default |
|
|
|
| Nothing (on) or | Apply minimal UI for embed scenarios |
| Nothing (on) or | Show/hide the “…” button |
| Nothing (on) or | Show/hide the participant counter |
| Nothing (on) or | Show/hide the participant list |
| Nothing (on) or | Show/hide the Picture in Picture button |
| Nothing (on) or | Determines if users see the pre-call device and connectivity test |
| Nothing (off) or | Adds functionality for participants to skip the connectivity test |
|
| Specify custom help link in pre-call review step pointing users to additional support pages |
| A room URL | The full URL of the room you want to embed (required) |
| Nothing (off) or | Enables YouTube and Miro integrations in the meeting |
| Nothing (on) or | Enable/disable screenshare |
| Nothing (on) or | Skips request permissions UI and asks for devices directly. Required for links used in Android Apps |
| Nothing (off) or | Show/hide name labels in the subgrid |
| Nothing (on) or | Show/hide the meeting timer |
| Nothing (on) or | Sets button icon labels color to black. |
| Nothing (on) or | Used to toggle the entire top toolbar on/off. Top toolbar is hidden by default if using |
|
| Enter meeting with video off |
There are additional room customizations and options that can be found in the URL parameters section. These options must be added as parameters on the room
source URL, and are not currently supported as attributes directly on the component.
Usage examples
Listening to events
You can listen for events on the <whereby-embed>
component. The following events are supported:
Event type | Description | Properties (from "detail") |
---|---|---|
| Basic dependencies have loaded and the room is ready to be used | – |
| The local user grants permission to camera and microphone in the pre-call screen | { granted: Boolean } |
| The local user denies permission to camera and microphone in the pre-call screen | { denied: Boolean } |
| The local user completed the presented pre-call check steps.
Possible values for all | { status: String, steps: { camera: { status: String; }, speaker: { status: String; }, microphone: { status: String; }, bandwidth: { status: String; }, } } |
| The local user skipped the presented pre-call check steps | - |
| The local user knocks to get into the room | – |
| The local user joins | – |
| The local user leaves | { removed: Boolean } |
| A host has ended the meeting via "end meeting for all" | – |
| A new participant join/leave | { count: Number } |
| A new participant joins the room | { participant: { metadata: String } } |
| A participant leaves the room | { participant: { metadata: String } } |
| The local user toggles the microphone | { enabled: Boolean } |
| The local user toggles the camera | { enabled: Boolean } |
| The local user toggles the chat | { open: Boolean } |
| The local user toggles the people pane | { open: Boolean } |
| The local user toggles Picture-in-Picture mode | { open: Boolean } |
| The local user toggles the screenshare | { enabled: Boolean } |
| Streaming status changes. Possible values: " | requested | starting | streaming | stopping | stopped" | { status: String } |
| User connection status changes. Possible values: "stable | unstable" | { status: String } |
You can use standard JavaScript to listen to the events. Here's an example:
Example output:
Sending commands
For this feature to work, you must add the origin of your application to the "Allowed domains" section in your Whereby account. If not present, the following methods will not do anything.
The <whereby-embed>
component exposes a set of methods your application can invoke to perform actions in the room. Currently, the following methods are available:
Method | Description |
---|---|
| End meeting for all on behalf of the local user, who needs to be a host in the room. |
| Knock on a locker room, on behalf of the local user. |
| Allows local user to leave the room. |
| Start cloud recording on behalf of the local user, who needs to be a host in the room. |
| Stop cloud recording on behalf of the local user, who needs to be a host in the room. |
| Start streaming on behalf of the local user, who needs to be a host in the room. |
| Stop streaming on behalf of the local user, who needs to be a host in the room. |
| Start live transcription on behalf of the local user, who needs to be a host in the room. |
| Stop live transcription on behalf of the local user, who needs to be a host in the room. |
| Toggle the local user's camera on or off. Without any arguments, it toggles depending on current state. |
| Toggle the local user's microphone on or off. Without any arguments, it toggles depending on current state. |
| Toggle the local user's screenshare on or off. Without any arguments, it toggles depending on current state. |
| Toggle the local user's chat open or closed. Without any arguments, it toggles depending on current state. |
Here is a small example showing uses of these methods:
Last updated