TUILiveKit Release Notes
Live SDK Release Notes
CoGuestState covers the two most common guest connection workflows:applyForSeat method when the user clicks the "Request to Join" button in your UI.import { useCoGuestState } from "tuikit-atomicx-vue3";const { applyForSeat } = useCoGuestState();// User clicks "Request to Join"const handleRequestToConnect = async () => {try {await applyForSeat({seatIndex: -1, // -1 assigns a seat randomlytimeout: 30, // Timeout in seconds; if TS expects ms, use 30000});console.log('Request sent');} catch (error) {console.error('Request failed', error);}}
CoGuestEvent.onGuestApplicationResponded event with subscribeEvent to receive the host’s decision.import { onMounted, onUnmounted } from 'vue';import { useCoGuestState, useDeviceState, CoGuestEvent } from "tuikit-atomicx-vue3";const { subscribeEvent, unsubscribeEvent } = useCoGuestState();const { openLocalMicrophone, openLocalCamera } = useDeviceState();const handleGuestApplicationResponded = (eventInfo: any) => {if (eventInfo.isAccept) {console.log('Guest request accepted');// Enable microphone and cameraopenLocalMicrophone();openLocalCamera();// Update UI to indicate guest connection is active} else {console.log('Guest request rejected');// Notify user that the request was rejected}};onMounted(() => {subscribeEvent(CoGuestEvent.onGuestApplicationResponded, handleGuestApplicationResponded);});onUnmounted(() => {unsubscribeEvent(CoGuestEvent.onGuestApplicationResponded, handleGuestApplicationResponded);});
disConnect method to return to audience status.import { useCoGuestState } from "tuikit-atomicx-vue3";const { disConnect } = useCoGuestState();// User clicks "Leave Seat"const leaveSeat = async () => {try {await disConnect();console.log('Disconnected successfully');} catch (error) {console.log('Disconnect failed', error);}}
cancelApplication.import { useCoGuestState } from "tuikit-atomicx-vue3";const { cancelApplication } = useCoGuestState();// User clicks "Cancel Request" while waitingconst handleCancelRequest = async () => {await cancelApplication();console.log('Request cancelled successfully');}
CoHostEvent.onGuestApplicationReceived event to get notified when an audience member requests to join.import { onMounted, onUnmounted } from 'vue';import { useCoGuestState, CoHostEvent } from "tuikit-atomicx-vue3";const { subscribeEvent, unsubscribeEvent } = useCoGuestState();const handleGuestApplicationReceived = (eventInfo: any) => {console.log('Received guest request from audience:', eventInfo.guestUser);// Update UI, e.g., show a notification badge on the "Request List" button};onMounted(() => {subscribeEvent(CoHostEvent.onGuestApplicationReceived, handleGuestApplicationReceived);});onUnmounted(() => {unsubscribeEvent(CoHostEvent.onGuestApplicationReceived, handleGuestApplicationReceived);});
CoGuestState provides a real-time list of applicants via the applicants Vue ComputedRef. Each applicant includes fields like userId and userName. Use this directly in your template:<template><div v-for="audience in applicants" :key="audience.userId" class="applicant-item"><span>{{ audience.userName }}</span><button @click="handleAccept(audience.userId)">Accept</button><button @click="handleReject(audience.userId)">Reject</button></div></template><script setup lang="ts">import { useCoGuestState } from "tuikit-atomicx-vue3";const { applicants, acceptApplication, rejectApplication } = useCoGuestState();const handleAccept = async (userId: string) => {await acceptApplication({ userId });};const handleReject = async (userId: string) => {await rejectApplication({ userId });};</script>
inviteToSeat.import { useCoGuestState } from "tuikit-atomicx-vue3";const { inviteToSeat } = useCoGuestState();// Host selects an audience member and sends an invitationconst handleInviteToSeat = async (userId: string) => {try {await inviteToSeat({userId,seatIndex: -1, // Assign seat randomlytimeout: 30,});console.log(`Sent guest invitation to audience ${userId}`);} catch (error) {console.error('Invitation failed', error);}}
CoHostEvent.onHostInvitationResponded event to track whether the audience member accepts or rejects the invitation.import { onMounted } from 'vue';import { useCoGuestState, CoHostEvent } from "tuikit-atomicx-vue3";const { subscribeEvent } = useCoGuestState();onMounted(() => {subscribeEvent(CoHostEvent.onHostInvitationResponded, (eventInfo) => {if(eventInfo.isAccept){console.log(`Audience ${eventInfo.guestUser.userName} accepted your invitation`);} else {console.log(`Audience ${eventInfo.guestUser.userName} rejected your invitation`);}});});
CoGuestEvent.onHostInvitationReceived event to detect when the host sends an invitation.import { onMounted } from 'vue';import { useCoGuestState, CoGuestEvent } from "tuikit-atomicx-vue3";const { subscribeEvent } = useCoGuestState();onMounted(() => {subscribeEvent(CoGuestEvent.onHostInvitationReceived, (eventInfo) => {// Show a modal dialog for the user to accept or reject// Save eventInfo.hostUser.userId as inviterIdshowInviteDialog(eventInfo.hostUser.userId);});});
import { useCoGuestState, useDeviceState } from "tuikit-atomicx-vue3";const { acceptInvitation, rejectInvitation } = useCoGuestState();const { openLocalMicrophone, openLocalCamera } = useDeviceState();// User clicks "Accept"const handleAccept = async (inviterId: string) => {try {await acceptInvitation({ inviterId });// Automatically enable microphone and camera after acceptingopenLocalMicrophone();openLocalCamera();} catch (error) {console.error('Failed to accept invitation', error);}}// User clicks "Reject"const handleReject = async (inviterId: string) => {await rejectInvitation({ inviterId });}

State | Description | API Documentation |
DeviceState | Audio/video device control: microphone (on/off / volume), camera (on/off / switch / quality), screen sharing, real-time device status monitoring. | |
CoGuestState | Audience guest management: guest request / invitation / accept / reject, guest member permissions control (microphone / camera), state synchronization. | |
LiveSeatState | Seat information management: seat list management, seat order management. |
applyForSeat, acceptApplication, or inviteToSeat do not work.CoGuestState relies on the underlying room engine state. This usually happens if the user hasn’t joined the room, or the useCoGuestState context isn’t initialized.subscribeEvent was not called correctly.CoHostEvent and CoGuestEvent).CoHostEvent.onGuestApplicationReceived and CoHostEvent.onHostInvitationResponded.CoGuestEvent.onGuestApplicationResponded and CoGuestEvent.onHostInvitationReceived.CoGuestState only handles signaling for guest connections (seat assignment). Streaming (turning on microphone/camera) requires explicit calls to DeviceState methods.openLocalMicrophone and openLocalCamera. Also, check browser autoplay policies and ensure the user has interacted with the page.피드백