Skip to main content
MeetingEngine is the public business entry point of the SMeeting Android SDK, created with MeetingEngine.create(application). It handles SDK initialization and release, pre-meeting management, entering and exiting meetings, in-meeting controls, local media, sharing, messages, and remote media subscription.

Usage notes

  • Each call to MeetingEngine.create(application) creates one Engine instance. Your app should hold a single instance in one place within the process and call release() when it’s no longer needed.
  • The current public API uses a single-meeting model: one Engine can have only one meeting that is being entered or active at a time; entering again returns MeetingErrorCode.SESSION_ALREADY_ACTIVE.
  • A successful entry returns MeetingEnterInfo; in-meeting capabilities are then still called through the current MeetingEngine.
  • All asynchronous result callbacks stay on the thread they actually come from; the main thread is not guaranteed. Switch to the main thread before updating the UI.
  • The failure method of MeetingResultCallback / MeetingValueResultCallback<T> is onFailure(errorCode, message). message is for diagnostics only and shouldn’t be shown to users directly.
  • roomEvent, userEvent, mediaEvent, and messageEvent are bound to the current meeting and cleared when you exit the meeting; assign them again to receive events for the next meeting. Engine, IM, and device events share the Engine’s lifecycle.

Creation and version

create(app)

Description: Creates a MeetingEngine instance. Parameters: Returns: The newly created MeetingEngine.

version()

Description: Gets the Meeting SDK version number. Parameters: None. Returns: The version string written at build time, in the form x.y.z.

buildTime()

Description: Gets the Meeting SDK build time. Parameters: None. Returns: The build time string.

Manager properties

infosManager

Description: Reads local snapshots of the current meeting, its members, and media tracks. This facade can be kept before the meeting; when you are not in a meeting, queries return null or empty collections. See InfosManager.

rollCallManager

Description: The roll call management facade for the current meeting. When you are not in a meeting, asynchronous operations return SESSION_NOT_ACTIVE through the callback. See RollCallManager.

signInManager

Description: The sign-in management facade for the current meeting. When you are not in a meeting, asynchronous operations return SESSION_NOT_ACTIVE through the callback. See SignInManager.

Event properties

Register a listener by assigning these properties directly; assign null to remove it. For each event’s callback parameters and thread semantics, see the corresponding interface page.

Initialization and release

initSdk(meetToken, options, callback)

Description: Initializes the service connection and the underlying SRTC SDK with a Meeting token. An invalid or expired token and local state errors are all returned through the result callback. Parameters: Returns: None (Unit).

updateMediaOptions(options)

Description: Updates the underlying SRTC media parameters. Parameters: Returns: None (Unit).

release()

Description: Exits the current meeting, stops capture and subscriptions, closes IM, and releases Meeting and SRTC resources. The instance can’t be used after release. Parameters: None. Returns: None (Unit).

Media statistics and cloud recording capture

getMetric()

Description: Gets the most recently sampled media quality snapshot of the current meeting; it doesn’t actively trigger underlying statistics collection. Parameters: None. Returns: A thread-safe copy of MediaMetric.Metric; null when not in a meeting or before the first sample (about 5 seconds) has been produced. For the fields, see Media quality.

enableClientCloudRecordCapture

Description: Whether the client maintains the TrackDesc.TRACK_SHARE track used by cloud recording. When enabled, you can get the custom video track through getShareCustomVideoTrack().

getShareCustomVideoTrack(preOpt)

Description: Gets or reuses the custom video track your app writes cloud recording video into. Your app must not publish or unpublish this track itself. Parameters: Returns: The cached or newly created LocalCustomVideoTrack; null when the underlying SRTC isn’t ready yet or the track can’t be created. enableClientCloudRecordCapture constrains the subsequent course recording publish flow; it doesn’t prevent getting and writing to this track in advance.

Current user info

getSelfInfo(callback)

Description: Gets the currently logged-in user’s info from the Meeting service. Parameters: Returns: None (the asynchronous result is delivered through the callback).

