Conference Room
ArctosLinks.Conference
provides an API to manage and control various operations in a conference room.
These features include creating and closing rooms, handling join requests, removing participants, updating room information, adjusting screen layouts, etc.
ArctosLinks.ConferenceEventCallback
provides event callbacks to help developers handle various events in the conference room. iOS developers need to import RxSwift, and Android developers need to import coroutines flow. These libraries are not included in the SDK and must be imported separately.
Here is how to use this SDK to implement these operations.
Host Only
host create room
Function: Create a new conference room. Only users logged in as host
can perform this operation.
Parameters:
- roomName: The title of the conference room, type String.
- description: Detailed description of the conference room, type String.
Return value: If the room is successfully created, returns completion; otherwise, returns an error.
import ArctosLinks
import RxSwift
func hostCreateRoom(roomName: String = "Weekly Meeting", description: String? = "Discuss weekly updates") {
_ = ArctosLinks.Conference.hostCreateRoom(roomName: roomName, description: description)
.subscribe(onSuccess: { _ in
print("🎉 Successfully created conference room.")
}, onFailure: { error in
print("Conference room creation failed: \(error.localizedDescription)")
})
}
import com.arctos.sdk.links.core.application.ArctosLinks
private suspend fun hostCreateRoom(roomName: String = "Weekly Meeting", description: String = "Discuss weekly updates") {
runCatching {
ArctosLinks.getInstance(Context).conferenceManager.hostCreateRoom(roomName = roomName, description = description)
.getOrThrow()
}.onSuccess { result ->
if (result)
Log.d(TAG, "Meeting room created successfully")
else
Log.d(TAG, "Failed to create meeting room")
}.onFailure {
Log.d(TAG, "Failed to create meeting room: ${it.message}")
}
}
#include "arctos_qt.h"
void hostCreateRoom(const std::string& name, const std::string& description) {
auto& arctos_app = arctos::ArctosQt::getInstance();
arctos_app.hostCreateRoom(name.c_str(), description.c_str()); // emit roomCreationFailed signal when failed
}
host close room
Function: The host
closes the conference room. Only the host
who created the room can perform this operation.
Parameters:
- roomId: The ID of the conference room, type String.
Return value: If the room is successfully closed, returns completion; otherwise, returns an error.
Callback triggered: Host closes the conference room
import ArctosLinks
import RxSwift
func hostCloseRoom(roomId: String = "unique_room_id") {
_ = ArctosLinks.Conference.hostCloseRoom(roomId: roomId)
.subscribe(onSuccess: { _ in
print("🎉 Successfully closed room.")
}, onFailure: { error in
print("Failed to close room: \(error.localizedDescription)")
})
}
import com.arctos.sdk.links.core.application.ArctosLinks
private suspend fun hostCloseRoom(roomId: String = "unique_room_id") {
runCatching {
ArctosLinks.getInstance(Context).conferenceManager.hostCloseRoom(roomId = roomId)
.getOrThrow()
}.onSuccess { result ->
if (result)
Log.d(TAG, "Meeting room closed successfully")
else
Log.d(TAG, "Failed to close meeting room")
}.onFailure {
Log.d(TAG, "Failed to close meeting room ${it.message}")
}
}
#include "arctos_qt.h"
void hostCloseRoom(const std::string& room_id) {
auto& arctos_app = arctos::ArctosQt::getInstance();
arctos_app.hostRemoveRoom(room_id.c_str()); // emit roomRemovingFailed signal when failed
}
host join handle
Function: The host
handles the request to join the conference room. Only the host
can perform this operation.
Parameters:
- roomId: The ID of the conference room, type String.
- applicantId: The ID of the applicant, type Int.
- accept: Whether to accept the request, type Bool.
- message: Approval or rejection message, type String.
Return value: If the request is successfully handled, returns completion; otherwise, returns an error.
Callback triggered: Response to join room request
import ArctosLinks
import RxSwift
func hostHandleJoinRequest(at roomId: String = "unique_room_id", for applicantId: Int = .min, isAccept: Bool = Bool.random()) {
let message: String = isAccept ? "Welcome!" : "Sorry, all available places have been taken."
_ = ArctosLinks.Conference.hostJoinHandle(roomId: roomId, applicantId: applicantId, accept: isAccept, message: message)
.subscribe(onSuccess: { _ in
if isAccept {
print("Approved applicant to join room.")
} else {
print("Disapproved applicant to join room.")
}
}, onFailure: { error in
print("Failed to handle join request: \(error.localizedDescription)")
})
}
import com.arctos.sdk.links.core.application.ArctosLinks
private suspend fun hostHandleJoinRequest(
roomId: String,
applicantId: String,
accept: Boolean,
message: String? = "Welcome!"
) {
runCatching {
ArctosLinks.getInstance(Context).conferenceManager.hostJoinHandle(
roomId = roomId,
applicantId = applicantId,
accept = accept,
message = message
).getOrThrow()
}.onSuccess { result ->
if (result)
Log.d(TAG, "Approved applicant to join room")
else
Log.d(TAG, "Disapproved applicant to join room")
}.onFailure {
Log.d(TAG, "Failed to handle join request: ${it.message} , ${it.cause}")
}
}
#include "arctos_qt.h"
void hostHandleJoinRequest(const std::string& room_id,
const std::string& user_id,
const std::string& carrier_id,
const std::string& carrier_address,
bool accept) {
auto& arctos_app = arctos::ArctosQt::getInstance();
arctos_app.handleJoinRequest(room_id.c_str(),
user_id.c_str(),
carrier_id.c_str(),
carrier_address.c_str(),
accept); // emit errorMessage when failed
}
host kick participant
Function: The host
removes a participant. Only the host
can perform this operation.
Parameters:
- roomId: The ID of the conference room, type String.
- participantId: The ID of the participant to be removed, type Int.
- message: Explanation message, type String.
Return value: If the participant is successfully removed, returns completion; otherwise, returns an error.
Callback triggered: Other participants receive Participant removed by host; the removed participant receives Removed by host
import ArctosLinks
import RxSwift
func hostRemoveParticipant(at roomId: String = "unique_room_id", for participantId: Int, with message: String? = "Inappropriate behavior") {
_ = ArctosLinks.Conference.hostKickParticipant(from: roomId, participantId: participantId, with: message)
.subscribe(onSuccess: { _ in
print("Successfully removed participant.")
}, onFailure: { error in
print("Failed to remove participant: \(error.localizedDescription)")
})
}
import com.arctos.sdk.links.core.application.ArctosLinks
private suspend fun hostRemoveParticipant(
roomId: String,
participantId: String,
message: String
) {
runCatching {
ArctosLinks.getInstance(Context).conferenceManager.hostKickParticipant(
roomId = roomId, participantId = participantId, message = message)
.getOrThrow()
}.onSuccess { _ ->
Log.d(TAG, "Successfully removed participant")
}.onFailure {
Log.d(TAG, "Failed to remove participant: ${it.message}")
}
}
#include "arctos_qt.h"
void hostRemoveParticipant(const std::string& room_id,
const std::string& user_id) {
auto& arctos_app = arctos::ArctosQt::getInstance();
arctos_app.leaveRoom(room_id.c_str(), user_id.c_str()); // emit errorMessage when failed
}
host update room info
Function: The host
updates the room name and description. Only the host
can perform this operation.
Parameters:
- roomId: The ID of the conference room, type String.
- roomName: The new room name, type String.
- description: The new room description, type String.
Return value: If the information is successfully updated, returns completion; otherwise, returns an error.
Callback triggered: Room info updated
import ArctosLinks
import RxSwift
func hostUpdateRoomInfo(at roomId: String = "unique_room_id", name: String? = "Updated Room Name", description: String? = "New room description") {
_ = ArctosLinks.Conference.hostUpdateRoomInfo(roomId: roomId, roomName: name, description: description)
.subscribe(onSuccess: { _ in
print("Successfully updated room info.")
}, onFailure: { error in
print("Failed to update room info: \(error.localizedDescription)")
})
}
import com.arctos.sdk.links.core.application.ArctosLinks
private suspend fun hostUpdateRoomInfo(
roomId: String,
roomName: String,
description: String
) {
runCatching {
ArctosLinks.getInstance(Context).conferenceManager.hostUpdateRoomInfo(
roomId = roomId,
roomName = roomName,
description = description
).getOrThrow()
}.onSuccess { _ ->
Log.d(TAG, "Successfully updated room info")
}.onFailure {
Log.d(TAG, "Failed to update room info: ${it.message}")
}
}
#include "arctos_qt.h"
void hostUpdateRoomInfo(const std::string& room_id,
const std::string& name,
const std::string& description) {
auto& arctos_app = arctos::ArctosQt::getInstance();
arctos_app.updateRoomInfo(room_id.c_str(), name.c_str(), description.c_str()); // emit errorMessage when failed
}
host switch screen template
Function: Switch the screen layout of the conference room. Only the host
can perform this operation.
Parameters:
- templateType (ScreenTemplate): Layout style, see ScreenTemplate for available options.
Error handling: If the user is unauthorized or the layout type is invalid, an error is thrown.
import ArctosLinks
func hostSwitchTemplate(to template: ArctosLinks.Conference.ScreenTemplate) {
do {
try ArctosLinks.Conference.hostSwitchScreenTemplate(to: .template_1)
print("Successfully switched screen template.")
} catch {
print("Failed to switch screen template: \(error.localizedDescription)")
}
}
import com.arctos.sdk.links.core.application.ArctosLinks
private fun hostSwitchScreenTemplate(template: ConferenceRoomInterface.ScreenTemplate) {
runCatching {
ArctosLinks.getInstance(Context).conferenceManager.hostSwitchScreenTemplate(
template
).getOrThrow()
}.onSuccess {
Log.d(TAG, "Successfully switched screen template")
}.onFailure {
Log.d(TAG, "Failed to switch screen template: ${it.message}")
}
}
#include "arctos_qt.h"
void hostSwitchScreenTemplate(int layout_id /*1 - 4*/) {
auto& arctos_app = arctos::ArctosQt::getInstance();
arctos_app.media()->setTemplate(layout_id);
}
Common
Join Room
Function: Send a request to join a conference room.
Parameters:
- roomID: The ID of the conference room, type String.
The creator of the conference room is the host. After sending the request, the host can immediately join the room without approval.
Other applicants need to wait for the host
's approval before entering the room. Multiple rooms can be applied for simultaneously.
Return value: If the request is successfully submitted, returns application status; otherwise, returns an error.
Callback triggered: The host receives Request to join room
import ArctosLinks
import RxSwift
func joinRoom(with roomId: String = "unique_room_id") {
_ = ArctosLinks.Conference.joinRoom(roomID: roomId)
.observe(on: MainScheduler.instance)
.subscribe(onSuccess: { status in
switch status {
case .approved:
print("Application approved.")
case .waiting:
print("Application sent. Awaiting review...")
}
}, onFailure: { error in
print(error.localizedDescription)
})
}
import com.arctos.sdk.links.core.application.ArctosLinks
private suspend fun joinRoom(roomId: String) {
runCatching {
ArctosLinks.getInstance(Context).conferenceManager.joinRoom(roomId = roomId)
.getOrThrow()
}.onSuccess { result ->
when (result) {
ArctosLinksCallback.ConferenceEventCallback.JoinRoomResponse.Approve -> {
Log.d(TAG, "Application approved")
}
ArctosLinksCallback.ConferenceEventCallback.JoinRoomResponse.Waiting -> {
Log.d(TAG, "Application sent. Awaiting review...")
}
}
}.onFailure {
Log.d(TAG, "Failed to join room: ${it.message}")
}
}
#include "arctos_qt.h"
void joinRoom(const std::string& room_id) {
auto& arctos_app = arctos::ArctosQt::getInstance();
arctos_app.joinRoom(room_id.c_str());
}
Cancel Join Request
Function: Cancel the request to join a conference room.
Parameters:
- roomID: The ID of the conference room, type String.
Return value: If the request is successfully canceled, returns completion; otherwise, returns an error.
Callback triggered: Cancel join room request
import ArctosLinks
import RxSwift
func cancelJoin(for roomId: String = "unique_room_id") {
_ = ArctosLinks.Conference.cancelJoinRequest(for: roomId)
.observe(on: MainScheduler.instance)
.subscribe(onSuccess: { _ in
print("Successfully canceled application.")
}, onFailure: { error in
print(error.localizedDescription)
})
}
import com.arctos.sdk.links.core.application.ArctosLinks
private suspend fun cancelJoin(roomId: String) {
runCatching {
ArctosLinks.getInstance(Context).conferenceManager.cancelJoinRequest(roomId = roomId)
.getOrThrow()
}.onSuccess { result ->
if (result)
Log.d(TAG, "cancel success ")
else
Log.d(TAG, "cancel failed ")
}.onFailure {
Log.d(TAG, "cancel failed ")
}
}
#include "arctos_qt.h"
void cancelJoin(const std::string& room_id) {
auto& arctos_app = arctos::ArctosQt::getInstance();
// my_user_id_ is from `loginOk` signal
arctos_app.leaveRoom(room_id.c_str(), my_user_id_);
}
Leave Room
Note
If the user is the `host`, the room will be closed as well.
Function: Leave the conference room.
Parameters:
- roomID: The ID of the conference room, type String.
Return value: If the user successfully leaves the room, returns completion; otherwise, returns an error.
Callback triggered: Participant left room
import ArctosLinks
import RxSwift
func leaveRoom(_ roomId: String = "unique_room_id") {
_ = ArctosLinks.Conference.leaveRoom(roomId)
.observe(on: MainScheduler.instance)
.subscribe(onSuccess: { _ in
print("Successfully left room.")
}, onFailure: { error in
print(error.localizedDescription)
})
}
import com.arctos.sdk.links.core.application.ArctosLinks
private suspend fun leaveRoom(roomId: String) {
runCatching {
ArctosLinks.getInstance(Context).conferenceManager.leaveRoom(roomId = roomId)
.getOrThrow()
}.onSuccess { result ->
if (result)
Log.d(TAG, "Successfully left room")
else
Log.d(TAG, "Failed to left room")
}.onFailure {
Log.d(TAG, "Failed to left room ${it.message}")
}
}
#include "arctos_qt.h"
void leaveRoom(const std::string& room_id) {
auto& arctos_app = arctos::ArctosQt::getInstance();
// my_user_id_ is from `loginOk` signal
arctos_app.leaveRoom(room_id.c_str(), my_user_id_);
}
get Room List
Function: Retrieve the latest list of conference rooms.
Return value: If successful, returns room list; otherwise, returns an error.
import ArctosLinks
import RxSwift
func retrieveRoomList() {
_ = ArctosLinks.Conference.getRoomList()
.observe(on: MainScheduler.instance)
.subscribe(onSuccess: { data in
dump(data, name: "ArctosLinks.Conference.getRoomList")
}, onFailure: { error in
print(error.localizedDescription)
})
}
import com.arctos.sdk.links.core.application.ArctosLinks
private suspend fun retrieveRoomList() {
runCatching {
ArctosLinks.getInstance(Context).conferenceManager.getRoomList()
.getOrThrow()
}.onSuccess { it ->
val roomList = it.toMutableList()
}.onFailure {
Log.d(TAG, "Failed to retrive Rooms: ${it.message}")
}
}
#include "arctos_qt.h"
void retrieveRoomList() {
auto& arctos_app = arctos::ArctosQt::getInstance();
arctos_app.listRoom(); // emit updateRoomList signal when succeed
}
get Room Info
Function: Retrieve detailed information about a conference room.
Parameters:
- roomID: The ID of the conference room, type String.
Return: If successful, returns detailed room information; otherwise, returns an error.
import ArctosLinks
import RxSwift
func getInfo(for roomId: String = "unique_room_id") {
_ = ArctosLinks.Conference.getRoomInfo(roomId: roomId)
.subscribe(onSuccess: { roomInfo in
print("Successfully retrieved room info:\(roomInfo)")
}, onFailure: { error in
print("Failed to retrieve room info with error:\(error.localizedDescription)")
})
}
import com.arctos.sdk.links.core.application.ArctosLinks
private suspend fun getRoomInfo() {
runCatching {
ArctosLinks.getInstance(Context).conferenceManager.getRoomInfo(roomId)
.getOrThrow()
}.onSuccess { roomInfo ->
Log.d(TAG, "RoomInfo info: $roomInfo")
}.onFailure {
Log.d(TAG, "onFailure getRoomInfo: ${it.message}")
}
}
#include "arctos_qt.h"
void getRoomInfo(const std::string& room_id) {
auto& arctos_app = arctos::ArctosQt::getInstance();
arctos_app.getRoomInfo(room_id.c_str()); // emit errorMessage signal when failed
}
Callback
Request Join Room
Description: When a user requests to join a conference room, the host
will receive this notification.
Notification parameters:
- id: The ID of the applicant, type Int.
- name: The username of the applicant, type String.
import ArctosLinks
import RxSwift
func hostStartObservingJoinEvent() {
_ = ArctosLinks.ConferenceEventCallback.requestJoinRoom
.observe(on: ConcurrentDispatchQueueScheduler(qos: .background))
.subscribe(onNext: { [weak self] (requesterId, requesterName) in
guard let self else { return }
print("\(requesterName)(\(requesterId)) has requested to join.")
})
.disposed(by: disposeBag)
}
import com.arctos.sdk.links.core.application.ArctosLinks
ArctosLinks.getInstance(Context).conferenceManager.conferenceEvent.collect { event ->
when (event) {
is ArctosLinksCallback.ConferenceEventCallback.RequestJoinRoom -> {
Log.d(TAG, "MeetingRoom RequestJoinRoom : ${event.requesterId} , ${event.requesterName}")
}
}
}
#include "arctos_qt.h"
auto& arctos_app = arctos::ArctosQt::getInstance();
QObject::connect(&arctos_app, &ArctosQt::joinedRoom, [](const QString& room_id, const QString& user_id){
LOG(INFO) << "MeetingRoom RequestJoinRoom " << user_id.c_str();
});
Cancel Join Request
Description: When an applicant cancels the request to join the conference, the host
will receive this notification.
Notification parameters:
- id: The ID of the applicant who canceled, type Int.
import ArctosLinks
import RxSwift
func hostStartObservingCancelEvent() {
_ = ArctosLinks.ConferenceEventCallback.cancelJoinRequest
.subscribe(onNext: { id in
print("\(id) has canceled their request to join.")
})
.disposed(by: disposeBag)
}
import com.arctos.sdk.links.core.application.ArctosLinks
ArctosLinks.getInstance(Context).conferenceManager.conferenceEvent.collect { event ->
when (event) {
is ArctosLinksCallback.ConferenceEventCallback.CancelJoinRoom -> {
Log.d(TAG, "Cancel Join Room ${event.id}")
}
}
}
#include "arctos_qt.h"
auto& arctos_app = arctos::ArctosQt::getInstance();
QObject::connect(&arctos_app, &ArctosQt::joinRequestCancelled, [](const QString& room_id, const QString& user_id){
LOG(INFO) << "MeetingRoom RequestJoinRoomCancelled " << user_id.c_str();
});
Response Join Room
Description: When the host
approves or rejects the applicant's request to join the conference room, the applicant will receive this notification.
If the host
approves, the applicant can enter the conference room. At this time, other participants in the room will receive notification of new participant joining. If rejected, the applicant cannot enter.
Notification parameters:
- roomId: The ID of the conference room, type String.
- isApproved: Whether the request is approved, type Bool.
- message: Message, type String.
import ArctosLinks
import RxSwift
func applicantStartObservingJoinResponse() {
_ = ArctosLinks.ConferenceEventCallback.responseJoinRoom
.subscribe(onNext: { (roomID, isApproved, message) in
if isApproved {
print("✅ Application approved in \(roomID), welcome message: \(message ?? "").")
} else {
print("❌ Application disapproved in \(roomID), reason: \(message ?? "").")
}
})
.disposed(by: disposeBag)
}
import com.arctos.sdk.links.core.application.ArctosLinks
ArctosLinks.getInstance(Context).conferenceManager.conferenceEvent.collect { event ->
when (event) {
is ArctosLinksCallback.ConferenceEventCallback.ResponseJoinRoom -> {
Log.d(TAG, "Receive Join Response: ${event.isApprove} , ${event.roomId} , ${event.message}")
}
}
}
#include "arctos_qt.h"
auto& arctos_app = arctos::ArctosQt::getInstance();
QObject::connect(&arctos_app, &ArctosQt::joiningRoomSucceed, [](const QString& room_id, const QString& host_carrier_id){
LOG(INFO) << "Joined room " << room_id.c_str();
});
QObject::connect(&arctos_app, &ArctosQt::joiningRoomFailed, [](const QString& room_id){
LOG(INFO) << "Joined room failed " << room_id.c_str();
});
Participant Join Room
Description: When a new participant joins the conference room, other participants will receive this notification.
Notification parameters:
- id: The ID of the participant, type Int.
import ArctosLinks
import RxSwift
func roomEventObservers() {
_ = ArctosLinks.ConferenceEventCallback.participantJoinRoom
.subscribe(onNext: { id in
print("Participant(\(id)) has joined.")
})
.disposed(by: disposeBag)
}
}
import com.arctos.sdk.links.core.application.ArctosLinks
ArctosLinks.getInstance(Context).conferenceManager.conferenceEvent.collect { event ->
when (event) {
is ArctosLinksCallback.ConferenceEventCallback.ParticipantJoinRoom -> {
Log.d(TAG, "MeetingRoom ParticipantJoinRoom : ${event.participantId}")
}
}
}
#include "arctos_qt.h"
auto& arctos_app = arctos::ArctosQt::getInstance();
QObject::connect(&arctos_app, &ArctosQt::joinedRoom, [](const QString& room_id, const QString& participant_id){
LOG(INFO) << participant_id.c_str() << " joined room " << room_id.c_str();
});
application rejected
Description: When the host
rejects a user's application, all participants in the conference room will receive this notification.
Notification parameters:
- id: The ID of the rejected applicant, type Int.
import ArctosLinks
import RxSwift
func roomEventObservers() {
_ = ArctosLinks.ConferenceEventCallback.applicationRejected
.subscribe(onNext: { id in
print("Applicant(\(id)) has been rejected by the host.")
})
.disposed(by: disposeBag)
}
import com.arctos.sdk.links.core.application.ArctosLinks
ArctosLinks.getInstance(Context).conferenceManager.conferenceEvent.collect { event ->
when (event) {
is ArctosLinksCallback.ConferenceEventCallback.ApplicantRejectByHost -> {
Log.d(TAG, "Applicant Reject By Host : ${event.applicantId}")
}
}
}
#include "arctos_qt.h"
auto& arctos_app = arctos::ArctosQt::getInstance();
QObject::connect(&arctos_app, &ArctosQt::userRemoved, [](const QString& room_id, const QString& user_id){
LOG(INFO) << user_id.c_str() << " rejected";
});
participant left room
Description: When a participant leaves the conference room, all participants in the room will receive this notification.
Notification parameters:
- id: The ID of the participant, type Int.
- message: Reason for leaving, type String.
import ArctosLinks
import RxSwift
func roomEventObservers() {
_ = ArctosLinks.ConferenceEventCallback.participantLeftRoom
.subscribe(onNext: { (id, message) in
print("Participant(\(id)) has left the room due to \(message ?? "unknown reasons").")
})
.disposed(by: disposeBag)
}
import com.arctos.sdk.links.core.application.ArctosLinks
ArctosLinks.getInstance(Context).conferenceManager.conferenceEvent.collect { event ->
when (event) {
is ArctosLinksCallback.ConferenceEventCallback.ParticipantLeftRoom -> {
Log.d(TAG, "MeetingRoom Participant Left Room : ${event.participantId}, ${event.message}")
}
}
}
#include "arctos_qt.h"
auto& arctos_app = arctos::ArctosQt::getInstance();
QObject::connect(&arctos_app, &ArctosQt::userRemoved, [](const QString& room_id, const QString& user_id){
LOG(INFO) << user_id.c_str() << " removed";
});
kick out by host
Note
Only the removed participant will receive this notification.
Description: When a participant is removed by the host, they will receive this notification.
Notification parameters:
- message: Reason for removal by the host, type String.
import ArctosLinks
import RxSwift
func roomEventObservers() {
_ = ArctosLinks.ConferenceEventCallback.kickOutByHost
.subscribe(onNext: { message in
print("Removed by the host due to \(message ?? "unknown reasons").")
})
.disposed(by: disposeBag)
}
import com.arctos.sdk.links.core.application.ArctosLinks
ArctosLinks.getInstance(Context).conferenceManager.conferenceEvent.collect { event ->
when (event) {
is ArctosLinksCallback.ConferenceEventCallback.ParticipantKickedOutByHost -> {
Log.d(TAG, "I was kicked out by the host ${event.message}")
}
}
}
#include "arctos_qt.h"
auto& arctos_app = arctos::ArctosQt::getInstance();
QObject::connect(&arctos_app, &ArctosQt::userRemoved, [](const QString& room_id, const QString& user_id){
LOG(INFO) << user_id.c_str() << " kicked";
});
participant kicked out room
Note
All participants in the conference room will receive this notification.
Description: When a participant is removed by the host, all participants in the room will receive this notification.
Notification parameters:
- id: The ID of the removed participant, type Int.
import ArctosLinks
import RxSwift
func roomEventObservers() {
_ = ArctosLinks.ConferenceEventCallback.participantKickedOutRoom
.subscribe(onNext: { id in
print("Participant(\(id)) has been removed from the room.")
})
.disposed(by: disposeBag)
}
import com.arctos.sdk.links.core.application.ArctosLinks
ArctosLinks.getInstance(Context).conferenceManager.conferenceEvent.collect { event ->
when (event) {
is ArctosLinksCallback.ConferenceEventCallback.ParticipantKickedOutRoom -> {
Log.d(TAG,"$Participant {event.participantId} has been removed from the room.")
}
}
}
#include "arctos_qt.h"
auto& arctos_app = arctos::ArctosQt::getInstance();
QObject::connect(&arctos_app, &ArctosQt::userRemoved, [](const QString& room_id, const QString& user_id){
LOG(INFO) << user_id.c_str() << " kicked";
});
host closes room
Note
All participants in the conference room will receive this notification.
Description: When the host
closes the conference room or leaves the conference room, all participants will receive this notification.
Notification parameters:
- message: Reason for closing the room by the host, type String.
import ArctosLinks
import RxSwift
func roomEventObservers() {
_ = ArctosLinks.ConferenceEventCallback.hostCloseRoom
.subscribe(onNext: { message in
print("The host closed the room due to \(message ?? "unknown reasons").")
})
.disposed(by: disposeBag)
}
import com.arctos.sdk.links.core.application.ArctosLinks
ArctosLinks.getInstance(Context).conferenceManager.conferenceEvent.collect { event ->
when (event) {
is ArctosLinksCallback.ConferenceEventCallback.HostCloseRoom -> {
Log.d(TAG, "MeetingRoom closed : ${event.message}")
}
}
}
#include "arctos_qt.h"
auto& arctos_app = arctos::ArctosQt::getInstance();
QObject::connect(&arctos_app, &ArctosQt::roomRemoved, [](const QString& room_id){
LOG(INFO) << room_id.c_str() << " removed";
});
room info updated
Description: When the room information is updated, all participants in the room will receive this notification.
Notification parameters:
- roomName: The new room name, type String.
- description: The new room description, type String.
import ArctosLinks
import RxSwift
func roomEventObservers() {
_ = ArctosLinks.ConferenceEventCallback.roomInfoUpdated
.subscribe(onNext: { (roomName, description) in
var body: String = ""
if let roomName {
body.append(" roomName: \(roomName)")
}
if let description {
body.append(" description: \(description)")
}
print("Room info has been updated. New info:\(body)")
})
.disposed(by: disposeBag)
}
import com.arctos.sdk.links.core.application.ArctosLinks
ArctosLinks.getInstance(Context).conferenceManager.conferenceEvent.collect { event ->
when (event) {
is ArctosLinksCallback.ConferenceEventCallback.RoomInfoUpdate -> {
Log.d(TAG, "MeetingRoom update : ${event.roomName}, ${event.description}")
}
}
}
#include "arctos_qt.h"
auto& arctos_app = arctos::ArctosQt::getInstance();
QObject::connect(&arctos_app, &ArctosQt::roomInfoUpdated, [](const QString& name, const QString& description){
LOG(INFO) << "new name " name.c_str() << "; new description " << description.c_str();
});
update participant
Description: When the online status of a participant in the conference room changes, all participants in the room will receive this notification.
Notification parameters:
- id: The ID of the participant, type Int.
- name: The username of the participant, type String.
- isOnline: The online status of the participant, type Bool.
import ArctosLinks
import RxSwift
func hostStartObservingMemberOnlineStatus() {
_ = ArctosLinks.ConferenceEventCallback.updateParticipant
.observe(on: ConcurrentDispatchQueueScheduler(qos: .background))
.subscribe(onNext: { (id, name, isOnline) in
print("\(name)(\(id)) is currently \(isOnline ? "online" : "offline").")
})
.disposed(by: disposeBag)
}
import com.arctos.sdk.links.core.application.ArctosLinks
ArctosLinks.getInstance(Context).conferenceManager.conferenceEvent.collect { event ->
when (event) {
is ArctosLinksCallback.ConferenceEventCallback.UpdateParticipant -> {
Log.d(TAG, "MeetingRoom Update Participant : ${event.id} , ${event.name} , ${event.isOnline}")
}
}
}
#include "arctos_qt.h"
auto& arctos_app = arctos::ArctosQt::getInstance();
QObject::connect(&arctos_app, &ArctosQt::updateFriendList, [](const QVariant& updated_friend_list){
for (const auto& user : friend_list) {
const auto friend_map = user.toMap();
if (friend_map["status"].toString() == "Offline") {
LOG(INFO) << "Offline";
} else {
LOG(INFO) << "Online";
}
}
});
Types
Enum Classes
JoinRoomResponse
Function: Used to represent the status of an application to join a conference room.
Members:
- approved: Approved, join the conference room. Only received when the user is also the
host
who created the room. - waiting: Waiting for the
host
to review.
/// Represents the possible outcomes of a join room request.
///
/// This enumeration is typically used as the result type when a user attempts to join a conference room.
/// It allows for clear differentiation between an immediate approval and a pending state.
enum JoinRoomResponse {
/// Indicates that the join room request was immediately approved.
/// The user can proceed to enter the conference room.
case approved
/// Indicates that the join room request is pending approval.
/// The user must wait for the host to make a decision on their request.
case waiting
}
sealed class JoinRoomResponse {
data object Approve : JoinRoomResponse()
data object Waiting : JoinRoomResponse()
}
// no enum, used different signals to distinguish events
// joiningRoomFailed
// joiningRoomSucceed
ScreenTemplate
Function: Used to enumerate the available display layouts for the conference room.
Members:
- template_1: One small frame on the left top, one frame filling the rest.
- template_2: Two equal frames side by side.
- template_3: Three frames on top, one frame filling the bottom.
- template_4: Four equally distributed frames.
Property:
- representValue: Returns the string representation of each template, type String.
/// Enumerates the available display layouts for the conference room.
enum ScreenTemplate: CaseIterable {
/// One small frame on the left top, one frame filling the rest
case template_1
/// Two equal frames side by side
case template_2
/// Three frames on top, one frame filling the bottom
case template_3
/// Four equally distributed frames
case template_4
/// The string representation of each template.
public var representValue: String {
switch self {
case .template_1:
return "template No.1"
case .template_2:
return "template No.2"
case .template_3:
return "template No.3"
case .template_4:
return "template No.4"
}
}
}
sealed class ScreenTemplate {
data object Template1 : ScreenTemplate()
data object Template2 : ScreenTemplate()
data object Template3 : ScreenTemplate()
data object Template4 : ScreenTemplate()
}
// integer 1, 2, 3, 4
Structs
RoomList
Function: Used to represent the information of conference rooms in the room list.
Properties:
- roomID: The unique identifier of the conference room, type String.
- name: The display name of the conference room, type String.
- description: Detailed description of the conference room, type Optional String.
- host: Host information, type Struct, properties see RoomInfo.Host.
RoomInfo
Function: Used to represent detailed information about a specific conference room.
Properties:
- roomID: The ID of the conference room, type String.
- name: The display name of the conference room, type String.
- description: Detailed description of the conference room, type String.
- host: Host information, type Struct, properties see RoomInfo.Host.
- participants: List of participant information, type Struct, properties see RoomInfo.Participant.
- applicants: List of applicant information (visible only to the host), type Struct, properties see RoomInfo.Applicant.
Host
Function: Used to represent the information of the host of the conference room.
Properties:
- id: The ID of the host, type Int.
- displayName: The display name of the host, type String.
Participant
Function: Used to represent the information of participants in the conference room.
Properties:
- id: The ID of the participant, type Int.
- displayName: The display name of the participant, type String.
Applicant
Function: Used to represent the information of members applying to join the conference room.
Properties:
- id: The ID of the applicant, type Int.
- displayName: The display name of the applicant, type String.