roomkit-web-vue3
Version:
<h1 align="center"> TUIRoomKit</h1> Conference (TUIRoomKit) is a product suitable for multi-person audio and video conversation scenarios such as business meetings, webinars, and online education. By integrating this product, you can add room management,
58 lines (57 loc) • 2.45 kB
JavaScript
import { defineComponent, ref, openBlock, createElementBlock, createElementVNode, createVNode, normalizeStyle, unref, createBlock, createCommentVNode } from "vue";
import EndControl from "../../RoomFooter/EndControl/index.mjs";
import SwitchCamera from "./SwitchCamera.vue.mjs";
import SwitchMirror from "./SwitchMirror.vue.mjs";
import SwitchAudioRoute from "./SwitchAudioRoute.vue.mjs";
import RoomInfo from "../RoomInfo/index.mjs";
import SwitchTheme from "../../common/SwitchTheme.vue.mjs";
import { isWeChat } from "../../../utils/environment.mjs";
import { storeToRefs } from "pinia";
import { useRoomStore } from "../../../stores/room.mjs";
const _hoisted_1 = { class: "header" };
const _hoisted_2 = { class: "header-container" };
const _hoisted_3 = { class: "icon-box" };
const _sfc_main = /* @__PURE__ */ defineComponent({
__name: "index",
emits: ["click", "show-room-info", "copy-room-link"],
setup(__props, { expose: __expose, emit: __emit }) {
const roomStore = useRoomStore();
const emit = __emit;
const roomInfoRef = ref();
const {
localUser
} = storeToRefs(roomStore);
__expose({
showRoomInfo() {
roomInfoRef.value.toggleShowRoomInfoStatus();
}
});
return (_ctx, _cache) => {
return openBlock(), createElementBlock("div", _hoisted_1, [
createElementVNode("div", _hoisted_2, [
createElementVNode("div", _hoisted_3, [
createVNode(SwitchCamera, {
style: normalizeStyle({ visibility: unref(localUser).hasVideoStream ? "visible" : "hidden" })
}, null, 8, ["style"]),
createVNode(SwitchMirror, {
style: normalizeStyle({ visibility: unref(localUser).hasVideoStream ? "visible" : "hidden" })
}, null, 8, ["style"]),
unref(isWeChat) ? (openBlock(), createBlock(SwitchAudioRoute, { key: 0 })) : createCommentVNode("", true)
]),
createVNode(unref(RoomInfo), {
class: "room-info",
ref_key: "roomInfoRef",
ref: roomInfoRef,
onShowRoomInfo: _cache[0] || (_cache[0] = ($event) => emit("show-room-info", $event)),
onCopyRoomLink: _cache[1] || (_cache[1] = ($event) => emit("copy-room-link", $event))
}, null, 512),
createVNode(unref(EndControl))
]),
createVNode(SwitchTheme, { visible: false })
]);
};
}
});
export {
_sfc_main as default
};