Host member controls

adminUpdateUserName(targetId, name, callback)

Description: Changes the specified member’s in-meeting display name. Parameters: Returns: None (the asynchronous result is delivered through the callback).

adminUpdateUserRole(targetId, role, callback)

Description: Changes the specified member’s meeting role. Parameters: Returns: None (the asynchronous result is delivered through the callback).

adminMoveHost(targetId, callback)

Description: Transfers the host role to the specified member. Parameters: Returns: None (the asynchronous result is delivered through the callback).

adminUpdateUserDrawDisabled(targetId, drawDisabled, callback)

Description: Updates the specified member’s whiteboard drawing permission. Parameters: Returns: None (the asynchronous result is delivered through the callback).

adminUpdateUserChatDisabled(targetId, chatDisabled, callback)

Description: Updates the specified member’s chat permission. Parameters: Returns: None (the asynchronous result is delivered through the callback).

adminRequestUserOpenCamera(targetId, callback)

Description: Asks the specified member to turn on the camera; the member receives the request through MeetingUserEvent.onRequestOpenCamera(). Parameters: Returns: None (the asynchronous result is delivered through the callback).

adminCloseUserCamera(targetId, callback)

Description: The host turns off the specified member’s camera. Parameters: Returns: None (the asynchronous result is delivered through the callback).

adminDisableUserCamera(targetId, cameraDisabled, callback)

Description: Reserved API for disabling a member’s camera. Parameters: Returns: None (the asynchronous result is delivered through the callback). :::warning This capability isn’t implemented in the current version; don’t rely on it for meeting controls. To turn off a camera immediately, use adminCloseUserCamera(). :::

adminRequestUserOpenMic(targetId, callback)

Description: Asks the specified member to turn on the mic; the member receives the request through MeetingUserEvent.onRequestOpenMic(). Parameters: Returns: None (the asynchronous result is delivered through the callback).

adminCloseUserMic(targetId, callback)

Description: The host turns off the specified member’s mic. Parameters: Returns: None (the asynchronous result is delivered through the callback).

adminDisableUserMic(targetId, micDisabled, callback)

Description: Reserved API for disabling a member’s mic. Parameters: Returns: None (the asynchronous result is delivered through the callback). :::warning This capability isn’t implemented in the current version; don’t rely on it for meeting controls. To turn off a mic immediately, use adminCloseUserMic(). :::

adminRequestUserShare(targetId, callback)

Description: Asks the specified member to start screen sharing. Parameters: Returns: None (the asynchronous result is delivered through the callback).

adminStopRoomShare(callback)

Description: Forcibly stops the screen or whiteboard sharing currently in progress in the room. Parameters: Returns: None (the asynchronous result is delivered through the callback).

adminInviteAgent(agents, callback)

Description: Invites external devices such as SIP, H.323, RTSP, and RTMP devices into the current meeting. Parameters: Returns: None (the asynchronous result is delivered through the callback).

adminKickUserOut(targetId, callback)

Description: Removes the specified member from the current meeting. Parameters: Returns: None (the asynchronous result is delivered through the callback).

adminConfirmHandUp(targetId, code, approve, callback)

Description: Handles the specified member’s raise-hand request. Parameters: Returns: None (the asynchronous result is delivered through the callback).

adminGetOnlineMembers(meetingId, page, prePage, callback)

Description: Queries the online members of the specified meeting page by page. Parameters: Returns: None (the asynchronous result is delivered through the callback).

adminUpdateRoomMCUMode()

Description: Reserved entry point for updating the room’s MCU mode. Parameters: None. Returns: None (Unit). :::warning This API isn’t implemented in the current version; calling it only logs a warning. :::

Waiting room

adminWaitingRoomDisabled(waitingRoomDisabled, callback)

Description: Enables or disables the current meeting’s waiting room. Parameters: Returns: None (the asynchronous result is delivered through the callback).

adminMoveOutWaitingRoom(uid, callback)

Description: Admits waiting room members into the meeting. Parameters: Returns: None (the asynchronous result is delivered through the callback).

