UNPKG

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

59 lines (58 loc) 2.54 kB
"use strict"; Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } }); const Vue = require("vue"); const index = require("../../locales/index.js"); const index$1 = require("./base/Select/index.vue.js"); const index$2 = require("./base/Option/index.vue.js"); const TUIRoomEngine = require("@tencentcloud/tuiroom-engine-electron"); const room = require("../../stores/room.js"); const useRoomEngine = require("../../hooks/useRoomEngine.js"); const pinia = require("pinia"); const _sfc_main = /* @__PURE__ */ Vue.defineComponent({ __name: "VideoProfile", setup(__props) { const roomEngine = useRoomEngine.default(); const roomStore = room.useRoomStore(); const { localVideoQuality } = pinia.storeToRefs(roomStore); const { t } = index.useI18n(); const videoProfileList = Vue.computed(() => [ { label: t("Low Definition"), value: TUIRoomEngine.TUIVideoQuality.kVideoQuality_360p }, { label: t("Standard Definition"), value: TUIRoomEngine.TUIVideoQuality.kVideoQuality_540p }, { label: t("High Definition"), value: TUIRoomEngine.TUIVideoQuality.kVideoQuality_720p }, { label: t("Super Definition"), value: TUIRoomEngine.TUIVideoQuality.kVideoQuality_1080p } ]); Vue.watch(localVideoQuality, (val) => { var _a; (_a = roomEngine.instance) == null ? void 0 : _a.updateVideoQuality({ quality: val }); }); TUIRoomEngine.once("ready", () => { var _a; (_a = roomEngine.instance) == null ? void 0 : _a.updateVideoQuality({ quality: localVideoQuality.value }); }); return (_ctx, _cache) => { return Vue.openBlock(), Vue.createBlock(index$1.default, { modelValue: Vue.unref(localVideoQuality), "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => Vue.isRef(localVideoQuality) ? localVideoQuality.value = $event : null), placeholder: "placeholder", class: "select", teleported: false, "popper-append-to-body": false }, { default: Vue.withCtx(() => [ (Vue.openBlock(true), Vue.createElementBlock(Vue.Fragment, null, Vue.renderList(videoProfileList.value, (item, index2) => { return Vue.openBlock(), Vue.createBlock(index$2.default, { key: index2, label: item.label, value: item.value }, null, 8, ["label", "value"]); }), 128)) ]), _: 1 }, 8, ["modelValue"]); }; } }); exports.default = _sfc_main;