@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) • 3.17 kB
JavaScript
"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const Vue = require("vue");
const CameraSelect = require("./CameraSelect.vue2.js");
const VideoProfile = require("./VideoProfile.vue2.js");
const VideoPreview = require("./VideoPreview.vue.js");
const TuiSwitch = require("../../../components/common/base/TuiSwitch.vue.js");
const index = require("../../../locales/index.js");
const index$1 = require("../../hooks/useVideoDeviceState/index.js");
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__ */ Vue.defineComponent({
__name: "VideoSettingTab",
setup(__props) {
const { t } = index.useI18n();
const { isLocalMirror, camera } = index$1.useVideoDeviceState();
const videoSettingProps = Vue.inject("videoSettingProps");
Vue.watch(
isLocalMirror,
async (val) => {
camera.switchMirror({ mirror: val });
},
{ immediate: true }
);
return (_ctx, _cache) => {
var _a, _b, _c, _d;
return Vue.openBlock(), Vue.createElementBlock("div", _hoisted_1, [
((_a = Vue.unref(videoSettingProps)) == null ? void 0 : _a.supportSwitchCamera) ? (Vue.openBlock(), Vue.createElementBlock("div", _hoisted_2, [
Vue.createElementVNode("span", _hoisted_3, Vue.toDisplayString(Vue.unref(t)("Camera")), 1),
Vue.createVNode(CameraSelect.default)
])) : Vue.createCommentVNode("", true),
((_b = Vue.unref(videoSettingProps)) == null ? void 0 : _b.supportVideoPreview) ? (Vue.openBlock(), Vue.createElementBlock("div", _hoisted_4, [
Vue.createElementVNode("span", _hoisted_5, Vue.toDisplayString(Vue.unref(t)("Preview")), 1),
Vue.createVNode(VideoPreview.default, { class: "video-preview" })
])) : Vue.createCommentVNode("", true),
((_c = Vue.unref(videoSettingProps)) == null ? void 0 : _c.supportSwitchResolution) ? (Vue.openBlock(), Vue.createElementBlock("div", _hoisted_6, [
Vue.createElementVNode("span", _hoisted_7, Vue.toDisplayString(Vue.unref(t)("Resolution")), 1),
Vue.createVNode(VideoProfile.default)
])) : Vue.createCommentVNode("", true),
((_d = Vue.unref(videoSettingProps)) == null ? void 0 : _d.supportSwitchMirror) ? (Vue.openBlock(), Vue.createElementBlock("div", _hoisted_8, [
Vue.createElementVNode("span", null, Vue.toDisplayString(Vue.unref(t)("Mirror")), 1),
Vue.createVNode(TuiSwitch.default, {
modelValue: Vue.unref(isLocalMirror),
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => Vue.isRef(isLocalMirror) ? isLocalMirror.value = $event : null)
}, null, 8, ["modelValue"])
])) : Vue.createCommentVNode("", true)
]);
};
}
});
exports.default = _sfc_main;