adminMoveInWaitingRoom(uid, nickName, callback)

Description: Moves a current meeting member into the waiting room. Parameters: Returns: None (the asynchronous result is delivered through the callback).

adminGetWaitingRoomUsers(callback)

Description: Queries the members in the current meeting’s waiting room. Parameters: Returns: None (the asynchronous result is delivered through the callback).

Sub-meetings

createSubMeeting(subMeetingTitles, callback)

Description: Creates one or more sub-meetings under the current main meeting. Parameters: Returns: None (the asynchronous result is delivered through the callback).

updateSubMeetingTitle(id, title, callback)

Description: Changes the title of the specified sub-meeting. Parameters: Returns: None (the asynchronous result is delivered through the callback).

updateSubMeetingUsers(id, members, callback)

Description: Replaces the members of the specified sub-meeting in full. Parameters: Returns: None (the asynchronous result is delivered through the callback).

deleteSubMeeting(ids, callback)

Description: Deletes the specified sub-meetings. Parameters: Returns: None (the asynchronous result is delivered through the callback).

getSubMeetingList(callback)

Description: Queries the list of sub-meetings under the current main meeting. Parameters: Returns: None (the asynchronous result is delivered through the callback).

startSubMeeting(ids, callback)

Description: Starts the specified sub-meetings. Parameters: Returns: None (the asynchronous result is delivered through the callback).

stopSubMeeting(ids, callback)

Description: Ends the specified sub-meetings. Parameters: Returns: None (the asynchronous result is delivered through the callback).

moveSubMeetingUser(fromId, toId, uid, callback)

Description: Moves members between the main meeting and sub-meetings. Parameters: Returns: None (the asynchronous result is delivered through the callback).

updateEnterBeforeHostDisabled(meetingId, enterBeforeHostDisabled, callback)

Description: Updates whether members can enter the specified meeting before the host. Parameters: Returns: None (the asynchronous result is delivered through the callback).

helpSubMeeting(meetingId, callback)

Description: Asks the host of the main meeting for help from a sub-meeting. Parameters: Returns: None (the asynchronous result is delivered through the callback).

Current user’s nickname

updateName(name, callback)

Description: Changes the current user’s in-meeting display name. Parameters: Returns: None (the asynchronous result is delivered through the callback).

Users, IM, and calls

getAgentList(types, keyword, page, perPage, callback)

Description: Queries invitable contact devices page by page, by device type and keyword. Parameters: Returns: None (the asynchronous result is delivered through the callback).

enableIm(callback)

Description: Requests an IM grant and establishes the connection. After the connection is established, ongoing state and messages are delivered through imEvent. Parameters: Returns: None (the asynchronous result is delivered through the callback).

disableIm()

Description: Explicitly closes IM. Closing it explicitly doesn’t trigger MeetingImEvent.onImDisconnected(). Parameters: None. Returns: None (Unit).

callUser(targetUids, callback)

Description: Calls the specified users to enter the current meeting. Parameters: Returns: None (the asynchronous result is delivered through the callback).

Pre-meeting management

createImmediateMeeting(title, option, callback)

Description: Creates an instant meeting. Parameters: Returns: None (the asynchronous result is delivered through the callback).

createScheduleMeeting(title, planTime, planDur, option, callback)

Description: Creates a scheduled meeting. Parameters: Returns: None (the asynchronous result is delivered through the callback).

updateMeetingBeforeStart(meetingId, option, callback)

Description: Updates a meeting that hasn’t started yet. Parameters: Returns: None (the asynchronous result is delivered through the callback).

getMeetingList(page, perPage, callback)

Description: Queries the current user’s upcoming or in-progress meetings page by page. Parameters: Returns: None (the asynchronous result is delivered through the callback).

getHistoryMeetingList(page, perPage, callback)

Description: Queries the current user’s past meetings page by page. Parameters: Returns: None (the asynchronous result is delivered through the callback).

getMeetingDetail(meetingId, callback)

