nimeet Docs
中文

Cocos2d-x SDK API Reference

Complete Cocos2d-x public surface generated from the public SDK interface definition: classes, interfaces, enums, events, error identifiers and capability scope.

Generated from the public SDK interface definitions

Version v1.1.0 · Updated 2026-10-26 · revision 1

Interface overview

This page lists the public API of Cocos2d-x(C++ binding): classes, methods, overloads, properties, events and error codes. The interface definition matches the SDK package version.

Checklist itemCount
Interface / class2
Method43
Method overloads48
Property0
Enums0
error-code constants0

Availability

This platform's SDK: Generally available. The interface definition matches the SDK package version; runtime capability follows the published SDK package.

Join channel flow

Arranged in the typical call order of join / leave / publish / subscribe; the parameter table is expanded under “Parameters of the minimal runnable flow”.

StepInterfaceMethodOverload count
enable video and previewNimeetCocos2dxRtcEngineenableVideo1
Create / initializeNimeetCocos2dxRtcEngineinitialize1
Join a channelNimeetCocos2dxRtcEnginejoinChannel2
Leave a channelNimeetCocos2dxRtcEngineleaveChannel2
subscribe to remote mediaNimeetCocos2dxRtcEnginemuteRemoteAudioStream1
Renew the TokenNimeetCocos2dxRtcEnginerenewToken1
Channel scenariosNimeetCocos2dxRtcEnginesetChannelProfile1
role switchingNimeetCocos2dxRtcEnginesetClientRole2
local videoNimeetCocos2dxRtcEnginesetupLocalVideo1

parameters for the minimal runnable flow

ParametersTypeOptionalVariadic parameters
contextconst RtcEngineContext&NoNo
tokenconst char*NoNo
channelIdconst char*NoNo
infoconst char*NoNo
uiduid_tNoNo
tokenconst char*NoNo
channelIdconst char*NoNo
uiduid_tNoNo
optionsconst ChannelMediaOptions&NoNo
optionsconst LeaveChannelOptions&NoNo
uiduid_tNoNo
muteboolNoNo
tokenconst char*NoNo
profileCHANNEL_PROFILE_TYPENoNo
roleCLIENT_ROLE_TYPENoNo
roleCLIENT_ROLE_TYPENoNo
optionsconst ClientRoleOptions&NoNo
canvasconst VideoCanvas&NoNo

Endpoint index

InterfaceMethodPropertyEvents
IRtcEngineEventHandler1400
NimeetCocos2dxRtcEngine2900

all endpoints

IRtcEngineEventHandler 14 method / 0 Property
typescript
onAudioVolumeIndication(speakers: const AudioVolumeInfo*, speakerNumber: unsigned int, totalVolume: int): void
onConnectionStateChanged(state: CONNECTION_STATE_TYPE, reason: CONNECTION_CHANGED_REASON_TYPE): void
onError(err: int, msg: const char*): void
onJoinChannelSuccess(channel: const char*, uid: uid_t, elapsed: int): void
onLeaveChannel(stats: const RtcStats&): void
onLocalAudioStateChanged(state: LOCAL_AUDIO_STREAM_STATE, reason: LOCAL_AUDIO_STREAM_REASON): void
onLocalVideoStateChanged(source: VIDEO_SOURCE_TYPE, state: LOCAL_VIDEO_STREAM_STATE, reason: LOCAL_VIDEO_STREAM_REASON): void
onRejoinChannelSuccess(channel: const char*, uid: uid_t, elapsed: int): void
onRemoteAudioStateChanged(uid: uid_t, state: REMOTE_AUDIO_STATE, reason: REMOTE_AUDIO_STATE_REASON, elapsed: int): void
onRemoteVideoStateChanged(uid: uid_t, state: REMOTE_VIDEO_STATE, reason: REMOTE_VIDEO_STATE_REASON, elapsed: int): void
onRequestToken(): void
onRtcStats(stats: const RtcStats&): void
onUserJoined(uid: uid_t, elapsed: int): void
onUserOffline(uid: uid_t, reason: USER_OFFLINE_REASON_TYPE): void

Method detail: 14 / 14 (parameters, returns, errors)

