atomicx-core sdk API 文档
atomicx-core sdk
atomicx-core sdk 是腾讯云最新推出的面向即时通信、音视频通话、视频直播、语聊房等场景的全新一代基于响应式的 API,您可以非常快速的在基于这组 API 构建自己的 UI 页面,它支持房间管理、屏幕分享、成员管理、麦位控制、基础美颜等丰富功能,同时确保720P和1080P高清画质,在70%丢包率的弱网环境下仍能保持高质量音视频传输。此外,SDK 采用48kHz高音质采样,结合腾讯天籁实验室的3A处理算法,消除回声和啸叫,实现全链路128kbps高音质立体声,为用户带来清晰沉浸的互动体验,本页面包含 atomicx-core sdk 的所有API接口,按功能模块分类展示。
LoginState
🔐 用户身份认证与登录管理模块
核心功能:提供用户登录、登出、个人信息管理等基础身份认证功能,是整个系统的用户身份基础。
技术特点:支持多种登录方式、用户信息缓存、登录状态持久化等功能,确保用户身份的安全性和可靠性。
业务价值:为所有业务模块提供统一的用户身份认证服务,是系统安全和用户体验的基础保障。
应用场景:用户登录、身份验证、个人信息管理、权限控制等核心身份认证场景。
响应式数据
loginUserInfo
Ref<LoginUserInfo | null>
示例
import { useLoginState } from 'tuikit-atomicx-vue3';
const { loginUserInfo } = useLoginState();
// 监听用户信息变化
watch(loginUserInfo, (newUserInfo) => {
if (newUserInfo) {
console.log('用户信息更新:', newUserInfo);
console.log('用户ID:', newUserInfo.userID);
console.log('用户昵称:', newUserInfo.nickname);
console.log('用户头像:', newUserInfo.avatarURL);
}
});
// 获取当前用户信息
const currentUser = loginUserInfo.value;
if (currentUser) {
console.log('当前登录用户:', currentUser.nickname);
}
接口函数
login
示例
import { useLoginState } from 'tuikit-atomicx-vue3';
const { login } = useLoginState();
// 调用函数
// 参数示例:
// loginParams: 对应的参数值
await login({ /* 参数对象 */ });
setSelfInfo
示例
import { useLoginState } from 'tuikit-atomicx-vue3';
const { setSelfInfo } = useLoginState();
// 调用函数
// 参数示例:
// userInfo: 对应的参数值
await setSelfInfo('userInfo示例值');
logout
示例
await logout();
DeviceState
🎥 设备状态管理模块
核心功能:管理摄像头、麦克风等音视频设备的控制,提供设备状态监控、权限检查等基础设备服务。
技术特点:支持多设备管理、设备状态实时监控、权限动态检查、设备故障自动恢复等高级功能。
业务价值:为直播系统提供稳定的设备基础,确保音视频采集的可靠性和用户体验。
应用场景:设备管理、权限控制、音视频采集、设备故障处理等基础技术场景。
响应式数据
microphoneStatus
Ref<DeviceStatus>
示例
import { useDeviceState } from 'tuikit-atomicx-vue3';
const { microphoneStatus } = useDeviceState();
// 监听数据变化
watch(microphoneStatus, (newValue) => {
console.log('microphoneStatus 更新:', newValue);
});
// 直接访问数据
console.log('当前 microphoneStatus:', microphoneStatus.value);
microphoneList
Ref<TUIDeviceInfo[]>
示例
import { useDeviceState } from 'tuikit-atomicx-vue3';
const { microphoneList } = useDeviceState();
// 监听数据变化
watch(microphoneList, (newValue) => {
console.log('microphoneList 更新:', newValue);
});
// 直接访问数据
console.log('当前 microphoneList:', microphoneList.value);
currentMicrophone
Ref<TUIDeviceInfo | null>
示例
import { useDeviceState } from 'tuikit-atomicx-vue3';
const { currentMicrophone } = useDeviceState();
// 监听数据变化
watch(currentMicrophone, (newValue) => {
console.log('currentMicrophone 更新:', newValue);
});
// 直接访问数据
console.log('当前 currentMicrophone:', currentMicrophone.value);
microphoneLastError
Ref<DeviceError>
示例
import { useDeviceState } from 'tuikit-atomicx-vue3';
const { microphoneLastError } = useDeviceState();
// 监听数据变化
watch(microphoneLastError, (newValue) => {
console.log('microphoneLastError 更新:', newValue);
});
// 直接访问数据
console.log('当前 microphoneLastError:', microphoneLastError.value);
captureVolume
Ref<any>
示例
import { useDeviceState } from 'tuikit-atomicx-vue3';
const { captureVolume } = useDeviceState();
// 监听数据变化
watch(captureVolume, (newValue) => {
console.log('captureVolume 更新:', newValue);
});
// 直接访问数据
console.log('当前 captureVolume:', captureVolume.value);
currentMicVolume
Ref<any>
示例
import { useDeviceState } from 'tuikit-atomicx-vue3';
const { currentMicVolume } = useDeviceState();
// 监听数据变化
watch(currentMicVolume, (newValue) => {
console.log('currentMicVolume 更新:', newValue);
});
// 直接访问数据
console.log('当前 currentMicVolume:', currentMicVolume.value);
isMicrophoneTesting
Ref<any>
示例
import { useDeviceState } from 'tuikit-atomicx-vue3';
const { isMicrophoneTesting } = useDeviceState();
// 监听数据变化
watch(isMicrophoneTesting, (newValue) => {
console.log('isMicrophoneTesting 更新:', newValue);
});
// 直接访问数据
console.log('当前 isMicrophoneTesting:', isMicrophoneTesting.value);
testingMicVolume
Ref<any>
示例
import { useDeviceState } from 'tuikit-atomicx-vue3';
const { testingMicVolume } = useDeviceState();
// 监听数据变化
watch(testingMicVolume, (newValue) => {
console.log('testingMicVolume 更新:', newValue);
});
// 直接访问数据
console.log('当前 testingMicVolume:', testingMicVolume.value);
cameraStatus
Ref<DeviceStatus>
示例
import { useDeviceState } from 'tuikit-atomicx-vue3';
const { cameraStatus } = useDeviceState();
// 监听数据变化
watch(cameraStatus, (newValue) => {
console.log('cameraStatus 更新:', newValue);
});
// 直接访问数据
console.log('当前 cameraStatus:', cameraStatus.value);
cameraList
Ref<TUIDeviceInfo[]>
示例
import { useDeviceState } from 'tuikit-atomicx-vue3';
const { cameraList } = useDeviceState();
// 监听数据变化
watch(cameraList, (newValue) => {
console.log('cameraList 更新:', newValue);
});
// 直接访问数据
console.log('当前 cameraList:', cameraList.value);
currentCamera
Ref<TUIDeviceInfo | null>
示例
import { useDeviceState } from 'tuikit-atomicx-vue3';
const { currentCamera } = useDeviceState();
// 监听数据变化
watch(currentCamera, (newValue) => {
console.log('currentCamera 更新:', newValue);
});
// 直接访问数据
console.log('当前 currentCamera:', currentCamera.value);
cameraLastError
Ref<DeviceError>
示例
import { useDeviceState } from 'tuikit-atomicx-vue3';
const { cameraLastError } = useDeviceState();
// 监听数据变化
watch(cameraLastError, (newValue) => {
console.log('cameraLastError 更新:', newValue);
});
// 直接访问数据
console.log('当前 cameraLastError:', cameraLastError.value);
isCameraTesting
Ref<any>
示例
import { useDeviceState } from 'tuikit-atomicx-vue3';
const { isCameraTesting } = useDeviceState();
// 监听数据变化
watch(isCameraTesting, (newValue) => {
console.log('isCameraTesting 更新:', newValue);
});
// 直接访问数据
console.log('当前 isCameraTesting:', isCameraTesting.value);
isCameraTestLoading
Ref<any>
示例
import { useDeviceState } from 'tuikit-atomicx-vue3';
const { isCameraTestLoading } = useDeviceState();
// 监听数据变化
watch(isCameraTestLoading, (newValue) => {
console.log('isCameraTestLoading 更新:', newValue);
});
// 直接访问数据
console.log('当前 isCameraTestLoading:', isCameraTestLoading.value);
isFrontCamera
Ref<any>
示例
import { useDeviceState } from 'tuikit-atomicx-vue3';
const { isFrontCamera } = useDeviceState();
// 监听数据变化
watch(isFrontCamera, (newValue) => {
console.log('isFrontCamera 更新:', newValue);
});
// 直接访问数据
console.log('当前 isFrontCamera:', isFrontCamera.value);
localMirrorType
Ref<any>
示例
import { useDeviceState } from 'tuikit-atomicx-vue3';
const { localMirrorType } = useDeviceState();
// 监听数据变化
watch(localMirrorType, (newValue) => {
console.log('localMirrorType 更新:', newValue);
});
// 直接访问数据
console.log('当前 localMirrorType:', localMirrorType.value);
localVideoQuality
Ref<any>
示例
import { useDeviceState } from 'tuikit-atomicx-vue3';
const { localVideoQuality } = useDeviceState();
// 监听数据变化
watch(localVideoQuality, (newValue) => {
console.log('localVideoQuality 更新:', newValue);
});
// 直接访问数据
console.log('当前 localVideoQuality:', localVideoQuality.value);
speakerList
Ref<TUIDeviceInfo[]>
示例
import { useDeviceState } from 'tuikit-atomicx-vue3';
const { speakerList } = useDeviceState();
// 监听数据变化
watch(speakerList, (newValue) => {
console.log('speakerList 更新:', newValue);
});
// 直接访问数据
console.log('当前 speakerList:', speakerList.value);
currentSpeaker
Ref<TUIDeviceInfo | null>
示例
import { useDeviceState } from 'tuikit-atomicx-vue3';
const { currentSpeaker } = useDeviceState();
// 监听数据变化
watch(currentSpeaker, (newValue) => {
console.log('currentSpeaker 更新:', newValue);
});
// 直接访问数据
console.log('当前 currentSpeaker:', currentSpeaker.value);
outputVolume
Ref<any>
示例
import { useDeviceState } from 'tuikit-atomicx-vue3';
const { outputVolume } = useDeviceState();
// 监听数据变化
watch(outputVolume, (newValue) => {
console.log('outputVolume 更新:', newValue);
});
// 直接访问数据
console.log('当前 outputVolume:', outputVolume.value);
currentAudioRoute
Ref<AudioRoute>
示例
import { useDeviceState } from 'tuikit-atomicx-vue3';
const { currentAudioRoute } = useDeviceState();
// 监听数据变化
watch(currentAudioRoute, (newValue) => {
console.log('currentAudioRoute 更新:', newValue);
});
// 直接访问数据
console.log('当前 currentAudioRoute:', currentAudioRoute.value);
isSpeakerTesting
Ref<any>
示例
import { useDeviceState } from 'tuikit-atomicx-vue3';
const { isSpeakerTesting } = useDeviceState();
// 监听数据变化
watch(isSpeakerTesting, (newValue) => {
console.log('isSpeakerTesting 更新:', newValue);
});
// 直接访问数据
console.log('当前 isSpeakerTesting:', isSpeakerTesting.value);
screenStatus
Ref<DeviceStatus>
示例
import { useDeviceState } from 'tuikit-atomicx-vue3';
const { screenStatus } = useDeviceState();
// 监听数据变化
watch(screenStatus, (newValue) => {
console.log('screenStatus 更新:', newValue);
});
// 直接访问数据
console.log('当前 screenStatus:', screenStatus.value);
networkInfo
Ref<NetworkInfo | null>
示例
import { useDeviceState } from 'tuikit-atomicx-vue3';
const { networkInfo } = useDeviceState();
// 监听数据变化
watch(networkInfo, (newValue) => {
console.log('networkInfo 更新:', newValue);
});
// 直接访问数据
console.log('当前 networkInfo:', networkInfo.value);
接口函数
openLocalMicrophone
示例
import { useDeviceState } from 'tuikit-atomicx-vue3';
const { openLocalMicrophone } = useDeviceState();
// 开启麦克风
try {
await openLocalMicrophone();
console.log('麦克风开启成功');
} catch (error) {
console.error('麦克风开启失败:', error);
}
closeLocalMicrophone
示例
import { useDeviceState } from 'tuikit-atomicx-vue3';
const { closeLocalMicrophone } = useDeviceState();
// 关闭麦克风
await closeLocalMicrophone();
muteLocalAudio
示例
import { useDeviceState } from 'tuikit-atomicx-vue3';
const { muteLocalAudio } = useDeviceState();
// 静音本地音频
await muteLocalAudio();
unmuteLocalAudio
示例
import { useDeviceState } from 'tuikit-atomicx-vue3';
const { unmuteLocalAudio } = useDeviceState();
// 取消静音本地音频
await unmuteLocalAudio();
getMicrophoneList
示例
import { useDeviceState } from 'tuikit-atomicx-vue3';
const { getMicrophoneList, microphoneList } = useDeviceState();
// 获取麦克风列表
try {
await getMicrophoneList();
console.log('麦克风列表:', microphoneList.value);
} catch (error) {
console.error('获取麦克风列表失败:', error);
}
setCurrentMicrophone
示例
import { useDeviceState } from 'tuikit-atomicx-vue3';
const { setCurrentMicrophone } = useDeviceState();
// 调用函数
// 参数示例:
// deviceConfig: 对应的参数值
await setCurrentMicrophone('deviceConfig示例值');
startMicrophoneTest
示例
import { useDeviceState } from 'tuikit-atomicx-vue3';
const { startMicrophoneTest } = useDeviceState();
// 调用函数
// 参数示例:
// testConfig: 对应的参数值
await startMicrophoneTest('testConfig示例值');
setCaptureVolume
参数
| 参数名 | 类型 | 描述 |
|---|---|---|
| volume | number |
音量大小(0-100) |
示例
import { useDeviceState } from 'tuikit-atomicx-vue3';
const { setCaptureVolume } = useDeviceState();
// 设置采集音量为80%
await setCaptureVolume(80);
setOutputVolume
参数
| 参数名 | 类型 | 描述 |
|---|---|---|
| volume | number |
音量大小(0-100) |
示例
import { useDeviceState } from 'tuikit-atomicx-vue3';
const { setOutputVolume } = useDeviceState();
// 设置播放音量为60%
await setOutputVolume(60);
stopMicrophoneTest
示例
import { useDeviceState } from 'tuikit-atomicx-vue3';
const { stopMicrophoneTest } = useDeviceState();
// 停止麦克风测试
await stopMicrophoneTest();
getSpeakerList
示例
import { useDeviceState } from 'tuikit-atomicx-vue3';
const { getSpeakerList, speakerList } = useDeviceState();
// 获取扬声器列表
try {
await getSpeakerList();
console.log('扬声器列表:', speakerList.value);
} catch (error) {
console.error('获取扬声器列表失败:', error);
}
setCurrentSpeaker
示例
import { useDeviceState } from 'tuikit-atomicx-vue3';
const { setCurrentSpeaker } = useDeviceState();
// 调用函数
// 参数示例:
// deviceConfig: 对应的参数值
await setCurrentSpeaker('deviceConfig示例值');
setAudioRoute
参数
| 参数名 | 类型 | 描述 |
|---|---|---|
| output | AudioRoute |
音频路由类型 |
示例
import { useDeviceState } from 'tuikit-atomicx-vue3';
const { setAudioRoute } = useDeviceState();
// 设置为扬声器模式
await setAudioRoute(AudioRoute.Speakerphone);
// 设置为听筒模式
await setAudioRoute(AudioRoute.Earpiece);
startSpeakerTest
示例
import { useDeviceState } from 'tuikit-atomicx-vue3';
const { startSpeakerTest } = useDeviceState();
// 调用函数
// 参数示例:
// testConfig: 对应的参数值
await startSpeakerTest('testConfig示例值');
stopSpeakerTest
示例
import { useDeviceState } from 'tuikit-atomicx-vue3';
const { stopSpeakerTest } = useDeviceState();
// 停止扬声器测试
await stopSpeakerTest();
openLocalCamera
示例
import { useDeviceState } from 'tuikit-atomicx-vue3';
const { openLocalCamera } = useDeviceState();
// 开启摄像头
try {
await openLocalCamera();
console.log('摄像头开启成功');
} catch (error) {
console.error('摄像头开启失败:', error);
}
closeLocalCamera
示例
import { useDeviceState } from 'tuikit-atomicx-vue3';
const { closeLocalCamera } = useDeviceState();
// 关闭摄像头
await closeLocalCamera();
getCameraList
示例
import { useDeviceState } from 'tuikit-atomicx-vue3';
const { getCameraList, cameraList } = useDeviceState();
// 获取摄像头列表
try {
await getCameraList();
console.log('摄像头列表:', cameraList.value);
} catch (error) {
console.error('获取摄像头列表失败:', error);
}
setCurrentCamera
示例
import { useDeviceState } from 'tuikit-atomicx-vue3';
const { setCurrentCamera } = useDeviceState();
// 调用函数
// 参数示例:
// deviceConfig: 对应的参数值
await setCurrentCamera('deviceConfig示例值');
switchCamera
示例
import { useDeviceState } from 'tuikit-atomicx-vue3';
const { switchCamera } = useDeviceState();
// 调用函数
// 参数示例:
// cameraConfig: 对应的参数值
await switchCamera('cameraConfig示例值');
switchMirror
示例
import { useDeviceState } from 'tuikit-atomicx-vue3';
const { switchMirror } = useDeviceState();
// 调用函数
// 参数示例:
// mirrorConfig: 对应的参数值
await switchMirror('mirrorConfig示例值');
updateVideoQuality
示例
import { useDeviceState } from 'tuikit-atomicx-vue3';
const { updateVideoQuality } = useDeviceState();
// 调用函数
// 参数示例:
// qualityParams: 对应的参数值
await updateVideoQuality({ /* 参数对象 */ });
startCameraDeviceTest
示例
import { useDeviceState } from 'tuikit-atomicx-vue3';
const { startCameraDeviceTest } = useDeviceState();
// 调用函数
// 参数示例:
// testConfig: 对应的参数值
await startCameraDeviceTest('testConfig示例值');
stopCameraDeviceTest
示例
import { useDeviceState } from 'tuikit-atomicx-vue3';
const { stopCameraDeviceTest } = useDeviceState();
// 停止摄像头测试
await stopCameraDeviceTest();
screenCaptureStopped
示例
// 内部使用,当屏幕分享停止时自动调用
screenCaptureStopped();
LiveListState
📺 直播列表管理模块
核心功能:管理直播间的完整生命周期,包括创建、加入、离开、结束等核心业务流程,支持直播列表的分页获取和实时更新。
技术特点:支持分页加载、实时状态同步、直播信息动态更新,采用响应式数据管理,确保UI与数据状态实时同步。新增liveList和liveListCursor响应式数据,提供fetchLiveList接口函数。
业务价值:为直播平台提供核心的直播间管理能力,支持大规模并发直播场景,是直播业务的基础设施。
应用场景:直播列表展示、直播间创建、直播状态管理、直播数据统计等核心业务场景。
响应式数据
currentLive
Ref<LiveInfo | null>
示例
const tuiLiveInfo = await roomEngine.getLiveInfo();
const liveInfo = getLiveInfo(tuiLiveInfo);
console.log('转换后的直播信息:', liveInfo);
liveList
Ref<any>
示例
import { useLiveListState } from 'tuikit-atomicx-vue3';
const { liveList } = useLiveListState();
// 监听数据变化
watch(liveList, (newValue) => {
console.log('liveList 更新:', newValue);
});
// 直接访问数据
console.log('当前 liveList:', liveList.value);
liveListCursor
Ref<any>
示例
import { useLiveListState } from 'tuikit-atomicx-vue3';
const { liveListCursor } = useLiveListState();
// 监听数据变化
watch(liveListCursor, (newValue) => {
console.log('liveListCursor 更新:', newValue);
});
// 直接访问数据
console.log('当前 liveListCursor:', liveListCursor.value);
接口函数
createLive
示例
import { useLiveListState } from 'tuikit-atomicx-vue3';
const { createLive } = useLiveListState();
// 调用函数
// 参数示例:
// liveParams: 对应的参数值
await createLive({ /* 参数对象 */ });
joinLive
示例
import { useLiveListState } from 'tuikit-atomicx-vue3';
const { joinLive } = useLiveListState();
// 调用函数
// 参数示例:
// joinParams: 对应的参数值
await joinLive({ /* 参数对象 */ });
leaveLive
示例
import { useLiveListState } from 'tuikit-atomicx-vue3';
const { leaveLive } = useLiveListState();
// 离开直播间
try {
await leaveLive();
console.log('成功离开直播间');
} catch (error) {
console.error('离开直播间失败:', error);
}
endLive
示例
import { useLiveListState } from 'tuikit-atomicx-vue3';
const { endLive } = useLiveListState();
// 结束直播(主播操作)
try {
await endLive();
console.log('直播已结束');
} catch (error) {
console.error('结束直播失败:', error);
}
updateLiveInfo
示例
import { useLiveListState } from 'tuikit-atomicx-vue3';
const { updateLiveInfo } = useLiveListState();
// 调用函数
// 参数示例:
// updateParams: 对应的参数值
await updateLiveInfo({ /* 参数对象 */ });
queryMetaData
示例
import { useLiveListState } from 'tuikit-atomicx-vue3';
const { queryMetaData } = useLiveListState();
// 调用函数
// 参数示例:
// queryParams: 对应的参数值
await queryMetaData({ /* 参数对象 */ });
updateLiveMetaData
示例
import { useLiveListState } from 'tuikit-atomicx-vue3';
const { updateLiveMetaData } = useLiveListState();
// 调用函数
// 参数示例:
// metaParams: 对应的参数值
// string> }: 对应的参数值
await updateLiveMetaData({ /* 参数对象 */ });
fetchLiveList
示例
import { useLiveListState } from 'tuikit-atomicx-vue3';
const { fetchLiveList } = useLiveListState();
// 调用函数
// 参数示例:
// listParams: 对应的参数值
await fetchLiveList({ /* 参数对象 */ });
LiveSeatState
🪑 直播间座位管理模块
核心功能:实现多人连麦场景下的座位控制,支持复杂的座位状态管理和音视频设备控制,包括上麦、下麦、座位锁定等完整功能。
技术特点:基于WebRTC技术,支持多路音视频流管理,提供座位锁定、设备控制、权限管理等高级功能。新增seatList、canvas、speakingUsers、networkQualities响应式数据,以及完整的座位操作接口。
业务价值:为多人互动直播提供核心技术支撑,支持PK、连麦、多人游戏等丰富的互动场景。
应用场景:多人连麦、主播PK、互动游戏、在线教育、会议直播等需要多人音视频互动的场景。
响应式数据
seatList
Ref<any>
示例
import { useLiveSeatState } from 'tuikit-atomicx-vue3';
const { seatList } = useLiveSeatState();
// 监听数据变化
watch(seatList, (newValue) => {
console.log('seatList 更新:', newValue);
});
// 直接访问数据
console.log('当前 seatList:', seatList.value);
canvas
Ref<any>
示例
import { useLiveSeatState } from 'tuikit-atomicx-vue3';
const { canvas } = useLiveSeatState();
// 监听数据变化
watch(canvas, (newValue) => {
console.log('canvas 更新:', newValue);
});
// 直接访问数据
console.log('当前 canvas:', canvas.value);
speakingUsers
Ref<any>
示例
import { useLiveSeatState } from 'tuikit-atomicx-vue3';
const { speakingUsers } = useLiveSeatState();
// 监听数据变化
watch(speakingUsers, (newValue) => {
console.log('speakingUsers 更新:', newValue);
});
// 直接访问数据
console.log('当前 speakingUsers:', speakingUsers.value);
networkQualities
Ref<any>
示例
import { useLiveSeatState } from 'tuikit-atomicx-vue3';
const { networkQualities } = useLiveSeatState();
// 监听数据变化
watch(networkQualities, (newValue) => {
console.log('networkQualities 更新:', newValue);
});
// 直接访问数据
console.log('当前 networkQualities:', networkQualities.value);
接口函数
takeSeat
示例
import { useLiveSeatState } from 'tuikit-atomicx-vue3';
const { takeSeat } = useLiveSeatState();
// 调用函数
// 参数示例:
// seatParams: 对应的参数值
await takeSeat({ /* 参数对象 */ });
leaveSeat
示例
import { useLiveSeatState } from 'tuikit-atomicx-vue3';
const { leaveSeat } = useLiveSeatState();
// 调用函数
// 参数示例:
// seatParams: 对应的参数值
await leaveSeat({ /* 参数对象 */ });
lockSeat
示例
import { useLiveSeatState } from 'tuikit-atomicx-vue3';
const { lockSeat } = useLiveSeatState();
// 调用函数
// 参数示例:
// lockParams: 对应的参数值
await lockSeat({ /* 参数对象 */ });
unLockSeat
示例
import { useLiveSeatState } from 'tuikit-atomicx-vue3';
const { unLockSeat } = useLiveSeatState();
// 调用函数
// 参数示例:
// unlockParams: 对应的参数值
await unLockSeat({ /* 参数对象 */ });
kickUserOutOfSeat
示例
import { useLiveSeatState } from 'tuikit-atomicx-vue3';
const { kickUserOutOfSeat } = useLiveSeatState();
// 调用函数
// 参数示例:
// kickParams: 对应的参数值
await kickUserOutOfSeat({ /* 参数对象 */ });
moveUserToSeat
示例
import { useLiveSeatState } from 'tuikit-atomicx-vue3';
const { moveUserToSeat } = useLiveSeatState();
// 调用函数
// 参数示例:
// moveParams: 对应的参数值
await moveUserToSeat({ /* 参数对象 */ });
openRemoteCamera
示例
import { useLiveSeatState } from 'tuikit-atomicx-vue3';
const { openRemoteCamera } = useLiveSeatState();
// 调用函数
// 参数示例:
// cameraParams: 对应的参数值
await openRemoteCamera({ /* 参数对象 */ });
closeRemoteCamera
示例
import { useLiveSeatState } from 'tuikit-atomicx-vue3';
const { closeRemoteCamera } = useLiveSeatState();
// 调用函数
// 参数示例:
// cameraParams: 对应的参数值
await closeRemoteCamera({ /* 参数对象 */ });
openRemoteMicrophone
示例
import { useLiveSeatState } from 'tuikit-atomicx-vue3';
const { openRemoteMicrophone } = useLiveSeatState();
// 调用函数
// 参数示例:
// micParams: 对应的参数值
await openRemoteMicrophone({ /* 参数对象 */ });
closeRemoteMicrophone
示例
import { useLiveSeatState } from 'tuikit-atomicx-vue3';
const { closeRemoteMicrophone } = useLiveSeatState();
// 调用函数
// 参数示例:
// micParams: 对应的参数值
await closeRemoteMicrophone({ /* 参数对象 */ });
muteMicrophone
示例
import { useLiveSeatState } from 'tuikit-atomicx-vue3';
const { muteMicrophone } = useLiveSeatState();
// 调用函数
// 参数示例:
// muteParams: 对应的参数值
await muteMicrophone({ /* 参数对象 */ });
unmuteMicrophone
示例
import { useLiveSeatState } from 'tuikit-atomicx-vue3';
const { unmuteMicrophone } = useLiveSeatState();
// 调用函数
// 参数示例:
// unmuteParams: 对应的参数值
await unmuteMicrophone({ /* 参数对象 */ });
startPlayStream
示例
import { useLiveSeatState } from 'tuikit-atomicx-vue3';
const { startPlayStream } = useLiveSeatState();
// 调用函数
// 参数示例:
// streamParams: 对应的参数值
await startPlayStream({ /* 参数对象 */ });
stopPlayStream
示例
import { useLiveSeatState } from 'tuikit-atomicx-vue3';
const { stopPlayStream } = useLiveSeatState();
// 调用函数
// 参数示例:
// streamParams: 对应的参数值
await stopPlayStream({ /* 参数对象 */ });
LiveAudienceState
👥 直播间观众管理模块
核心功能:管理直播间观众列表,提供观众权限控制、管理员设置等直播间秩序维护功能,支持实时观众统计。
技术特点:支持实时观众列表更新、权限分级管理、批量操作等高级功能,确保直播间秩序和用户体验。新增audienceList和audienceCount响应式数据。
业务价值:为直播平台提供完整的观众管理解决方案,支持大规模观众场景下的秩序维护。
应用场景:观众管理、权限控制、直播间秩序维护、观众互动管理等核心业务场景。
响应式数据
audienceList
Ref<any>
示例
import { useLiveAudienceState } from 'tuikit-atomicx-vue3';
const { audienceList } = useLiveAudienceState();
// 监听数据变化
watch(audienceList, (newValue) => {
console.log('audienceList 更新:', newValue);
});
// 直接访问数据
console.log('当前 audienceList:', audienceList.value);
audienceCount
Ref<any>
示例
import { useLiveAudienceState } from 'tuikit-atomicx-vue3';
const { audienceCount } = useLiveAudienceState();
// 监听数据变化
watch(audienceCount, (newValue) => {
console.log('audienceCount 更新:', newValue);
});
// 直接访问数据
console.log('当前 audienceCount:', audienceCount.value);
接口函数
fetchAudienceList
示例
import { useLiveAudienceState } from 'tuikit-atomicx-vue3';
const { fetchAudienceList } = useLiveAudienceState();
// 调用函数
// 参数示例:
// fetchParams: 对应的参数值
await fetchAudienceList({ /* 参数对象 */ });
setAdministrator
示例
import { useLiveAudienceState } from 'tuikit-atomicx-vue3';
const { setAdministrator } = useLiveAudienceState();
// 调用函数
// 参数示例:
// adminParams: 对应的参数值
await setAdministrator({ /* 参数对象 */ });
revokeAdministrator
示例
import { useLiveAudienceState } from 'tuikit-atomicx-vue3';
const { revokeAdministrator } = useLiveAudienceState();
// 调用函数
// 参数示例:
// revokeParams: 对应的参数值
await revokeAdministrator({ /* 参数对象 */ });
kickUserOutOfRoom
示例
import { useLiveAudienceState } from 'tuikit-atomicx-vue3';
const { kickUserOutOfRoom } = useLiveAudienceState();
// 调用函数
// 参数示例:
// kickParams: 对应的参数值
await kickUserOutOfRoom({ /* 参数对象 */ });
disableSendMessage
示例
import { useLiveAudienceState } from 'tuikit-atomicx-vue3';
const { disableSendMessage } = useLiveAudienceState();
// 调用函数
// 参数示例:
// muteParams: 对应的参数值
await disableSendMessage({ /* 参数对象 */ });
LiveMonitorState
📊 直播监控管理模块
核心功能:提供直播间实时监控功能,包括直播状态监控、数据统计、异常检测等核心监控能力,支持多直播间监控。
技术特点:支持实时数据采集、多维度监控指标、智能告警机制,确保直播服务的稳定性和可靠性。新增monitorLiveInfoList响应式数据,优化监控接口。
业务价值:为直播平台提供全方位的监控保障,及时发现和处理异常情况,提升服务质量。
应用场景:直播质量监控、性能分析、异常告警、数据统计等运营管理场景。
响应式数据
monitorLiveInfoList
Ref<any>
示例
import { useLiveMonitorState } from 'tuikit-atomicx-vue3';
const { monitorLiveInfoList } = useLiveMonitorState();
// 监听数据变化
watch(monitorLiveInfoList, (newValue) => {
console.log('monitorLiveInfoList 更新:', newValue);
});
// 直接访问数据
console.log('当前 monitorLiveInfoList:', monitorLiveInfoList.value);
接口函数
init
示例
import { useLiveMonitorState } from 'tuikit-atomicx-vue3';
const { init } = useLiveMonitorState();
// 调用函数
// 参数示例:
// initParams: 对应的参数值
await init({ /* 参数对象 */ });
getLiveList
示例
import { useLiveMonitorState } from 'tuikit-atomicx-vue3';
const { getLiveList } = useLiveMonitorState();
// 调用函数
// 参数示例:
// listParams: 对应的参数值
await getLiveList({ /* 参数对象 */ });
closeRoom
示例
import { useLiveMonitorState } from 'tuikit-atomicx-vue3';
const { closeRoom } = useLiveMonitorState();
// 调用函数
// 参数示例:
// closeParams: 对应的参数值
await closeRoom({ /* 参数对象 */ });
sendMessage
示例
import { useLiveMonitorState } from 'tuikit-atomicx-vue3';
const { sendMessage } = useLiveMonitorState();
// 调用函数
// 参数示例:
// sendParams: 对应的参数值
await sendMessage({ /* 参数对象 */ });
startPlay
示例
import { useLiveMonitorState } from 'tuikit-atomicx-vue3';
const { startPlay } = useLiveMonitorState();
// 调用函数
// 参数示例:
// playParams: 对应的参数值
await startPlay({ /* 参数对象 */ });
stopPlay
示例
import { useLiveMonitorState } from 'tuikit-atomicx-vue3';
const { stopPlay } = useLiveMonitorState();
// 调用函数
// 参数示例:
// stopParams: 对应的参数值
await stopPlay({ /* 参数对象 */ });
muteLiveAudio
示例
import { useLiveMonitorState } from 'tuikit-atomicx-vue3';
const { muteLiveAudio } = useLiveMonitorState();
// 调用函数
// 参数示例:
// muteParams: 对应的参数值
await muteLiveAudio({ /* 参数对象 */ });
CoGuestState
🎤 连麦嘉宾管理模块
核心功能:处理观众与主播之间的连麦互动,管理连麦申请、邀请、接受、拒绝等完整的连麦流程,支持连麦状态管理。
技术特点:基于实时音视频技术,支持连麦状态实时同步、音视频质量自适应、网络状况监控等高级功能。新增connected、invitees、applicants、candidates响应式数据和applyForSeat接口。
业务价值:为直播平台提供观众参与互动的核心能力,增强用户粘性和直播趣味性。
应用场景:观众连麦、互动问答、在线K歌、游戏直播等需要观众参与的互动场景。
响应式数据
candidates
Ref<any>
示例
import { useCoGuestState } from 'tuikit-atomicx-vue3';
const { unsubscribeEvent, subscribeEvent } = useCoGuestState();
// 定义回调函数
const handleInvitation = (eventInfo) => {
console.log('收到连麦邀请:', eventInfo.hostUser);
};
// 订阅事件
subscribeEvent(GuestEvent.onHostInvitationReceived, handleInvitation);
// 取消订阅事件
unsubscribeEvent(GuestEvent.onHostInvitationReceived, handleInvitation);
connected
Ref<any>
示例
import { useCoGuestState } from 'tuikit-atomicx-vue3';
const { connected } = useCoGuestState();
// 监听数据变化
watch(connected, (newValue) => {
console.log('connected 更新:', newValue);
});
// 直接访问数据
console.log('当前 connected:', connected.value);
invitees
Ref<any>
示例
import { useCoGuestState } from 'tuikit-atomicx-vue3';
const { invitees } = useCoGuestState();
// 监听数据变化
watch(invitees, (newValue) => {
console.log('invitees 更新:', newValue);
});
// 直接访问数据
console.log('当前 invitees:', invitees.value);
applicants
Ref<any>
示例
import { useCoGuestState } from 'tuikit-atomicx-vue3';
const { applicants } = useCoGuestState();
// 监听数据变化
watch(applicants, (newValue) => {
console.log('applicants 更新:', newValue);
});
// 直接访问数据
console.log('当前 applicants:', applicants.value);
接口函数
cancelApplication
示例
import { useCoGuestState } from 'tuikit-atomicx-vue3';
const { cancelApplication } = useCoGuestState();
// 调用函数
// 参数示例:
// cancelParams: 对应的参数值
await cancelApplication({ /* 参数对象 */ });
acceptApplication
示例
import { useCoGuestState } from 'tuikit-atomicx-vue3';
const { acceptApplication } = useCoGuestState();
// 调用函数
// 参数示例:
// acceptParams: 对应的参数值
await acceptApplication({ /* 参数对象 */ });
rejectApplication
示例
import { useCoGuestState } from 'tuikit-atomicx-vue3';
const { rejectApplication } = useCoGuestState();
// 调用函数
// 参数示例:
// rejectParams: 对应的参数值
await rejectApplication({ /* 参数对象 */ });
cancelInvitation
示例
import { useCoGuestState } from 'tuikit-atomicx-vue3';
const { cancelInvitation } = useCoGuestState();
// 调用函数
// 参数示例:
// cancelParams: 对应的参数值
await cancelInvitation({ /* 参数对象 */ });
acceptInvitation
示例
import { useCoGuestState } from 'tuikit-atomicx-vue3';
const { acceptInvitation } = useCoGuestState();
// 调用函数
// 参数示例:
// acceptParams: 对应的参数值
await acceptInvitation({ /* 参数对象 */ });
rejectInvitation
示例
import { useCoGuestState } from 'tuikit-atomicx-vue3';
const { rejectInvitation } = useCoGuestState();
// 调用函数
// 参数示例:
// rejectParams: 对应的参数值
await rejectInvitation({ /* 参数对象 */ });
disConnect
示例
import { useCoGuestState } from 'tuikit-atomicx-vue3';
const { disConnect } = useCoGuestState();
// 调用函数
// 参数示例:
// disconnectParams: 对应的参数值
await disConnect({ /* 参数对象 */ });
applyForSeat
示例
import { useCoGuestState } from 'tuikit-atomicx-vue3';
const { applyForSeat } = useCoGuestState();
// 调用函数
// 参数示例:
// applyParams: 对应的参数值
await applyForSeat({ /* 参数对象 */ });
CoHostState
🤝 连麦主播管理模块
核心功能:实现主播间的连麦功能,支持主播邀请、连麦申请、连麦状态管理等主播间互动功能,提供完整的主播连麦流程。
技术特点:支持多主播音视频同步、画中画显示、音视频质量优化等高级技术,确保连麦体验的流畅性。新增coHostStatus、connected、applicant、invitees、candidates响应式数据和完整的连麦控制接口。
业务价值:为直播平台提供主播间协作的核心能力,支持PK、合作直播等高级业务场景。
应用场景:主播PK、合作直播、跨平台连麦、主播互动等高级直播场景。
响应式数据
coHostStatus
Ref<any>
示例
import { useCoHostState } from 'tuikit-atomicx-vue3';
const { coHostStatus } = useCoHostState();
// 监听数据变化
watch(coHostStatus, (newValue) => {
console.log('coHostStatus 更新:', newValue);
});
// 直接访问数据
console.log('当前 coHostStatus:', coHostStatus.value);
connected
Ref<any>
示例
import { useCoHostState } from 'tuikit-atomicx-vue3';
const { connected } = useCoHostState();
// 监听数据变化
watch(connected, (newValue) => {
console.log('connected 更新:', newValue);
});
// 直接访问数据
console.log('当前 connected:', connected.value);
applicant
Ref<any>
示例
import { useCoHostState } from 'tuikit-atomicx-vue3';
const { applicant } = useCoHostState();
// 监听数据变化
watch(applicant, (newValue) => {
console.log('applicant 更新:', newValue);
});
// 直接访问数据
console.log('当前 applicant:', applicant.value);
invitees
Ref<any>
示例
import { useCoHostState } from 'tuikit-atomicx-vue3';
const { invitees } = useCoHostState();
// 监听数据变化
watch(invitees, (newValue) => {
console.log('invitees 更新:', newValue);
});
// 直接访问数据
console.log('当前 invitees:', invitees.value);
candidates
Ref<any>
示例
import { useCoHostState } from 'tuikit-atomicx-vue3';
const { candidates } = useCoHostState();
// 监听数据变化
watch(candidates, (newValue) => {
console.log('candidates 更新:', newValue);
});
// 直接访问数据
console.log('当前 candidates:', candidates.value);
接口函数
requestHostConnection
示例
import { useCoHostState } from 'tuikit-atomicx-vue3';
const { requestHostConnection } = useCoHostState();
// 调用函数
// 参数示例:
// requestParams: 对应的参数值
await requestHostConnection({ /* 参数对象 */ });
cancelHostConnection
示例
import { useCoHostState } from 'tuikit-atomicx-vue3';
const { cancelHostConnection } = useCoHostState();
// 调用函数
// 参数示例:
// cancelParams: 对应的参数值
await cancelHostConnection({ /* 参数对象 */ });
acceptHostConnection
示例
import { useCoHostState } from 'tuikit-atomicx-vue3';
const { acceptHostConnection } = useCoHostState();
// 调用函数
// 参数示例:
// acceptParams: 对应的参数值
await acceptHostConnection({ /* 参数对象 */ });
rejectHostConnection
示例
import { useCoHostState } from 'tuikit-atomicx-vue3';
const { rejectHostConnection } = useCoHostState();
// 调用函数
// 参数示例:
// rejectParams: 对应的参数值
await rejectHostConnection({ /* 参数对象 */ });
exitHostConnection
示例
import { useCoHostState } from 'tuikit-atomicx-vue3';
const { exitHostConnection } = useCoHostState();
// 调用函数
// 参数示例:
// exitParams: 对应的参数值
await exitHostConnection({ /* 参数对象 */ });
BattleState
⚔️ PK对战管理模块
核心功能:管理主播间的PK对战功能,包括对战邀请、接受、拒绝、结束等完整的PK流程,支持实时比分统计。
技术特点:支持实时对战状态同步、比分计算、对战结果统计等功能。新增battleScore响应式数据,提供完整的PK对战体验。
业务价值:为直播平台提供竞技互动功能,增强直播趣味性和用户参与度。
应用场景:主播PK、才艺比拼、游戏对战、互动竞技等娱乐场景。
响应式数据
currentBattleInfo
Ref<BattleInfo>
示例
import { useBattleState } from 'tuikit-atomicx-vue3';
const { currentBattleInfo } = useBattleState();
// 监听数据变化
watch(currentBattleInfo, (newValue) => {
console.log('currentBattleInfo 更新:', newValue);
});
// 直接访问数据
console.log('当前 currentBattleInfo:', currentBattleInfo.value);
battleUsers
Ref<SeatUserInfo[]>
示例
import { useBattleState } from 'tuikit-atomicx-vue3';
const { battleUsers } = useBattleState();
// 监听数据变化
watch(battleUsers, (newValue) => {
console.log('battleUsers 更新:', newValue);
});
// 直接访问数据
console.log('当前 battleUsers:', battleUsers.value);
battleScore
Ref<any>
示例
import { useBattleState } from 'tuikit-atomicx-vue3';
const { battleScore } = useBattleState();
// 监听数据变化
watch(battleScore, (newValue) => {
console.log('battleScore 更新:', newValue);
});
// 直接访问数据
console.log('当前 battleScore:', battleScore.value);
接口函数
requestBattle
示例
import { useBattleState } from 'tuikit-atomicx-vue3';
const { requestBattle } = useBattleState();
// 调用函数
// 参数示例:
// battleParams: 对应的参数值
await requestBattle({ /* 参数对象 */ });
cancelBattleRequest
示例
import { useBattleState } from 'tuikit-atomicx-vue3';
const { cancelBattleRequest } = useBattleState();
// 调用函数
// 参数示例:
// cancelParams: 对应的参数值
await cancelBattleRequest({ /* 参数对象 */ });
acceptBattle
示例
import { useBattleState } from 'tuikit-atomicx-vue3';
const { acceptBattle } = useBattleState();
// 调用函数
// 参数示例:
// acceptParams: 对应的参数值
await acceptBattle({ /* 参数对象 */ });
rejectBattle
示例
import { useBattleState } from 'tuikit-atomicx-vue3';
const { rejectBattle } = useBattleState();
// 调用函数
// 参数示例:
// rejectParams: 对应的参数值
await rejectBattle({ /* 参数对象 */ });
exitBattle
示例
import { useBattleState } from 'tuikit-atomicx-vue3';
const { exitBattle } = useBattleState();
// 调用函数
// 参数示例:
// exitParams: 对应的参数值
await exitBattle({ /* 参数对象 */ });
BarrageState
💬 弹幕消息管理模块
核心功能:处理直播间内的文本消息、自定义消息等弹幕功能,支持弹幕发送、消息状态同步等完整弹幕系统,提供本地提示功能。
技术特点:支持高并发消息处理、实时消息同步、消息过滤、表情包支持等高级功能。新增sendTextMessage、sendCustomMessage、appendLocalTip接口函数。
业务价值:为直播平台提供核心的互动能力,增强用户参与度和直播氛围。
应用场景:弹幕互动、消息管理、表情包、聊天室等社交互动场景。
响应式数据
messageList
Ref<Barrage[]>
示例
import { useBarrageState } from 'tuikit-atomicx-vue3';
const { messageList } = useBarrageState();
// 监听数据变化
watch(messageList, (newValue) => {
console.log('messageList 更新:', newValue);
});
// 直接访问数据
console.log('当前 messageList:', messageList.value);
接口函数
sendTextMessage
示例
import { useBarrageState } from 'tuikit-atomicx-vue3';
const { sendTextMessage } = useBarrageState();
// 调用函数
// 参数示例:
// messageParams: 对应的参数值
await sendTextMessage({ /* 参数对象 */ });
sendCustomMessage
示例
import { useBarrageState } from 'tuikit-atomicx-vue3';
const { sendCustomMessage } = useBarrageState();
// 调用函数
// 参数示例:
// customParams: 对应的参数值
await sendCustomMessage({ /* 参数对象 */ });
appendLocalTip
示例
import { useBarrageState } from 'tuikit-atomicx-vue3';
const { appendLocalTip } = useBarrageState();
// 调用函数
// 参数示例:
// tipParams: 对应的参数值
await appendLocalTip({ /* 参数对象 */ });
MessageListState
📝 消息列表管理模块
核心功能:管理聊天消息列表,支持消息加载、滚动控制、已读回执、消息高亮等完整的消息展示功能。
技术特点:支持虚拟滚动、消息优化、实时更新等高性能消息处理。新增activeConversationID、messageList、hasMoreOlderMessage等响应式数据。
业务价值:为即时通信提供核心的消息展示能力,确保良好的聊天体验。
应用场景:即时通信、群聊、私聊、消息管理等通信场景。
响应式数据
activeConversationID
Ref<any>
示例
import { useMessageListState } from 'tuikit-atomicx-vue3';
const { activeConversationID } = useMessageListState();
// 监听数据变化
watch(activeConversationID, (newValue) => {
console.log('activeConversationID 更新:', newValue);
});
// 直接访问数据
console.log('当前 activeConversationID:', activeConversationID.value);
messageList
Ref<any>
示例
import { useMessageListState } from 'tuikit-atomicx-vue3';
const { messageList } = useMessageListState();
// 监听数据变化
watch(messageList, (newValue) => {
console.log('messageList 更新:', newValue);
});
// 直接访问数据
console.log('当前 messageList:', messageList.value);
hasMoreOlderMessage
Ref<any>
示例
import { useMessageListState } from 'tuikit-atomicx-vue3';
const { hasMoreOlderMessage } = useMessageListState();
// 监听数据变化
watch(hasMoreOlderMessage, (newValue) => {
console.log('hasMoreOlderMessage 更新:', newValue);
});
// 直接访问数据
console.log('当前 hasMoreOlderMessage:', hasMoreOlderMessage.value);
hasMoreNewerMessage
Ref<any>
示例
import { useMessageListState } from 'tuikit-atomicx-vue3';
const { hasMoreNewerMessage } = useMessageListState();
// 监听数据变化
watch(hasMoreNewerMessage, (newValue) => {
console.log('hasMoreNewerMessage 更新:', newValue);
});
// 直接访问数据
console.log('当前 hasMoreNewerMessage:', hasMoreNewerMessage.value);
enableReadReceipt
Ref<any>
示例
import { useMessageListState } from 'tuikit-atomicx-vue3';
const { enableReadReceipt } = useMessageListState();
// 监听数据变化
watch(enableReadReceipt, (newValue) => {
console.log('enableReadReceipt 更新:', newValue);
});
// 直接访问数据
console.log('当前 enableReadReceipt:', enableReadReceipt.value);
isDisableScroll
Ref<any>
示例
import { useMessageListState } from 'tuikit-atomicx-vue3';
const { isDisableScroll } = useMessageListState();
// 监听数据变化
watch(isDisableScroll, (newValue) => {
console.log('isDisableScroll 更新:', newValue);
});
// 直接访问数据
console.log('当前 isDisableScroll:', isDisableScroll.value);
recalledMessageIDSet
Ref<any>
示例
import { useMessageListState } from 'tuikit-atomicx-vue3';
const { recalledMessageIDSet } = useMessageListState();
// 监听数据变化
watch(recalledMessageIDSet, (newValue) => {
console.log('recalledMessageIDSet 更新:', newValue);
});
// 直接访问数据
console.log('当前 recalledMessageIDSet:', recalledMessageIDSet.value);
highlightMessageIDSet
Ref<any>
示例
import { useMessageListState } from 'tuikit-atomicx-vue3';
const { highlightMessageIDSet } = useMessageListState();
// 监听数据变化
watch(highlightMessageIDSet, (newValue) => {
console.log('highlightMessageIDSet 更新:', newValue);
});
// 直接访问数据
console.log('当前 highlightMessageIDSet:', highlightMessageIDSet.value);
接口函数
setEnableReadReceipt
示例
import { useMessageListState } from 'tuikit-atomicx-vue3';
const { setEnableReadReceipt } = useMessageListState();
// 调用函数
// 参数示例:
// receiptConfig: 对应的参数值
await setEnableReadReceipt('receiptConfig示例值');
setIsDisableScroll
示例
import { useMessageListState } from 'tuikit-atomicx-vue3';
const { setIsDisableScroll } = useMessageListState();
// 调用函数
// 参数示例:
// scrollConfig: 对应的参数值
await setIsDisableScroll('scrollConfig示例值');
highlightMessage
示例
import { useMessageListState } from 'tuikit-atomicx-vue3';
const { highlightMessage } = useMessageListState();
// 调用函数
// 参数示例:
// highlightParams: 对应的参数值
await highlightMessage({ /* 参数对象 */ });
MessageInputState
✏️ 消息输入管理模块
核心功能:管理消息输入框的状态和行为,支持文本输入、表情包、@功能、输入状态提示等完整的输入体验。
技术特点:支持富文本编辑、输入状态同步、草稿保存等功能。新增inputRawValue、isPeerTyping响应式数据。
业务价值:为用户提供便捷的消息输入体验,提升沟通效率。
应用场景:消息编辑、表情输入、文件发送、语音输入等输入场景。
响应式数据
inputRawValue
Ref<any>
示例
import { useMessageInputState } from 'tuikit-atomicx-vue3';
const { inputRawValue } = useMessageInputState();
// 监听数据变化
watch(inputRawValue, (newValue) => {
console.log('inputRawValue 更新:', newValue);
});
// 直接访问数据
console.log('当前 inputRawValue:', inputRawValue.value);
isPeerTyping
Ref<any>
示例
import { useMessageInputState } from 'tuikit-atomicx-vue3';
const { isPeerTyping } = useMessageInputState();
// 监听数据变化
watch(isPeerTyping, (newValue) => {
console.log('isPeerTyping 更新:', newValue);
});
// 直接访问数据
console.log('当前 isPeerTyping:', isPeerTyping.value);
接口函数
updateRawValue
示例
import { useMessageInputState } from 'tuikit-atomicx-vue3';
const { updateRawValue } = useMessageInputState();
// 调用函数
// 参数示例:
// valueParams: 对应的参数值
await updateRawValue({ /* 参数对象 */ });
setEditorInstance
示例
import { useMessageInputState } from 'tuikit-atomicx-vue3';
const { setEditorInstance } = useMessageInputState();
// 调用函数
// 参数示例:
// editorParams: 对应的参数值
await setEditorInstance({ /* 参数对象 */ });
setContent
示例
import { useMessageInputState } from 'tuikit-atomicx-vue3';
const { setContent } = useMessageInputState();
// 调用函数
// 参数示例:
// contentParams: 对应的参数值
await setContent({ /* 参数对象 */ });
insertContent
示例
import { useMessageInputState } from 'tuikit-atomicx-vue3';
const { insertContent } = useMessageInputState();
// 调用函数
// 参数示例:
// insertParams: 对应的参数值
await insertContent({ /* 参数对象 */ });
focusEditor
示例
import { useMessageInputState } from 'tuikit-atomicx-vue3';
const { focusEditor } = useMessageInputState();
// 聚焦编辑器
focusEditor();
blurEditor
示例
import { useMessageInputState } from 'tuikit-atomicx-vue3';
const { blurEditor } = useMessageInputState();
// 失焦编辑器
blurEditor();
sendMessage
示例
import { useMessageInputState } from 'tuikit-atomicx-vue3';
const { sendMessage } = useMessageInputState();
// 调用函数
// 参数示例:
// sendParams: 对应的参数值
await sendMessage({ /* 参数对象 */ });
MessageActionState
🔧 消息操作管理模块
核心功能:管理消息的各种操作,包括转发、引用、复制、删除、撤回等完整的消息操作功能。
技术特点:支持批量操作、操作状态管理、权限控制等功能。新增forwardMessageIDList、isForwardMessageSelectionDone等响应式数据。
业务价值:为用户提供丰富的消息操作能力,提升使用体验。
应用场景:消息转发、消息引用、消息管理、批量操作等场景。
响应式数据
forwardMessageIDList
Ref<any>
示例
import { useMessageActionState } from 'tuikit-atomicx-vue3';
const { forwardMessageIDList } = useMessageActionState();
// 监听数据变化
watch(forwardMessageIDList, (newValue) => {
console.log('forwardMessageIDList 更新:', newValue);
});
// 直接访问数据
console.log('当前 forwardMessageIDList:', forwardMessageIDList.value);
isForwardMessageSelectionDone
Ref<any>
示例
import { useMessageActionState } from 'tuikit-atomicx-vue3';
const { isForwardMessageSelectionDone } = useMessageActionState();
// 监听数据变化
watch(isForwardMessageSelectionDone, (newValue) => {
console.log('isForwardMessageSelectionDone 更新:', newValue);
});
// 直接访问数据
console.log('当前 isForwardMessageSelectionDone:', isForwardMessageSelectionDone.value);
forwardConversationIDList
Ref<any>
示例
import { useMessageActionState } from 'tuikit-atomicx-vue3';
const { forwardConversationIDList } = useMessageActionState();
// 监听数据变化
watch(forwardConversationIDList, (newValue) => {
console.log('forwardConversationIDList 更新:', newValue);
});
// 直接访问数据
console.log('当前 forwardConversationIDList:', forwardConversationIDList.value);
quotedMessage
Ref<any>
示例
import { useMessageActionState } from 'tuikit-atomicx-vue3';
const { quotedMessage } = useMessageActionState();
// 监听数据变化
watch(quotedMessage, (newValue) => {
console.log('quotedMessage 更新:', newValue);
});
// 直接访问数据
console.log('当前 quotedMessage:', quotedMessage.value);
接口函数
forwardMessage
示例
import { useMessageActionState } from 'tuikit-atomicx-vue3';
const { forwardMessage } = useMessageActionState();
// 调用函数
// 参数示例:
// forwardParams: 对应的参数值
await forwardMessage({ /* 参数对象 */ });
setForwardMessageIDList
示例
import { useMessageActionState } from 'tuikit-atomicx-vue3';
const { setForwardMessageIDList } = useMessageActionState();
// 调用函数
// 参数示例:
// messageParams: 对应的参数值
await setForwardMessageIDList({ /* 参数对象 */ });
setIsForwardMessageSelectionDone
示例
import { useMessageActionState } from 'tuikit-atomicx-vue3';
const { setIsForwardMessageSelectionDone } = useMessageActionState();
// 调用函数
// 参数示例:
// selectionParams: 对应的参数值
await setIsForwardMessageSelectionDone({ /* 参数对象 */ });
setForwardConversationIDList
示例
import { useMessageActionState } from 'tuikit-atomicx-vue3';
const { setForwardConversationIDList } = useMessageActionState();
// 调用函数
// 参数示例:
// conversationParams: 对应的参数值
await setForwardConversationIDList({ /* 参数对象 */ });
quoteMessage
示例
import { useMessageActionState } from 'tuikit-atomicx-vue3';
const { quoteMessage } = useMessageActionState();
// 调用函数
// 参数示例:
// quoteParams: 对应的参数值
await quoteMessage({ /* 参数对象 */ });
clearQuotedMessage
示例
import { useMessageActionState } from 'tuikit-atomicx-vue3';
const { clearQuotedMessage } = useMessageActionState();
// 清除引用消息
clearQuotedMessage();
copyTextMessage
示例
import { useMessageActionState } from 'tuikit-atomicx-vue3';
const { copyTextMessage } = useMessageActionState();
// 调用函数
// 参数示例:
// copyParams: 对应的参数值
await copyTextMessage({ /* 参数对象 */ });
deleteMessage
示例
import { useMessageActionState } from 'tuikit-atomicx-vue3';
const { deleteMessage } = useMessageActionState();
// 调用函数
// 参数示例:
// deleteParams: 对应的参数值
await deleteMessage({ /* 参数对象 */ });
recallMessage
示例
import { useMessageActionState } from 'tuikit-atomicx-vue3';
const { recallMessage } = useMessageActionState();
// 调用函数
// 参数示例:
// recallParams: 对应的参数值
await recallMessage({ /* 参数对象 */ });
resetMessageActionState
示例
import { useMessageActionState } from 'tuikit-atomicx-vue3';
const { resetMessageActionState } = useMessageActionState();
// 重置所有消息操作状态
resetMessageActionState();
ConversationListState
💼 会话列表管理模块
核心功能:管理用户的会话列表,支持会话排序、未读统计、会话操作等完整的会话管理功能。
技术特点:支持实时会话更新、智能排序、网络状态监控等功能。新增conversationList、activeConversation、totalUnRead、netStatus响应式数据。
业务价值:为用户提供清晰的会话管理界面,提升沟通效率。
应用场景:会话管理、联系人列表、群组管理、消息中心等场景。
响应式数据
conversationList
Ref<any>
示例
import { useConversationListState } from 'tuikit-atomicx-vue3';
const { conversationList } = useConversationListState();
// 监听数据变化
watch(conversationList, (newValue) => {
console.log('conversationList 更新:', newValue);
});
// 直接访问数据
console.log('当前 conversationList:', conversationList.value);
activeConversation
Ref<any>
示例
import { useConversationListState } from 'tuikit-atomicx-vue3';
const { activeConversation } = useConversationListState();
// 监听数据变化
watch(activeConversation, (newValue) => {
console.log('activeConversation 更新:', newValue);
});
// 直接访问数据
console.log('当前 activeConversation:', activeConversation.value);
totalUnRead
Ref<any>
示例
import { useConversationListState } from 'tuikit-atomicx-vue3';
const { totalUnRead } = useConversationListState();
// 监听数据变化
watch(totalUnRead, (newValue) => {
console.log('totalUnRead 更新:', newValue);
});
// 直接访问数据
console.log('当前 totalUnRead:', totalUnRead.value);
netStatus
Ref<any>
示例
import { useConversationListState } from 'tuikit-atomicx-vue3';
const { netStatus } = useConversationListState();
// 监听数据变化
watch(netStatus, (newValue) => {
console.log('netStatus 更新:', newValue);
});
// 直接访问数据
console.log('当前 netStatus:', netStatus.value);
接口函数
markConversationUnread
示例
import { useConversationListState } from 'tuikit-atomicx-vue3';
const { markConversationUnread } = useConversationListState();
// 调用函数
// 参数示例:
// unreadParams: 对应的参数值
await markConversationUnread({ /* 参数对象 */ });
setActiveConversation
示例
import { useConversationListState } from 'tuikit-atomicx-vue3';
const { setActiveConversation } = useConversationListState();
// 调用函数
// 参数示例:
// activeParams: 对应的参数值
await setActiveConversation({ /* 参数对象 */ });
pinConversation
示例
import { useConversationListState } from 'tuikit-atomicx-vue3';
const { pinConversation } = useConversationListState();
// 调用函数
// 参数示例:
// pinParams: 对应的参数值
await pinConversation({ /* 参数对象 */ });
deleteConversation
示例
import { useConversationListState } from 'tuikit-atomicx-vue3';
const { deleteConversation } = useConversationListState();
// 调用函数
// 参数示例:
// deleteParams: 对应的参数值
await deleteConversation({ /* 参数对象 */ });
muteConversation
示例
import { useConversationListState } from 'tuikit-atomicx-vue3';
const { muteConversation } = useConversationListState();
// 调用函数
// 参数示例:
// muteParams: 对应的参数值
await muteConversation({ /* 参数对象 */ });
setConversationDraft
示例
import { useConversationListState } from 'tuikit-atomicx-vue3';
const { setConversationDraft } = useConversationListState();
// 调用函数
// 参数示例:
// draftParams: 对应的参数值
await setConversationDraft({ /* 参数对象 */ });
createC2CConversation
示例
import { useConversationListState } from 'tuikit-atomicx-vue3';
const { createC2CConversation } = useConversationListState();
// 调用函数
// 参数示例:
// c2cParams: 对应的参数值
await createC2CConversation({ /* 参数对象 */ });
createGroupConversation
示例
import { useConversationListState } from 'tuikit-atomicx-vue3';
const { createGroupConversation } = useConversationListState();
// 调用函数
// 参数示例:
// groupParams: 对应的参数值
await createGroupConversation({ /* 参数对象 */ });
ContactListState
👥 联系人管理模块
核心功能:管理用户的联系人列表,包括好友管理、群组管理、黑名单管理等完整的联系人功能。
技术特点:支持联系人分组、好友申请处理、群组申请管理等功能。新增friendList、groupList、blackList等响应式数据和完整的联系人操作接口。
业务价值:为用户提供完整的社交关系管理能力,构建社交网络。
应用场景:好友管理、群组管理、联系人搜索、社交网络等场景。
响应式数据
friendList
Ref<any>
示例
import { useContactListState } from 'tuikit-atomicx-vue3';
const { friendList } = useContactListState();
// 监听数据变化
watch(friendList, (newValue) => {
console.log('friendList 更新:', newValue);
});
// 直接访问数据
console.log('当前 friendList:', friendList.value);
groupList
Ref<any>
示例
import { useContactListState } from 'tuikit-atomicx-vue3';
const { groupList } = useContactListState();
// 监听数据变化
watch(groupList, (newValue) => {
console.log('groupList 更新:', newValue);
});
// 直接访问数据
console.log('当前 groupList:', groupList.value);
blackList
Ref<any>
示例
import { useContactListState } from 'tuikit-atomicx-vue3';
const { blackList } = useContactListState();
// 监听数据变化
watch(blackList, (newValue) => {
console.log('blackList 更新:', newValue);
});
// 直接访问数据
console.log('当前 blackList:', blackList.value);
friendApplicationUnreadCount
Ref<any>
示例
import { useContactListState } from 'tuikit-atomicx-vue3';
const { friendApplicationUnreadCount } = useContactListState();
// 监听数据变化
watch(friendApplicationUnreadCount, (newValue) => {
console.log('friendApplicationUnreadCount 更新:', newValue);
});
// 直接访问数据
console.log('当前 friendApplicationUnreadCount:', friendApplicationUnreadCount.value);
friendGroupList
Ref<any>
示例
import { useContactListState } from 'tuikit-atomicx-vue3';
const { friendGroupList } = useContactListState();
// 监听数据变化
watch(friendGroupList, (newValue) => {
console.log('friendGroupList 更新:', newValue);
});
// 直接访问数据
console.log('当前 friendGroupList:', friendGroupList.value);
friendApplicationList
Ref<any>
示例
import { useContactListState } from 'tuikit-atomicx-vue3';
const { friendApplicationList } = useContactListState();
// 监听数据变化
watch(friendApplicationList, (newValue) => {
console.log('friendApplicationList 更新:', newValue);
});
// 直接访问数据
console.log('当前 friendApplicationList:', friendApplicationList.value);
groupApplicationList
Ref<any>
示例
import { useContactListState } from 'tuikit-atomicx-vue3';
const { groupApplicationList } = useContactListState();
// 监听数据变化
watch(groupApplicationList, (newValue) => {
console.log('groupApplicationList 更新:', newValue);
});
// 直接访问数据
console.log('当前 groupApplicationList:', groupApplicationList.value);
接口函数
setGroupApplicationList
示例
import { useContactListState } from 'tuikit-atomicx-vue3';
const { setGroupApplicationList } = useContactListState();
// 调用函数
// 参数示例:
// listParams: 对应的参数值
await setGroupApplicationList({ /* 参数对象 */ });
setFriendList
示例
import { useContactListState } from 'tuikit-atomicx-vue3';
const { setFriendList } = useContactListState();
// 调用函数
// 参数示例:
// listParams: 对应的参数值
await setFriendList({ /* 参数对象 */ });
setGroupList
示例
import { useContactListState } from 'tuikit-atomicx-vue3';
const { setGroupList } = useContactListState();
// 调用函数
// 参数示例:
// listParams: 对应的参数值
await setGroupList({ /* 参数对象 */ });
setBlackList
示例
import { useContactListState } from 'tuikit-atomicx-vue3';
const { setBlackList } = useContactListState();
// 调用函数
// 参数示例:
// listParams: 对应的参数值
await setBlackList({ /* 参数对象 */ });
setFriendApplicationUnreadCount
示例
import { useContactListState } from 'tuikit-atomicx-vue3';
const { setFriendApplicationUnreadCount } = useContactListState();
// 调用函数
// 参数示例:
// countParams: 对应的参数值
await setFriendApplicationUnreadCount({ /* 参数对象 */ });
setFriendGroupList
示例
import { useContactListState } from 'tuikit-atomicx-vue3';
const { setFriendGroupList } = useContactListState();
// 调用函数
// 参数示例:
// listParams: 对应的参数值
await setFriendGroupList({ /* 参数对象 */ });
setFriendApplicationList
示例
import { useContactListState } from 'tuikit-atomicx-vue3';
const { setFriendApplicationList } = useContactListState();
// 调用函数
// 参数示例:
// listParams: 对应的参数值
await setFriendApplicationList({ /* 参数对象 */ });
initContactListWatcher
示例
import { useContactListState } from 'tuikit-atomicx-vue3';
const { initContactListWatcher } = useContactListState();
// 调用函数
// 参数示例:
// watcherParams?: 对应的参数值
await initContactListWatcher({ /* 参数对象 */ });
addFriend
示例
import { useContactListState } from 'tuikit-atomicx-vue3';
const { addFriend } = useContactListState();
// 调用函数
// 参数示例:
// friendParams: 对应的参数值
await addFriend({ /* 参数对象 */ });
markFriendApplicationAsRead
示例
import { useContactListState } from 'tuikit-atomicx-vue3';
const { markFriendApplicationAsRead } = useContactListState();
// 调用函数
// 参数示例:
// readParams: 对应的参数值
await markFriendApplicationAsRead({ /* 参数对象 */ });
acceptFriendApplication
示例
import { useContactListState } from 'tuikit-atomicx-vue3';
const { acceptFriendApplication } = useContactListState();
// 调用函数
// 参数示例:
// acceptParams: 对应的参数值
await acceptFriendApplication({ /* 参数对象 */ });
refuseFriendApplication
示例
import { useContactListState } from 'tuikit-atomicx-vue3';
const { refuseFriendApplication } = useContactListState();
// 调用函数
// 参数示例:
// refuseParams: 对应的参数值
await refuseFriendApplication({ /* 参数对象 */ });
addToBlacklist
示例
import { useContactListState } from 'tuikit-atomicx-vue3';
const { addToBlacklist } = useContactListState();
// 调用函数
// 参数示例:
// blacklistParams: 对应的参数值
await addToBlacklist({ /* 参数对象 */ });
removeFromBlacklist
示例
import { useContactListState } from 'tuikit-atomicx-vue3';
const { removeFromBlacklist } = useContactListState();
// 调用函数
// 参数示例:
// removeParams: 对应的参数值
await removeFromBlacklist({ /* 参数对象 */ });
deleteFriend
示例
import { useContactListState } from 'tuikit-atomicx-vue3';
const { deleteFriend } = useContactListState();
// 调用函数
// 参数示例:
// deleteParams: 对应的参数值
await deleteFriend({ /* 参数对象 */ });
setFriendRemark
示例
import { useContactListState } from 'tuikit-atomicx-vue3';
const { setFriendRemark } = useContactListState();
// 调用函数
// 参数示例:
// remarkParams: 对应的参数值
await setFriendRemark({ /* 参数对象 */ });
createFriendGroup
示例
import { useContactListState } from 'tuikit-atomicx-vue3';
const { createFriendGroup } = useContactListState();
// 调用函数
// 参数示例:
// groupParams: 对应的参数值
await createFriendGroup({ /* 参数对象 */ });
deleteFriendGroup
示例
import { useContactListState } from 'tuikit-atomicx-vue3';
const { deleteFriendGroup } = useContactListState();
// 调用函数
// 参数示例:
// deleteParams: 对应的参数值
await deleteFriendGroup({ /* 参数对象 */ });
addToFriendGroup
示例
import { useContactListState } from 'tuikit-atomicx-vue3';
const { addToFriendGroup } = useContactListState();
// 调用函数
// 参数示例:
// addParams: 对应的参数值
await addToFriendGroup({ /* 参数对象 */ });
removeFromFriendGroup
示例
import { useContactListState } from 'tuikit-atomicx-vue3';
const { removeFromFriendGroup } = useContactListState();
// 调用函数
// 参数示例:
// removeParams: 对应的参数值
await removeFromFriendGroup({ /* 参数对象 */ });
renameFriendGroup
示例
import { useContactListState } from 'tuikit-atomicx-vue3';
const { renameFriendGroup } = useContactListState();
// 调用函数
// 参数示例:
// renameParams: 对应的参数值
await renameFriendGroup({ /* 参数对象 */ });
joinGroup
示例
import { useContactListState } from 'tuikit-atomicx-vue3';
const { joinGroup } = useContactListState();
// 调用函数
// 参数示例:
// joinParams: 对应的参数值
await joinGroup({ /* 参数对象 */ });
acceptGroupApplication
示例
import { useContactListState } from 'tuikit-atomicx-vue3';
const { acceptGroupApplication } = useContactListState();
// 调用函数
// 参数示例:
// acceptParams: 对应的参数值
await acceptGroupApplication({ /* 参数对象 */ });
refuseGroupApplication
示例
import { useContactListState } from 'tuikit-atomicx-vue3';
const { refuseGroupApplication } = useContactListState();
// 调用函数
// 参数示例:
// refuseParams: 对应的参数值
await refuseGroupApplication({ /* 参数对象 */ });
C2CSettingState
👤 单聊设置管理模块
核心功能:管理单聊会话的各种设置,包括用户信息、聊天设置、权限控制等功能。
技术特点:支持实时设置同步、权限管理、个性化配置等功能。更新响应式数据为userID、avatar、signature等标准化字段。
业务价值:为用户提供个性化的单聊体验,提升沟通质量。
应用场景:单聊设置、用户信息管理、聊天权限控制等场景。
响应式数据
currentConversationRef
Ref<IConversationModel | undefined>
示例
import { useC2CSettingState } from 'tuikit-atomicx-vue3';
const { currentConversationRef } = useC2CSettingState();
// 监听数据变化
watch(currentConversationRef, (newValue) => {
console.log('currentConversationRef 更新:', newValue);
});
// 直接访问数据
console.log('当前 currentConversationRef:', currentConversationRef.value);
userIDRef
Ref<string | undefined>
示例
import { useC2CSettingState } from 'tuikit-atomicx-vue3';
const { userIDRef } = useC2CSettingState();
// 监听数据变化
watch(userIDRef, (newValue) => {
console.log('userIDRef 更新:', newValue);
});
// 直接访问数据
console.log('当前 userIDRef:', userIDRef.value);
nickRef
Ref<string | undefined>
示例
import { useC2CSettingState } from 'tuikit-atomicx-vue3';
const { nickRef } = useC2CSettingState();
// 监听数据变化
watch(nickRef, (newValue) => {
console.log('nickRef 更新:', newValue);
});
// 直接访问数据
console.log('当前 nickRef:', nickRef.value);
avatarRef
Ref<string | undefined>
示例
import { useC2CSettingState } from 'tuikit-atomicx-vue3';
const { avatarRef } = useC2CSettingState();
// 监听数据变化
watch(avatarRef, (newValue) => {
console.log('avatarRef 更新:', newValue);
});
// 直接访问数据
console.log('当前 avatarRef:', avatarRef.value);
signatureRef
Ref<string | undefined>
示例
import { useC2CSettingState } from 'tuikit-atomicx-vue3';
const { signatureRef } = useC2CSettingState();
// 监听数据变化
watch(signatureRef, (newValue) => {
console.log('signatureRef 更新:', newValue);
});
// 直接访问数据
console.log('当前 signatureRef:', signatureRef.value);
remarkRef
Ref<string | undefined>
示例
import { useC2CSettingState } from 'tuikit-atomicx-vue3';
const { remarkRef } = useC2CSettingState();
// 监听数据变化
watch(remarkRef, (newValue) => {
console.log('remarkRef 更新:', newValue);
});
// 直接访问数据
console.log('当前 remarkRef:', remarkRef.value);
isMutedRef
Ref<boolean | undefined>
示例
import { useC2CSettingState } from 'tuikit-atomicx-vue3';
const { isMutedRef } = useC2CSettingState();
// 监听数据变化
watch(isMutedRef, (newValue) => {
console.log('isMutedRef 更新:', newValue);
});
// 直接访问数据
console.log('当前 isMutedRef:', isMutedRef.value);
isPinnedRef
Ref<boolean | undefined>
示例
import { useC2CSettingState } from 'tuikit-atomicx-vue3';
const { isPinnedRef } = useC2CSettingState();
// 监听数据变化
watch(isPinnedRef, (newValue) => {
console.log('isPinnedRef 更新:', newValue);
});
// 直接访问数据
console.log('当前 isPinnedRef:', isPinnedRef.value);
isContactRef
Ref<boolean | undefined>
示例
import { useC2CSettingState } from 'tuikit-atomicx-vue3';
const { isContactRef } = useC2CSettingState();
// 监听数据变化
watch(isContactRef, (newValue) => {
console.log('isContactRef 更新:', newValue);
});
// 直接访问数据
console.log('当前 isContactRef:', isContactRef.value);
userID
Ref<any>
示例
import { useC2CSettingState } from 'tuikit-atomicx-vue3';
const { userID } = useC2CSettingState();
// 监听数据变化
watch(userID, (newValue) => {
console.log('userID 更新:', newValue);
});
// 直接访问数据
console.log('当前 userID:', userID.value);
avatar
Ref<any>
示例
import { useC2CSettingState } from 'tuikit-atomicx-vue3';
const { avatar } = useC2CSettingState();
// 监听数据变化
watch(avatar, (newValue) => {
console.log('avatar 更新:', newValue);
});
// 直接访问数据
console.log('当前 avatar:', avatar.value);
signature
Ref<any>
示例
import { useC2CSettingState } from 'tuikit-atomicx-vue3';
const { signature } = useC2CSettingState();
// 监听数据变化
watch(signature, (newValue) => {
console.log('signature 更新:', newValue);
});
// 直接访问数据
console.log('当前 signature:', signature.value);
remark
Ref<any>
示例
import { useC2CSettingState } from 'tuikit-atomicx-vue3';
const { remark } = useC2CSettingState();
// 监听数据变化
watch(remark, (newValue) => {
console.log('remark 更新:', newValue);
});
// 直接访问数据
console.log('当前 remark:', remark.value);
isMuted
Ref<any>
示例
import { useC2CSettingState } from 'tuikit-atomicx-vue3';
const { isMuted } = useC2CSettingState();
// 监听数据变化
watch(isMuted, (newValue) => {
console.log('isMuted 更新:', newValue);
});
// 直接访问数据
console.log('当前 isMuted:', isMuted.value);
isPinned
Ref<any>
示例
import { useC2CSettingState } from 'tuikit-atomicx-vue3';
const { isPinned } = useC2CSettingState();
// 监听数据变化
watch(isPinned, (newValue) => {
console.log('isPinned 更新:', newValue);
});
// 直接访问数据
console.log('当前 isPinned:', isPinned.value);
isContact
Ref<any>
示例
import { useC2CSettingState } from 'tuikit-atomicx-vue3';
const { isContact } = useC2CSettingState();
// 监听数据变化
watch(isContact, (newValue) => {
console.log('isContact 更新:', newValue);
});
// 直接访问数据
console.log('当前 isContact:', isContact.value);
接口函数
setChatPinned
示例
import { useC2CSettingState } from 'tuikit-atomicx-vue3';
const { setChatPinned } = useC2CSettingState();
// 调用函数
// 参数示例:
// pinParams: 对应的参数值
await setChatPinned({ /* 参数对象 */ });
setChatMuted
示例
import { useC2CSettingState } from 'tuikit-atomicx-vue3';
const { setChatMuted } = useC2CSettingState();
// 调用函数
// 参数示例:
// muteParams: 对应的参数值
await setChatMuted({ /* 参数对象 */ });
setUserRemark
示例
import { useC2CSettingState } from 'tuikit-atomicx-vue3';
const { setUserRemark } = useC2CSettingState();
// 调用函数
// 参数示例:
// remarkParams: 对应的参数值
await setUserRemark({ /* 参数对象 */ });
GroupSettingState
👥 群聊设置管理模块
核心功能:管理群聊的各种设置和操作,包括群信息管理、成员管理、权限控制等完整的群管理功能。
技术特点:支持群权限管理、成员操作、群设置同步等功能。新增groupID、groupType、groupName等完整的群信息响应式数据和管理接口。
业务价值:为群主和管理员提供完整的群管理能力,维护群秩序。
应用场景:群管理、成员管理、权限控制、群设置等场景。
响应式数据
groupID
Ref<any>
示例
import { useGroupSettingState } from 'tuikit-atomicx-vue3';
const { groupID } = useGroupSettingState();
// 监听数据变化
watch(groupID, (newValue) => {
console.log('groupID 更新:', newValue);
});
// 直接访问数据
console.log('当前 groupID:', groupID.value);
groupType
Ref<any>
示例
import { useGroupSettingState } from 'tuikit-atomicx-vue3';
const { groupType } = useGroupSettingState();
// 监听数据变化
watch(groupType, (newValue) => {
console.log('groupType 更新:', newValue);
});
// 直接访问数据
console.log('当前 groupType:', groupType.value);
groupName
Ref<any>
示例
import { useGroupSettingState } from 'tuikit-atomicx-vue3';
const { groupName } = useGroupSettingState();
// 监听数据变化
watch(groupName, (newValue) => {
console.log('groupName 更新:', newValue);
});
// 直接访问数据
console.log('当前 groupName:', groupName.value);
avatar
Ref<any>
示例
import { useGroupSettingState } from 'tuikit-atomicx-vue3';
const { avatar } = useGroupSettingState();
// 监听数据变化
watch(avatar, (newValue) => {
console.log('avatar 更新:', newValue);
});
// 直接访问数据
console.log('当前 avatar:', avatar.value);
introduction
Ref<any>
示例
import { useGroupSettingState } from 'tuikit-atomicx-vue3';
const { introduction } = useGroupSettingState();
// 监听数据变化
watch(introduction, (newValue) => {
console.log('introduction 更新:', newValue);
});
// 直接访问数据
console.log('当前 introduction:', introduction.value);
notification
Ref<any>
示例
import { useGroupSettingState } from 'tuikit-atomicx-vue3';
const { notification } = useGroupSettingState();
// 监听数据变化
watch(notification, (newValue) => {
console.log('notification 更新:', newValue);
});
// 直接访问数据
console.log('当前 notification:', notification.value);
isMuted
Ref<any>
示例
import { useGroupSettingState } from 'tuikit-atomicx-vue3';
const { isMuted } = useGroupSettingState();
// 监听数据变化
watch(isMuted, (newValue) => {
console.log('isMuted 更新:', newValue);
});
// 直接访问数据
console.log('当前 isMuted:', isMuted.value);
isPinned
Ref<any>
示例
import { useGroupSettingState } from 'tuikit-atomicx-vue3';
const { isPinned } = useGroupSettingState();
// 监听数据变化
watch(isPinned, (newValue) => {
console.log('isPinned 更新:', newValue);
});
// 直接访问数据
console.log('当前 isPinned:', isPinned.value);
groupOwner
Ref<any>
示例
import { useGroupSettingState } from 'tuikit-atomicx-vue3';
const { groupOwner } = useGroupSettingState();
// 监听数据变化
watch(groupOwner, (newValue) => {
console.log('groupOwner 更新:', newValue);
});
// 直接访问数据
console.log('当前 groupOwner:', groupOwner.value);
adminMembers
Ref<any>
示例
import { useGroupSettingState } from 'tuikit-atomicx-vue3';
const { adminMembers } = useGroupSettingState();
// 监听数据变化
watch(adminMembers, (newValue) => {
console.log('adminMembers 更新:', newValue);
});
// 直接访问数据
console.log('当前 adminMembers:', adminMembers.value);
allMembers
Ref<any>
示例
import { useGroupSettingState } from 'tuikit-atomicx-vue3';
const { allMembers } = useGroupSettingState();
// 监听数据变化
watch(allMembers, (newValue) => {
console.log('allMembers 更新:', newValue);
});
// 直接访问数据
console.log('当前 allMembers:', allMembers.value);
memberCount
Ref<any>
示例
import { useGroupSettingState } from 'tuikit-atomicx-vue3';
const { memberCount } = useGroupSettingState();
// 监听数据变化
watch(memberCount, (newValue) => {
console.log('memberCount 更新:', newValue);
});
// 直接访问数据
console.log('当前 memberCount:', memberCount.value);
maxMemberCount
Ref<any>
示例
import { useGroupSettingState } from 'tuikit-atomicx-vue3';
const { maxMemberCount } = useGroupSettingState();
// 监听数据变化
watch(maxMemberCount, (newValue) => {
console.log('maxMemberCount 更新:', newValue);
});
// 直接访问数据
console.log('当前 maxMemberCount:', maxMemberCount.value);
currentUserID
Ref<any>
示例
import { useGroupSettingState } from 'tuikit-atomicx-vue3';
const { currentUserID } = useGroupSettingState();
// 监听数据变化
watch(currentUserID, (newValue) => {
console.log('currentUserID 更新:', newValue);
});
// 直接访问数据
console.log('当前 currentUserID:', currentUserID.value);
currentUserRole
Ref<any>
示例
import { useGroupSettingState } from 'tuikit-atomicx-vue3';
const { currentUserRole } = useGroupSettingState();
// 监听数据变化
watch(currentUserRole, (newValue) => {
console.log('currentUserRole 更新:', newValue);
});
// 直接访问数据
console.log('当前 currentUserRole:', currentUserRole.value);
nameCard
Ref<any>
示例
import { useGroupSettingState } from 'tuikit-atomicx-vue3';
const { nameCard } = useGroupSettingState();
// 监听数据变化
watch(nameCard, (newValue) => {
console.log('nameCard 更新:', newValue);
});
// 直接访问数据
console.log('当前 nameCard:', nameCard.value);
isMuteAllMembers
Ref<any>
示例
import { useGroupSettingState } from 'tuikit-atomicx-vue3';
const { isMuteAllMembers } = useGroupSettingState();
// 监听数据变化
watch(isMuteAllMembers, (newValue) => {
console.log('isMuteAllMembers 更新:', newValue);
});
// 直接访问数据
console.log('当前 isMuteAllMembers:', isMuteAllMembers.value);
isInGroup
Ref<any>
示例
import { useGroupSettingState } from 'tuikit-atomicx-vue3';
const { isInGroup } = useGroupSettingState();
// 监听数据变化
watch(isInGroup, (newValue) => {
console.log('isInGroup 更新:', newValue);
});
// 直接访问数据
console.log('当前 isInGroup:', isInGroup.value);
inviteOption
Ref<any>
示例
import { useGroupSettingState } from 'tuikit-atomicx-vue3';
const { inviteOption } = useGroupSettingState();
// 监听数据变化
watch(inviteOption, (newValue) => {
console.log('inviteOption 更新:', newValue);
});
// 直接访问数据
console.log('当前 inviteOption:', inviteOption.value);
接口函数
getGroupMemberList
示例
import { useGroupSettingState } from 'tuikit-atomicx-vue3';
const { getGroupMemberList } = useGroupSettingState();
// 调用函数
// 参数示例:
// memberParams: 对应的参数值
await getGroupMemberList({ /* 参数对象 */ });
updateGroupProfile
示例
import { useGroupSettingState } from 'tuikit-atomicx-vue3';
const { updateGroupProfile } = useGroupSettingState();
// 调用函数
// 参数示例:
// profileParams: 对应的参数值
await updateGroupProfile({ /* 参数对象 */ });
addGroupMember
示例
import { useGroupSettingState } from 'tuikit-atomicx-vue3';
const { addGroupMember } = useGroupSettingState();
// 调用函数
// 参数示例:
// addParams: 对应的参数值
await addGroupMember({ /* 参数对象 */ });
deleteGroupMember
示例
import { useGroupSettingState } from 'tuikit-atomicx-vue3';
const { deleteGroupMember } = useGroupSettingState();
// 调用函数
// 参数示例:
// deleteParams: 对应的参数值
await deleteGroupMember({ /* 参数对象 */ });
changeGroupOwner
示例
import { useGroupSettingState } from 'tuikit-atomicx-vue3';
const { changeGroupOwner } = useGroupSettingState();
// 调用函数
// 参数示例:
// ownerParams: 对应的参数值
await changeGroupOwner({ /* 参数对象 */ });
setGroupMemberRole
示例
import { useGroupSettingState } from 'tuikit-atomicx-vue3';
const { setGroupMemberRole } = useGroupSettingState();
// 调用函数
// 参数示例:
// roleParams: 对应的参数值
await setGroupMemberRole({ /* 参数对象 */ });
setGroupMemberNameCard
示例
import { useGroupSettingState } from 'tuikit-atomicx-vue3';
const { setGroupMemberNameCard } = useGroupSettingState();
// 调用函数
// 参数示例:
// nameCardParams: 对应的参数值
await setGroupMemberNameCard({ /* 参数对象 */ });
setChatPinned
示例
import { useGroupSettingState } from 'tuikit-atomicx-vue3';
const { setChatPinned } = useGroupSettingState();
// 调用函数
// 参数示例:
// pinParams: 对应的参数值
await setChatPinned({ /* 参数对象 */ });
setChatMuted
示例
import { useGroupSettingState } from 'tuikit-atomicx-vue3';
const { setChatMuted } = useGroupSettingState();
// 调用函数
// 参数示例:
// muteParams: 对应的参数值
await setChatMuted({ /* 参数对象 */ });
setGroupMemberMuteTime
示例
import { useGroupSettingState } from 'tuikit-atomicx-vue3';
const { setGroupMemberMuteTime } = useGroupSettingState();
// 调用函数
// 参数示例:
// muteParams: 对应的参数值
await setGroupMemberMuteTime({ /* 参数对象 */ });
setMuteAllMember
示例
import { useGroupSettingState } from 'tuikit-atomicx-vue3';
const { setMuteAllMember } = useGroupSettingState();
// 调用函数
// 参数示例:
// muteAllParams: 对应的参数值
await setMuteAllMember({ /* 参数对象 */ });
dismissGroup
示例
import { useGroupSettingState } from 'tuikit-atomicx-vue3';
const { dismissGroup } = useGroupSettingState();
// 调用函数
// 参数示例:
// dismissParams: 对应的参数值
await dismissGroup({ /* 参数对象 */ });
quitGroup
示例
import { useGroupSettingState } from 'tuikit-atomicx-vue3';
const { quitGroup } = useGroupSettingState();
// 调用函数
// 参数示例:
// quitParams: 对应的参数值
await quitGroup({ /* 参数对象 */ });
hasPermission
示例
import { useGroupSettingState } from 'tuikit-atomicx-vue3';
const { hasPermission } = useGroupSettingState();
// 调用函数
// 参数示例:
// permissionParams: 对应的参数值
await hasPermission({ /* 参数对象 */ });
canOperateOnMember
示例
import { useGroupSettingState } from 'tuikit-atomicx-vue3';
const { canOperateOnMember } = useGroupSettingState();
// 调用函数
// 参数示例:
// operationParams: 对应的参数值
await canOperateOnMember({ /* 参数对象 */ });
getAvailablePermissions
示例
import { useGroupSettingState } from 'tuikit-atomicx-vue3';
const { getAvailablePermissions } = useGroupSettingState();
// 调用函数
// 参数示例:
// queryParams?: 对应的参数值
await getAvailablePermissions({ /* 参数对象 */ });
initWatcher
示例
import { useGroupSettingState } from 'tuikit-atomicx-vue3';
const { initWatcher } = useGroupSettingState();
// 调用函数
// 参数示例:
// watcherParams?: 对应的参数值
await initWatcher({ /* 参数对象 */ });
VideoMixerState
🎬 视频混流管理模块
核心功能:管理视频混流功能,支持多路视频合成、布局管理、媒体源控制等高级视频处理功能。
技术特点:支持实时视频混流、动态布局调整、媒体源管理等功能。新增isVideoMixerEnabled、mediaSourceList、activeMediaSource响应式数据和完整的混流控制接口。
业务价值:为直播平台提供专业的视频制作能力,提升直播质量。
应用场景:多人直播、画中画、视频合成、专业制作等场景。
响应式数据
publishVideoQuality
Ref<any>
示例
const size = getSizeByResolution(TRTCVideoResolution.TRTCVideoResolution_1280_720);
console.log(size.width, size.height); // 输出: 1280, 720
isVideoMixerEnabled
Ref<any>
示例
import { useVideoMixerState } from 'tuikit-atomicx-vue3';
const { isVideoMixerEnabled } = useVideoMixerState();
// 监听数据变化
watch(isVideoMixerEnabled, (newValue) => {
console.log('isVideoMixerEnabled 更新:', newValue);
});
// 直接访问数据
console.log('当前 isVideoMixerEnabled:', isVideoMixerEnabled.value);
mediaSourceList
Ref<any>
示例
import { useVideoMixerState } from 'tuikit-atomicx-vue3';
const { mediaSourceList } = useVideoMixerState();
// 监听数据变化
watch(mediaSourceList, (newValue) => {
console.log('mediaSourceList 更新:', newValue);
});
// 直接访问数据
console.log('当前 mediaSourceList:', mediaSourceList.value);
activeMediaSource
Ref<any>
示例
import { useVideoMixerState } from 'tuikit-atomicx-vue3';
const { activeMediaSource } = useVideoMixerState();
// 监听数据变化
watch(activeMediaSource, (newValue) => {
console.log('activeMediaSource 更新:', newValue);
});
// 直接访问数据
console.log('当前 activeMediaSource:', activeMediaSource.value);
接口函数
getVideoDataByQuality
示例
import { useVideoMixerState } from 'tuikit-atomicx-vue3';
const { getVideoDataByQuality } = useVideoMixerState();
// 调用函数
// 参数示例:
// qualityParams: 对应的参数值
await getVideoDataByQuality({ /* 参数对象 */ });
getSizeByQuality
示例
import { useVideoMixerState } from 'tuikit-atomicx-vue3';
const { getSizeByQuality } = useVideoMixerState();
// 调用函数
// 参数示例:
// qualityParams: 对应的参数值
await getSizeByQuality({ /* 参数对象 */ });
getSizeByResolution
示例
import { useVideoMixerState } from 'tuikit-atomicx-vue3';
const { getSizeByResolution } = useVideoMixerState();
// 调用函数
// 参数示例:
// resolutionParams: 对应的参数值
await getSizeByResolution({ /* 参数对象 */ });
transformTUIVideoQualityToTRTCVideoResolution
示例
import { useVideoMixerState } from 'tuikit-atomicx-vue3';
const { transformTUIVideoQualityToTRTCVideoResolution } = useVideoMixerState();
// 调用函数
// 参数示例:
// qualityParams: 对应的参数值
await transformTUIVideoQualityToTRTCVideoResolution({ /* 参数对象 */ });
transformTRTCVideoResolutionToTUIVideoQuality
示例
import { useVideoMixerState } from 'tuikit-atomicx-vue3';
const { transformTRTCVideoResolutionToTUIVideoQuality } = useVideoMixerState();
// 调用函数
// 参数示例:
// resolutionParams: 对应的参数值
await transformTRTCVideoResolutionToTUIVideoQuality({ /* 参数对象 */ });
transformTRTCVideoResModeToTUIVideoResMode
示例
import { useVideoMixerState } from 'tuikit-atomicx-vue3';
const { transformTRTCVideoResModeToTUIVideoResMode } = useVideoMixerState();
// 调用函数
// 参数示例:
// modeParams: 对应的参数值
await transformTRTCVideoResModeToTUIVideoResMode({ /* 参数对象 */ });
changeActiveMediaSource
示例
import { useVideoMixerState } from 'tuikit-atomicx-vue3';
const { changeActiveMediaSource } = useVideoMixerState();
// 调用函数
// 参数示例:
// sourceParams: 对应的参数值
await changeActiveMediaSource({ /* 参数对象 */ });
updateVideoQuality
示例
import { useVideoMixerState } from 'tuikit-atomicx-vue3';
const { updateVideoQuality } = useVideoMixerState();
// 调用函数
// 参数示例:
// qualityParams: 对应的参数值
await updateVideoQuality({ /* 参数对象 */ });
getDefaultLayoutByMediaSource
示例
import { useVideoMixerState } from 'tuikit-atomicx-vue3';
const { getDefaultLayoutByMediaSource } = useVideoMixerState();
// 调用函数
// 参数示例:
// sourceParams: 对应的参数值
await getDefaultLayoutByMediaSource({ /* 参数对象 */ });
addMediaSource
示例
import { useVideoMixerState } from 'tuikit-atomicx-vue3';
const { addMediaSource } = useVideoMixerState();
// 调用函数
// 参数示例:
// sourceParams: 对应的参数值
await addMediaSource({ /* 参数对象 */ });
updateMediaSource
示例
import { useVideoMixerState } from 'tuikit-atomicx-vue3';
const { updateMediaSource } = useVideoMixerState();
// 调用函数
// 参数示例:
// updateParams: 对应的参数值
await updateMediaSource({ /* 参数对象 */ });
removeMediaSource
示例
import { useVideoMixerState } from 'tuikit-atomicx-vue3';
const { removeMediaSource } = useVideoMixerState();
// 调用函数
// 参数示例:
// removeParams: 对应的参数值
await removeMediaSource({ /* 参数对象 */ });
enableLocalVideoMixer
示例
import { useVideoMixerState } from 'tuikit-atomicx-vue3';
const { enableLocalVideoMixer } = useVideoMixerState();
// 调用函数
// 参数示例:
// enableParams: 对应的参数值
await enableLocalVideoMixer({ /* 参数对象 */ });
clearMediaSource
示例
// 清空所有媒体源
clearMediaSource();
initMediaSourceManager
示例
import { useVideoMixerState } from 'tuikit-atomicx-vue3';
const { initMediaSourceManager } = useVideoMixerState();
// 调用函数
// 参数示例:
// initParams?: 对应的参数值
await initMediaSourceManager({ /* 参数对象 */ });
initVideoMixerState
示例
import { useVideoMixerState } from 'tuikit-atomicx-vue3';
const { initVideoMixerState } = useVideoMixerState();
// 调用函数
// 参数示例:
// initParams?: 对应的参数值
await initVideoMixerState({ /* 参数对象 */ });
VirtualBackgroundState
🖼️ 虚拟背景管理模块
核心功能:管理虚拟背景功能,支持背景替换、背景模糊、自定义背景等视频美化功能。
技术特点:基于AI技术实现实时背景分割和替换。新增virtualBackgroundConfig响应式数据和isSupported、setVirtualBackground接口函数。
业务价值:为用户提供隐私保护和视频美化功能,提升视频通话体验。
应用场景:视频通话、在线会议、直播美化、隐私保护等场景。
响应式数据
virtualBackgroundConfig
Ref<any>
示例
import { useVirtualBackgroundState } from 'tuikit-atomicx-vue3';
const { virtualBackgroundConfig } = useVirtualBackgroundState();
// 监听数据变化
watch(virtualBackgroundConfig, (newValue) => {
console.log('virtualBackgroundConfig 更新:', newValue);
});
// 直接访问数据
console.log('当前 virtualBackgroundConfig:', virtualBackgroundConfig.value);
接口函数
initVirtualBackground
示例
import { useVirtualBackgroundState } from 'tuikit-atomicx-vue3';
const { initVirtualBackground } = useVirtualBackgroundState();
// 调用函数
// 参数示例:
// initParams: 对应的参数值
await initVirtualBackground({ /* 参数对象 */ });
saveVirtualBackground
示例
import { useVirtualBackgroundState } from 'tuikit-atomicx-vue3';
const { saveVirtualBackground } = useVirtualBackgroundState();
// 调用函数
// 参数示例:
// saveParams: 对应的参数值
await saveVirtualBackground({ /* 参数对象 */ });
isSupported
示例
import { useVirtualBackgroundState } from 'tuikit-atomicx-vue3';
const { isSupported } = useVirtualBackgroundState();
// 调用函数
// 参数示例:
// checkParams?: 对应的参数值
await isSupported({ /* 参数对象 */ });
setVirtualBackground
示例
import { useVirtualBackgroundState } from 'tuikit-atomicx-vue3';
const { setVirtualBackground } = useVirtualBackgroundState();
// 调用函数
// 参数示例:
// bgParams: 对应的参数值
await setVirtualBackground({ /* 参数对象 */ });
ASRState
🎙️ 语音识别管理模块
核心功能:管理语音识别功能,支持实时语音转文字、转录历史管理、转录导出等功能。
技术特点:基于先进的ASR技术,支持多语言识别、实时转录、历史记录等功能。新增recentTranscripts、transcriptHistory响应式数据和exportTranscripts接口。
业务价值:为用户提供语音转文字服务,提升沟通效率和可访问性。
应用场景:会议记录、语音转录、无障碍通信、内容记录等场景。
响应式数据
recentTranscripts
Ref<any>
示例
import { useASRState } from 'tuikit-atomicx-vue3';
const { recentTranscripts } = useASRState();
// 监听数据变化
watch(recentTranscripts, (newValue) => {
console.log('recentTranscripts 更新:', newValue);
});
// 直接访问数据
console.log('当前 recentTranscripts:', recentTranscripts.value);
transcriptHistory
Ref<any>
示例
import { useASRState } from 'tuikit-atomicx-vue3';
const { transcriptHistory } = useASRState();
// 监听数据变化
watch(transcriptHistory, (newValue) => {
console.log('transcriptHistory 更新:', newValue);
});
// 直接访问数据
console.log('当前 transcriptHistory:', transcriptHistory.value);
接口函数
setRecentTranscriptsDuration
示例
import { useASRState } from 'tuikit-atomicx-vue3';
const { setRecentTranscriptsDuration } = useASRState();
// 调用函数
// 参数示例:
// durationParams: 对应的参数值
await setRecentTranscriptsDuration({ /* 参数对象 */ });
clearHistory
示例
import { useASRState } from 'tuikit-atomicx-vue3';
const { clearHistory, transcriptHistory } = useASRState();
// 清空所有转录记录
clearHistory();
console.log('转录记录已清空:', transcriptHistory.value.length === 0);
exportTranscripts
示例
import { useASRState } from 'tuikit-atomicx-vue3';
const { exportTranscripts } = useASRState();
// 调用函数
// 参数示例:
// exportParams: 对应的参数值
await exportTranscripts({ /* 参数对象 */ });
SearchState
🔍 搜索功能管理模块
核心功能:管理全局搜索功能,支持消息搜索、用户搜索、群组搜索等多维度搜索能力。
技术特点:支持高级搜索、搜索历史、搜索建议等功能。重构响应式数据为keyword、results、isLoading等标准化字段,提供完整的搜索接口。
业务价值:为用户提供快速查找信息的能力,提升使用效率。
应用场景:消息搜索、联系人搜索、内容查找、历史记录等场景。
响应式数据
keyword
Ref<any>
示例
import { useSearchState } from 'tuikit-atomicx-vue3';
const { keyword } = useSearchState();
// 监听数据变化
watch(keyword, (newValue) => {
console.log('keyword 更新:', newValue);
});
// 直接访问数据
console.log('当前 keyword:', keyword.value);
results
Ref<any>
示例
import { useSearchState } from 'tuikit-atomicx-vue3';
const { results } = useSearchState();
// 监听数据变化
watch(results, (newValue) => {
console.log('results 更新:', newValue);
});
// 直接访问数据
console.log('当前 results:', results.value);
isLoading
Ref<any>
示例
import { useSearchState } from 'tuikit-atomicx-vue3';
const { isLoading } = useSearchState();
// 监听数据变化
watch(isLoading, (newValue) => {
console.log('isLoading 更新:', newValue);
});
// 直接访问数据
console.log('当前 isLoading:', isLoading.value);
error
Ref<any>
示例
import { useSearchState } from 'tuikit-atomicx-vue3';
const { error } = useSearchState();
// 监听数据变化
watch(error, (newValue) => {
console.log('error 更新:', newValue);
});
// 直接访问数据
console.log('当前 error:', error.value);
searchAdvancedParams
Ref<any>
示例
import { useSearchState } from 'tuikit-atomicx-vue3';
const { searchAdvancedParams } = useSearchState();
// 监听数据变化
watch(searchAdvancedParams, (newValue) => {
console.log('searchAdvancedParams 更新:', newValue);
});
// 直接访问数据
console.log('当前 searchAdvancedParams:', searchAdvancedParams.value);
selectedSearchType
Ref<any>
示例
import { useSearchState } from 'tuikit-atomicx-vue3';
const { selectedSearchType } = useSearchState();
// 监听数据变化
watch(selectedSearchType, (newValue) => {
console.log('selectedSearchType 更新:', newValue);
});
// 直接访问数据
console.log('当前 selectedSearchType:', selectedSearchType.value);
接口函数
search
示例
import { useSearchState } from 'tuikit-atomicx-vue3';
const { search } = useSearchState();
// 调用函数
// 参数示例:
// searchParams: 对应的参数值
await search({ /* 参数对象 */ });
setKeyword
示例
import { useSearchState } from 'tuikit-atomicx-vue3';
const { setKeyword } = useSearchState();
// 调用函数
// 参数示例:
// keywordParams: 对应的参数值
await setKeyword({ /* 参数对象 */ });
setSelectedType
示例
import { useSearchState } from 'tuikit-atomicx-vue3';
const { setSelectedType } = useSearchState();
// 调用函数
// 参数示例:
// typeParams: 对应的参数值
await setSelectedType({ /* 参数对象 */ });
setSearchMessageAdvancedParams
示例
import { useSearchState } from 'tuikit-atomicx-vue3';
const { setSearchMessageAdvancedParams } = useSearchState();
// 调用函数
// 参数示例:
// messageParams: 对应的参数值
await setSearchMessageAdvancedParams({ /* 参数对象 */ });
setSearchUserAdvancedParams
示例
import { useSearchState } from 'tuikit-atomicx-vue3';
const { setSearchUserAdvancedParams } = useSearchState();
// 调用函数
// 参数示例:
// userParams: 对应的参数值
await setSearchUserAdvancedParams({ /* 参数对象 */ });
setSearchGroupAdvancedParams
示例
import { useSearchState } from 'tuikit-atomicx-vue3';
const { setSearchGroupAdvancedParams } = useSearchState();
// 调用函数
// 参数示例:
// groupParams: 对应的参数值
await setSearchGroupAdvancedParams({ /* 参数对象 */ });
loadMore
示例
import { useSearchState } from 'tuikit-atomicx-vue3';
const { loadMore } = useSearchState();
// 调用函数
// 参数示例:
// loadParams?: 对应的参数值
await loadMore({ /* 参数对象 */ });
SeatStore
🪑 座位存储管理模块
核心功能:提供座位状态的底层存储和管理,支持座位信息缓存、用户信息映射、设备请求处理等核心功能。
技术特点:采用响应式存储设计,支持实时状态同步、事件驱动更新等功能。新增liveOwnerUserId、localUserId、seatList等响应式数据和getUserInfo、convertUserInfoToAudienceInfo接口。
业务价值:为座位管理提供可靠的数据基础,确保座位状态的一致性。
应用场景:座位状态管理、用户信息存储、设备状态跟踪等底层场景。
响应式数据
liveOwnerUserId
Ref<any>
示例
import { useSeatStore } from 'tuikit-atomicx-vue3';
const { liveOwnerUserId } = useSeatStore();
// 监听数据变化
watch(liveOwnerUserId, (newValue) => {
console.log('liveOwnerUserId 更新:', newValue);
});
// 直接访问数据
console.log('当前 liveOwnerUserId:', liveOwnerUserId.value);
localUserId
Ref<any>
示例
import { useSeatStore } from 'tuikit-atomicx-vue3';
const { localUserId } = useSeatStore();
// 监听数据变化
watch(localUserId, (newValue) => {
console.log('localUserId 更新:', newValue);
});
// 直接访问数据
console.log('当前 localUserId:', localUserId.value);
seatList
Ref<any>
示例
import { useSeatStore } from 'tuikit-atomicx-vue3';
const { seatList } = useSeatStore();
// 监听数据变化
watch(seatList, (newValue) => {
console.log('seatList 更新:', newValue);
});
// 直接访问数据
console.log('当前 seatList:', seatList.value);
coHostUserList
Ref<any>
示例
import { useSeatStore } from 'tuikit-atomicx-vue3';
const { coHostUserList } = useSeatStore();
// 监听数据变化
watch(coHostUserList, (newValue) => {
console.log('coHostUserList 更新:', newValue);
});
// 直接访问数据
console.log('当前 coHostUserList:', coHostUserList.value);
sentDeviceRequestMap
Ref<any>
示例
import { useSeatStore } from 'tuikit-atomicx-vue3';
const { sentDeviceRequestMap } = useSeatStore();
// 监听数据变化
watch(sentDeviceRequestMap, (newValue) => {
console.log('sentDeviceRequestMap 更新:', newValue);
});
// 直接访问数据
console.log('当前 sentDeviceRequestMap:', sentDeviceRequestMap.value);
receivedDeviceRequestMap
Ref<any>
示例
import { useSeatStore } from 'tuikit-atomicx-vue3';
const { receivedDeviceRequestMap } = useSeatStore();
// 监听数据变化
watch(receivedDeviceRequestMap, (newValue) => {
console.log('receivedDeviceRequestMap 更新:', newValue);
});
// 直接访问数据
console.log('当前 receivedDeviceRequestMap:', receivedDeviceRequestMap.value);
userInfoMap
Ref<any>
示例
import { useSeatStore } from 'tuikit-atomicx-vue3';
const { userInfoMap } = useSeatStore();
// 监听数据变化
watch(userInfoMap, (newValue) => {
console.log('userInfoMap 更新:', newValue);
});
// 直接访问数据
console.log('当前 userInfoMap:', userInfoMap.value);
接口函数
getUserInfo
示例
import { useSeatStore } from 'tuikit-atomicx-vue3';
const { getUserInfo } = useSeatStore();
// 调用函数
// 参数示例:
// userParams: 对应的参数值
await getUserInfo({ /* 参数对象 */ });
convertUserInfoToAudienceInfo
示例
import { useSeatStore } from 'tuikit-atomicx-vue3';
const { convertUserInfoToAudienceInfo } = useSeatStore();
// 调用函数
// 参数示例:
// convertParams: 对应的参数值
await convertUserInfoToAudienceInfo({ /* 参数对象 */ });