Description: Queries meeting details by meeting ID. Parameters: Returns: None (the asynchronous result is delivered through the callback).

getMeetingDetailByRoomNo(roomNo, callback)

Description: Queries meeting details by room number. Parameters: Returns: None (the asynchronous result is delivered through the callback).

cancelMeetingBeforeStart(meetingId, callback)

Description: Cancels a meeting that hasn’t started yet. Parameters: Returns: None (the asynchronous result is delivered through the callback).

Entering and exiting meetings

enterMeeting(activity, roomNo, password, nick, avatar, streamVendor, isAudience, extendInfo, callback)

Description: Queries the meeting details by room number, enters the meeting on the server, and joins the SRTC channel, returning a single final result. Parameters: Returns: None (the asynchronous result is delivered through the callback).

enterMeetingByMeetingId(activity, meetingId, password, nick, avatar, streamVendor, isAudience, extendInfo, callback)

Description: Enters a meeting by meeting ID; the flow and callback semantics are the same as enterMeeting(). Parameters: Returns: None (the asynchronous result is delivered through the callback).

exitWaitingRoom(callback)

Description: Exits the current waiting room before the SRTC join has completed. Parameters: Returns: None (the asynchronous result is delivered through the callback).

exitMeeting()

Description: Exits the current meeting and stops that meeting’s capture, sharing, remote subscriptions, and further event dispatch. Safe to call repeatedly. Parameters: None. Returns: None (Unit).

Host room controls

adminDestroyMeeting(callback)

Description: The host ends the current meeting. Parameters: Returns: None (the asynchronous result is delivered through the callback).

adminUpdateConferee(conferees, callback)

Description: Updates the current meeting’s pre-meeting invitee UID list. Parameters: Returns: None (the asynchronous result is delivered through the callback).

adminUpdateRoomCameraState(selfUnMuteCameraDisabled, cameraDisabled, callback)

Description: Updates both the room-wide camera disabled state and the policy for whether members can turn it back on themselves. Parameters: Returns: None (the asynchronous result is delivered through the callback).

adminUpdateRoomSelfUnmuteCameraDisabled(selfUnMuteCameraDisabled, callback)

Description: Updates only whether members can turn their cameras back on themselves. Parameters: Returns: None (the asynchronous result is delivered through the callback).

adminUpdateRoomMicState(selfUnMuteMicDisabled, micDisabled, callback)

Description: Updates both the room-wide mic disabled state and the policy for whether members can unmute themselves. Parameters: Returns: None (the asynchronous result is delivered through the callback).

adminUpdateRoomSelfUnmuteMicDisabled(selfUnMuteMicDisabled, callback)

Description: Updates only whether members can unmute themselves. Parameters: Returns: None (the asynchronous result is delivered through the callback).

adminUpdateRoomShareState(shareDisabled, callback)

Description: Updates the room’s sharing disabled state. Parameters: Returns: None (the asynchronous result is delivered through the callback).

adminUpdateRoomChatDisabled(chatDisabled, callback)

Description: Updates the room’s text chat disabled state. Parameters: Returns: None (the asynchronous result is delivered through the callback).

adminUpdateRoomScreenshotDisabled(screenshotDisabled, callback)

Description: Updates the room’s screenshot disabled state; your app still needs to enforce the screenshot restriction on Android itself. Parameters: Returns: None (the asynchronous result is delivered through the callback).

adminUpdateRoomWatermarkDisabled(watermarkDisabled, callback)

Description: Updates the room’s watermark disabled state. Parameters: Returns: None (the asynchronous result is delivered through the callback).

adminUpdateRoomLocked(locked, callback)

Description: Updates the room’s locked state. Parameters: Returns: None (the asynchronous result is delivered through the callback).

Local camera

openCamera(view, preOption, callback)

