UNPKG

@tencentcloud/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,

70 lines (69 loc) 2.99 kB
import { defineComponent, inject, watch, createElementBlock, openBlock, createCommentVNode, unref, createElementVNode, createVNode, toDisplayString, isRef } from "vue"; import CameraSelect from "./CameraSelect.vue2.mjs"; import VideoProfile from "./VideoProfile.vue2.mjs"; import VideoPreview from "./VideoPreview.vue.mjs"; import TuiSwitch from "../../../components/common/base/TuiSwitch.vue.mjs"; import { useI18n } from "../../../locales/index.mjs"; import { useVideoDeviceState } from "../../hooks/useVideoDeviceState/index.mjs"; const _hoisted_1 = { class: "video-tab" }; const _hoisted_2 = { key: 0, class: "item-setting" }; const _hoisted_3 = { class: "title" }; const _hoisted_4 = { key: 1, class: "item-setting" }; const _hoisted_5 = { class: "title" }; const _hoisted_6 = { key: 2, class: "item-setting" }; const _hoisted_7 = { class: "title" }; const _hoisted_8 = { key: 3, class: "mirror-container" }; const _sfc_main = /* @__PURE__ */ defineComponent({ __name: "VideoSettingTab", setup(__props) { const { t } = useI18n(); const { isLocalMirror, camera } = useVideoDeviceState(); const videoSettingProps = inject("videoSettingProps"); watch( isLocalMirror, async (val) => { camera.switchMirror({ mirror: val }); }, { immediate: true } ); return (_ctx, _cache) => { var _a, _b, _c, _d; return openBlock(), createElementBlock("div", _hoisted_1, [ ((_a = unref(videoSettingProps)) == null ? void 0 : _a.supportSwitchCamera) ? (openBlock(), createElementBlock("div", _hoisted_2, [ createElementVNode("span", _hoisted_3, toDisplayString(unref(t)("Camera")), 1), createVNode(CameraSelect) ])) : createCommentVNode("", true), ((_b = unref(videoSettingProps)) == null ? void 0 : _b.supportVideoPreview) ? (openBlock(), createElementBlock("div", _hoisted_4, [ createElementVNode("span", _hoisted_5, toDisplayString(unref(t)("Preview")), 1), createVNode(VideoPreview, { class: "video-preview" }) ])) : createCommentVNode("", true), ((_c = unref(videoSettingProps)) == null ? void 0 : _c.supportSwitchResolution) ? (openBlock(), createElementBlock("div", _hoisted_6, [ createElementVNode("span", _hoisted_7, toDisplayString(unref(t)("Resolution")), 1), createVNode(VideoProfile) ])) : createCommentVNode("", true), ((_d = unref(videoSettingProps)) == null ? void 0 : _d.supportSwitchMirror) ? (openBlock(), createElementBlock("div", _hoisted_8, [ createElementVNode("span", null, toDisplayString(unref(t)("Mirror")), 1), createVNode(TuiSwitch, { modelValue: unref(isLocalMirror), "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(isLocalMirror) ? isLocalMirror.value = $event : null) }, null, 8, ["modelValue"]) ])) : createCommentVNode("", true) ]); }; } }); export { _sfc_main as default };