MethodParametersReturnsErrors
onAudioVolumeIndicationspeakers: const AudioVolumeInfo*, speakerNumber: unsigned int, totalVolume: intvoidError code index
onConnectionStateChangedstate: CONNECTION_STATE_TYPE, reason: CONNECTION_CHANGED_REASON_TYPEvoidError code index
onErrorerr: int, msg: const char*voidError code index
onJoinChannelSuccesschannel: const char*, uid: uid_t, elapsed: intvoidError code index
onLeaveChannelstats: const RtcStats&voidError code index
onLocalAudioStateChangedstate: LOCAL_AUDIO_STREAM_STATE, reason: LOCAL_AUDIO_STREAM_REASONvoidError code index
onLocalVideoStateChangedsource: VIDEO_SOURCE_TYPE, state: LOCAL_VIDEO_STREAM_STATE, reason: LOCAL_VIDEO_STREAM_REASONvoidError code index
onRejoinChannelSuccesschannel: const char*, uid: uid_t, elapsed: intvoidError code index
onRemoteAudioStateChangeduid: uid_t, state: REMOTE_AUDIO_STATE, reason: REMOTE_AUDIO_STATE_REASON, elapsed: intvoidError code index
onRemoteVideoStateChangeduid: uid_t, state: REMOTE_VIDEO_STATE, reason: REMOTE_VIDEO_STATE_REASON, elapsed: intvoidError code index
onRequestToken—voidError code index
onRtcStatsstats: const RtcStats&voidError code index
onUserJoineduid: uid_t, elapsed: intvoidError code index
onUserOfflineuid: uid_t, reason: USER_OFFLINE_REASON_TYPEvoidError code index
NimeetCocos2dxRtcEngine 29 method / 0 Property
typescript
adjustPlaybackSignalVolume(volume: int): int
adjustRecordingSignalVolume(volume: int): int
disableAudio(): int
disableVideo(): int
enableAudio(): int
enableAudioVolumeIndication(interval: int, smooth: int, reportVad: bool): int
enableLocalAudio(enabled: bool): int
enableLocalVideo(enabled: bool): int
enableVideo(): int
initialize(context: const RtcEngineContext&): int
joinChannel(token: const char*, channelId: const char*, info: const char*, uid: uid_t): int
joinChannel(token: const char*, channelId: const char*, uid: uid_t, options: const ChannelMediaOptions&): int
leaveChannel(): int
leaveChannel(options: const LeaveChannelOptions&): int
muteAllRemoteAudioStreams(mute: bool): int
muteAllRemoteVideoStreams(mute: bool): int
muteLocalAudioStream(mute: bool): int
muteLocalVideoStream(mute: bool): int
muteRemoteAudioStream(uid: uid_t, mute: bool): int
muteRemoteVideoStream(uid: uid_t, mute: bool): int
renewToken(token: const char*): int
setChannelProfile(profile: CHANNEL_PROFILE_TYPE): int
setClientRole(role: CLIENT_ROLE_TYPE): int
setClientRole(role: CLIENT_ROLE_TYPE, options: const ClientRoleOptions&): int
setLogFilter(filter: unsigned int): int
setParameters(parameters: const char*): int
setVideoEncoderConfiguration(config: const VideoEncoderConfiguration&): int
setupLocalVideo(canvas: const VideoCanvas&): int
setupRemoteVideo(canvas: const VideoCanvas&): int
startPreview(): int
startPreview(sourceType: VIDEO_SOURCE_TYPE): int
stopPreview(): int
stopPreview(sourceType: VIDEO_SOURCE_TYPE): int
switchCamera(): int

Method detail: 29 / 29 (parameters, returns, errors)

MethodParametersReturnsErrors
adjustPlaybackSignalVolumevolume: intintError code index
adjustRecordingSignalVolumevolume: intintError code index
disableAudio—intError code index
disableVideo—intError code index
enableAudio—intError code index
enableAudioVolumeIndicationinterval: int, smooth: int, reportVad: boolintError code index
enableLocalAudioenabled: boolintError code index
enableLocalVideoenabled: boolintError code index
enableVideo—intError code index
initializecontext: const RtcEngineContext&intError code index
joinChanneltoken: const char*, channelId: const char*, info: const char*, uid: uid_tintError code index
leaveChannel—intError code index
muteAllRemoteAudioStreamsmute: boolintError code index
muteAllRemoteVideoStreamsmute: boolintError code index
muteLocalAudioStreammute: boolintError code index
muteLocalVideoStreammute: boolintError code index
muteRemoteAudioStreamuid: uid_t, mute: boolintError code index
muteRemoteVideoStreamuid: uid_t, mute: boolintError code index
renewTokentoken: const char*intError code index
setChannelProfileprofile: CHANNEL_PROFILE_TYPEintError code index
setClientRolerole: CLIENT_ROLE_TYPEintError code index
setLogFilterfilter: unsigned intintError code index
setParametersparameters: const char*intError code index
setVideoEncoderConfigurationconfig: const VideoEncoderConfiguration&intError code index
setupLocalVideocanvas: const VideoCanvas&intError code index
setupRemoteVideocanvas: const VideoCanvas&intError code index
startPreview—intError code index
stopPreview—intError code index
switchCamera—intError code index

Enums

This SDK has no standalone enums (the Web SDK expresses them as string union types).

error-code constants

This SDK does not expose error-code constants (see Known limitations). For platform REST error codes see Error codes; for cross-platform SDK error identifiers see SDK error identifiers.

Generated by the documentation build pipeline · 2026-10-31 01:24:02 UTC · Documentation center v1.1.0.

Content follows the public API definitions.

ni-meet is a self-hosted RTC PaaS with a LiveKit-based media plane (Apache-2.0) and an Agora-compatible API.