Description: Only starts local camera capture and preview, without requesting meeting permission or publishing video; can be called before the meeting once initialization succeeds. If capture is already running or starting, the existing operation is reused and the new preOption doesn’t take effect; to change parameters, call closeCamera() first. The device ID and facing in the start parameters are suggestions; if unavailable, RTC picks another automatically. If an in-flight start is canceled by a switch or close, the callback returns LOCAL_DEVICE_OPERATION_CANCELLED. Parameters: Returns: None (the asynchronous result is delivered through the callback).

openCameraAndPublish(view, preOption, callback)

Description: Completes server-side authorization, camera capture, and SRTC publishing in the current meeting. A regular failure rolls back this publish and closes only the capture generation it belongs to, without stopping later switches or recoveries; if the capture is superseded by a newer switch, the callback returns LOCAL_DEVICE_OPERATION_CANCELLED, which ends only the old publish transaction and doesn’t stop the new switch. Parameters: Returns: None (the asynchronous result is delivered through the callback).

closeCamera()

Description: Unpublishes the camera in the current meeting and stops local capture; when not in a meeting, only stops local capture. Parameters: None. Returns: None (Unit).

switchCamera(isFrontCamera)

Description: Tries devices only within the specified facing, using the first frame of the new video as the success criterion. Compatibility change (Meeting 2.0.37, RTC 2.0.33): after a failed switch, capture is not guaranteed to continue and there is no longer an automatic fallback; if target validation fails, the original capture may be kept. Your app must roll back the UI and decide for itself whether to recover. If the Track has never been created, the intent is only saved and the callback reports success without opening the device; if the Track exists, the switch reopens capture even after closeCamera() (without publishing automatically). We recommend disabling the switch control while the camera is off. When the request is canceled by a later switch or by closeCamera(), the callback returns MeetingErrorCode.LOCAL_DEVICE_OPERATION_CANCELLED. A cancellation represents a newer user intent—don’t recover in the cancellation callback. SDK release() clears the waiters and no longer delivers cancellation callbacks. Parameters: Returns: None (Unit).

getCameraDevices()

Description: Gets a snapshot of the camera capabilities SRTC currently recognizes. Parameters: None. Returns: The list of camera device capabilities; an empty list when there is no available device.

switchCameraDevice(cameraId)

Description: Tries only the specified Camera2 device ID, using the first frame as the success criterion; on failure it doesn’t pick another device or fall back automatically. If no Track has been created, the intent is saved; if a Track exists, capture is reopened even if it has stopped. Cancellation and release behave the same as switchCamera. For an exact recovery, call this method again with the getCurrentCameraId() snapshot taken before the switch; the suggestion semantics of openCamera can’t guarantee a return to the original device. Parameters: Returns: None (Unit).

getCurrentCameraId()

Returns the ID of the last camera that actually produced a first frame; returns an empty string when the SDK isn’t ready, capture hasn’t succeeded yet, or after release. The value is a historical record and doesn’t mean capture is in progress; it may keep an old value during a switch, after a failure, after stopping, or after the device is unplugged.

App-level exact recovery example

Start the switch on the UI thread. cameraUiGeneration is maintained by your app and incremented each time the camera is turned off, switched again, or the screen is destroyed; cameraEnabled indicates that your app still wants capture, preventing late callbacks from reopening the device. runOnUiThread, updateCameraUi, and showCameraLost are your app’s own UI methods.
The first failure means the switch failed; only when the recovery request also fails does it mean the video can’t be restored, and your app should stop publishing, close the device, and notify the user. For a complete example, see the demo’s CameraFragment: it ignores repeated taps during switching and recovery, and calibrates the UI facing against the real device on final success.

switchFrontCameraMirror(open)

Description: Sets front camera preview mirroring. It affects only the front camera; the state is cached and restored after capture restarts. Parameters: Returns: None (Unit).

isFrontCameraMirrorOpen()

Description: Queries the front camera preview mirroring state. Parameters: None. Returns: true means mirroring is on; currently on by default.

addPreview(view)

Description: Binds a preview view to the current local camera track. Parameters: Returns: true means binding succeeded; false means the view type is invalid or the current track is unavailable.

