<template>
<UIKitProvider theme="light" language="en-US">
<div class="app">
<CoGuestPanel class="co-guest-panel" />
</div>
</UIKitProvider>
</template>
<script setup lang="ts">
import { onMounted, ref } from 'vue';
import { UIKitProvider } from '@tencentcloud/uikit-base-component-vue3';
import { CoGuestPanel, useLoginState, useLiveState } from 'tuikit-atomicx-vue3';
const { login, loginUserInfo } = useLoginState();
const { joinLive } = useLiveState();
async function initLogin() {
try {
await login({
sdkAppId: 0,
userId: '',
userSig: '',
});
} catch (error) {
console.error('login error:', error);
}
}
onMounted(async () => {
await initLogin();
await joinLive({
liveId: 'input corresponding live streaming room LiveId',
});
});
</script>
<style scoped>.app{width:100vw;height:100vh;display:flex;justify-content:center;align-items:center;padding:20px;box-sizing:border-box}.co-guest-panel{width:100%;max-width:500px;padding: 24px;height:600px;background:rgba(255,255,255,0.9);border-radius:12px;box-shadow:0 8px 32px rgba(0,0,0,0.1);overflow:hidden}</style>