Join Meeting Room
It's simple to publish the local participant's camera and/or microphone streams to the room.
Let's see how to initialize an arctos instance.
// wait for arctos-widget.js to load
window.addEventListener('ArctosLoad', async function (e) {
// create an instance of Arctos
var arctosSdkInstance = new Arctos({
endpointUrl: 'https://[your-endpoint-url]/',
endpointKey: '[your-endpoint-key]',
});
// create a session object
await arctosSdkInstance.initSession({
sessionId: '[task-number]',
accessToken: '[your-access-token]',
});
// other code here
});
Then by calling arctos.initMeetingRoom method you can join a properly initialized session.
// create a meeting room
await arctosSdkInstance.initMeetingRoom({
isDebug: false,
recordingAutoStart: false,
showPrejoin: false,
showToolbar: false,
});
### Parameters
isDebug(boolean, default:false) — Enable debug mode. When enabled, the SDK logs additional diagnostic information and events to the browser console (for example internal state and connection events). Use during development or troubleshooting; set tofalsein production.recordingAutoStart(boolean, default:false) — Automatically start recording when a user joins the meeting. Iftrue, the SDK will attempt to start recording at meeting start. Recording may require server-side support and appropriate permissions from the CMS/backend.showPrejoin(boolean, default:false) — Show a pre-join (device check) UI that lets users verify and configure microphone/camera/devices before entering the meeting. Iffalse, users enter the meeting immediately.showToolbar(boolean, default:false) — Show the SDK's default toolbar (e.g. mute, share, leave buttons). Set tofalseif you want to implement a custom toolbar and control UI actions using the SDK's methods and events.
Example: enable debug and pre-join while using the default toolbar for development:
await arctosSdkInstance.initMeetingRoom({
isDebug: true,
recordingAutoStart: false,
showPrejoin: true,
showToolbar: true,
});
Notes:
- Availability of automatic recording (
recordingAutoStart) depends on server-side support and permissions (for example, whether the CMS has granted recording rights for the task/user). - If you disable
showToolbar, make sure to implement equivalent controls (mute/unmute, stop video, leave) using the SDK APIs so users still have necessary functionality.
You must ask CMS Server for a user token. To do so:
Initialize a Task in CMS Server
Create a [moderator/publisher] in this task in CMS Server
Push the accessToken to your client-side to use it on
arctosSdkInstance.initSession()method.
If you need to leave the meeting room, you can use the following methods:
// Click the button to leave the meeting
leaveClick = async function () {
await arctosSdkInstance.$meetingRoom.destroy();
};
The following url is a sample code for joining a meeting room.