removePreview(view)

Description: Removes a local camera preview view. Parameters: Returns: None (Unit).

replacePreview(views)

Description: Replaces the local camera preview views wholesale with a new list. Parameters: Returns: None (Unit).

getAllPreview()

Description: Gets all currently bound local preview views. Parameters: None. Returns: A snapshot of the preview views.

Local mic

openMic(preOption, callback)

Description: Only starts local mic capture, without requesting meeting permission or publishing audio; can be called before the meeting once initialization succeeds. Parameters: Returns: None (the asynchronous result is delivered through the callback).

openMicAndPublish(preOption, callback)

Description: Completes server-side authorization, mic capture, and SRTC publishing in the current meeting. A failure rolls back this publish and closes capture. Parameters: Returns: None (the asynchronous result is delivered through the callback).

closeMic()

Description: Unpublishes the mic in the current meeting and stops local capture; when not in a meeting, only stops local capture. Parameters: None. Returns: None (Unit).

getMicVolume()

Description: Gets the real-time mic volume during capture. Parameters: None. Returns: The volume in dBFS; null when not capturing.

getMicDevices()

Description: Gets a snapshot of the mic input device capabilities SRTC currently recognizes. Parameters: None. Returns: The list of mic device capabilities; an empty list when there is no available device.

switchMicDevice(deviceId)

Description: Switches the mic input by device ID. Parameters: Returns: None (Unit).

Screen sharing

initScreenShare(activity, notificationParam, preOpt)

Description: Creates or reuses the local screen capture object. This method only initializes capture resources; it doesn’t mean a screen track has been published to the meeting. Parameters: Returns: None (Unit). Capture state is delivered through screenCaptureEvent.

startScreenShare(hasBar, callback)

Description: Runs the full flow of Android authorization, the Meeting sharing request, screen capture, and SRTC track publishing. Call initScreenShare() first. Parameters: Returns: None (the asynchronous result is delivered through the callback).

stopScreenShare()

Description: Stops the current user’s screen sharing and coordinates the share track it has in common with course recording. Parameters: None. Returns: None (Unit).

confirmStartScreenShareAgree(targetId, hasBar, callback)

Description: Accepts the host’s screen sharing request and goes on to complete authorization, capture, and publishing. Parameters: Returns: None (the asynchronous result is delivered through the callback).

confirmStartScreenShareRefuse(targetId, callback)

Description: Declines the host’s screen sharing request. Parameters: Returns: None (the asynchronous result is delivered through the callback).

Whiteboard sharing

requestShareBoard(callback)

Description: Requests to start whiteboard sharing. Parameters: Returns: None (the asynchronous result is delivered through the callback).

stopShareWhiteBoard()

Description: Stops the current user’s whiteboard sharing; the overload with a callback returns after the server confirms the result. Returns: None (Unit).

confirmStartWhiteBoardShareAgree(targetId, callback)

Description: Accepts the host’s whiteboard sharing request. Parameters: Returns: None (the asynchronous result is delivered through the callback).

confirmStartWhiteBoardShareRefuse(targetId, callback)

Description: Declines the host’s whiteboard sharing request. Parameters: Returns: None (the asynchronous result is delivered through the callback).

Room messages and raising hands

sendRoomChatMessage(targetId, msg, msgType, callback)

Description: Sends a room chat message. Parameters: Returns: None (the asynchronous result is delivered through the callback).

sendRoomCustomMessage(targetId, msg, callback)

Description: Sends an app-defined custom message; recipients handle extension messages through MeetingMessageEvent.onExtensionMessage(). Parameters: Returns: None (the asynchronous result is delivered through the callback).

getRoomChatMsgList(page, prePage, callback)

Description: Queries the current meeting’s chat history page by page. Parameters: Returns: None (the asynchronous result is delivered through the callback).

requestHandUp(code, callback)

Description: Sends a raise-hand request of the specified type to the host. Parameters: Returns: None (the asynchronous result is delivered through the callback).

cancelHandUp(code)

Description: Cancels the current user’s raise-hand request of the specified type. Parameters: Returns: None (Unit).

Replying to device requests

confirmOpenCameraAgree(targetId, view, preOpt, callback)

Description: Accepts the host’s request to turn on the camera and completes local capture and publishing. Parameters: Returns: None (the asynchronous result is delivered through the callback).

confirmOpenCameraRefuse(targetId, callback)

Description: Declines the host’s request to turn on the camera. Parameters: Returns: None (the asynchronous result is delivered through the callback).

confirmOpenMicAgree(targetId, preOpt, callback)

Description: Accepts the host’s request to turn on the mic and completes local capture and publishing. Parameters: Returns: None (the asynchronous result is delivered through the callback).

confirmOpenMicRefuse(targetId, callback)

Description: Declines the host’s request to turn on the mic. Parameters: Returns: None (the asynchronous result is delivered through the callback).

Cloud recording and course recording

startCloudRecord(layoutData, callback)

Description: Starts cloud video recording for the current meeting. Parameters: Returns: None (the asynchronous result is delivered through the callback).

stopCloudRecord(callback)

Description: Stops cloud video recording for the current meeting. Parameters: Returns: None (the asynchronous result is delivered through the callback).

enableCourseRecordTrack(track, callback)

Description: Publishes a custom video track provided by your app as TRACK_SHARE, for course recording. This method only handles the media track; your app sends the recording business request separately. Parameters: Returns: None (the asynchronous result is delivered through the callback).

disableCourseRecordTrack()

Description: Unpublishes the course recording sharing track; it doesn’t stop the server-side recording task on your app’s behalf. Parameters: None. Returns: None (Unit).

Audio routing and remote audio

toggleRemoteAudioMute(mute)

Description: Mutes or resumes playback of the current meeting’s remote mixed audio. Parameters: Returns: None (Unit).

getAudioRouterManager()

Description: Gets the SRTC Engine-level audio routing manager; repeated calls within the same lifecycle return the cached instance. Parameters: None. Returns: AudioRouterManager?; null when the SDK isn’t ready. Callers must not call its release() directly.

releaseAudioRouterManager()

Description: The Meeting SDK releases and clears the cached audio routing manager. Safe to call repeatedly. Parameters: None. Returns: None (Unit).

Remote member video

startPlayRemoteVideo(uid, trackDesc, view, event, callback)

Description: Subscribes to the specified member’s video track. After SRTC confirms success, the corresponding RemoteVideoTrack control object is returned. Parameters: Returns: None (the asynchronous result is delivered through the callback).

stopPlayRemoteVideo(uid, trackDesc)

Description: Unsubscribes from the specified member’s video track. Parameters: Returns: None (Unit).

getRemoteVideoTrack(uid, trackDesc)

Description: Queries the specified remote video control track cached for the current meeting. Parameters: Returns: The matching RemoteVideoTrack; null when not in a meeting or the control track hasn’t been created. For track rendering methods, see SRTC RemoteVideoTrack.

Remote composite stream

startPlayRemoteMixture(view, event, callback)

Description: Prepares the remote composite stream control track and submits the subscription request. SRTC currently doesn’t provide a subscription result listener for the composite stream, so success only means the request was submitted, not that the first frame has been received. Parameters: Returns: None (the asynchronous result is delivered through the callback).

stopPlayRemoteMixture()

Description: Stops subscribing to the remote composite stream. Parameters: None. Returns: None (Unit).

getRemoteMixtureTrack()

Description: Queries the remote composite stream control track cached for the current meeting. Parameters: None. Returns: RemoteVideoTrack?; null when not in a meeting or not yet created.

Wangsu generic streams

:::warning The APIs in this group apply only to the Wangsu (WS) media streaming engine, and you must already have entered the meeting. Calling them with a non-WS engine returns an underlying “not supported” error or a null control track. :::

subscribeWsVideoStream(streamName, uid, trackDesc, view, event, callback)

Description: Subscribes to one Wangsu generic video stream by its full stream name, without depending on the meeting members’ track lists. Parameters: Returns: None (the asynchronous result is delivered through the callback).

subscribeWsAudioStream(streamName, uid, trackDesc, callback)

Description: Subscribes to one Wangsu generic audio stream by its full stream name; after success, the SDK plays it through the speaker automatically. Parameters: Returns: None (the asynchronous result is delivered through the callback).

unsubscribeWsVideoStream(streamName, uid, trackDesc)

Description: Unsubscribes from a Wangsu generic video stream. Control tracks are reclaimed together when you exit the meeting. Parameters: Returns: None (Unit).

unsubscribeWsAudioStream(streamName, uid, trackDesc)

Description: Unsubscribes from a Wangsu generic audio stream. Parameters: Returns: None (Unit).

getWsVideoStreamTrack(uid, trackDesc)

Description: Gets or creates a Wangsu generic video stream control track; you can bind the render view before subscribing. Parameters: Returns: RemoteVideoTrack?; null for audio streams, non-WS engines, or when not in a meeting.

Cast codes

registerCastCode(meetingId, callback)

Registers or renews the current device’s cast code and syncs the large screen’s current meeting. Repeated calls from the same device return the same valid code and refresh its validity; call it immediately after entering or exiting a meeting, and renew it periodically while online as agreed with the server. Returns: Unit; the business result is returned through the callback.

unregisterCastCode(callback)

Unregisters the current device’s cast code, usually called before logging out or shutting down the device. Returns: Unit; the result is returned through the callback.

startCast(code, option, callback)

Consumes a cast code and gets the target meeting. The server consumes the cast code atomically, so it must not be reused even if entering the meeting fails afterward; your app enters the meeting based on the result and, when canShare is true, goes on to request sharing. When the large screen is already in a meeting, the server ignores the roles and ownership in option. Returns: Unit; the business result is returned through the callback. For the related models, see the model types page; for ownership values, see the enums page.

Virtual background

Supported since 2.0.39. First initialize the SDK and install the person segmentation model, then set blur or a background image, and finally turn the effect on. After camera capture or a switch succeeds, or after a successful reconnection, the meeting layer reapplies the cached configuration; release() clears the cache and releases the underlying resources.

installVirtualBackground(modelData)

Installs the virtual background module; no license key is required. Returns: 0 on success; MeetingErrorCode.SDK_NOT_READY when the SDK isn’t ready; other errors pass through RTC’s 102xxx error codes. Check the result before turning the effect on.

uninstallVirtualBackground()

Uninstalls the model and GPU resources, and clears the model, background image, mode, and on/off state cached by the meeting layer; nothing is reinstalled automatically afterward. No parameters; returns Unit.

enabledVirtualBackground(enabled)

Returns: 0 on success; MeetingErrorCode.SDK_NOT_READY when the SDK isn’t ready; other errors pass through the RTC return value. Turning the effect off doesn’t uninstall the model.

setVirtualBackgroundBlur(level)

Returns: Unit. Mutually exclusive with background image mode; whichever mode is set last takes effect. Setting the strength doesn’t turn on the main switch automatically.

setVirtualBackgroundImage(image)

Returns: Unit. Mutually exclusive with blur mode; whichever mode is set last takes effect. Your app must first decode the image URI or file into a Bitmap; the meeting layer caches this object for configuration replay, so don’t recycle it while it’s in use. Setting the image doesn’t turn on the main switch automatically.

setVirtualBackgroundInferenceInterval(interval)

Returns: Unit. For your app to configure according to device performance; we don’t recommend exposing it directly to end users.

setVirtualBackgroundMaskSync(on)

Returns: Unit. Makes a difference only when the inference interval is greater than 1; it reduces mask misalignment trailing during fast motion.

isVirtualBackgroundEnabled()

No parameters. Returns: The RTC’s current virtual background on/off state; falls back to the value cached by the meeting layer when RTC hasn’t been created yet. This state doesn’t mean model inference or the video effect has been verified to work.