@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,
47 lines (46 loc) • 1.75 kB
JavaScript
;
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const Vue = require("vue");
const _hoisted_1 = { class: "screen-window-previewer" };
const _hoisted_2 = ["width", "height", "data-id"];
const _hoisted_3 = { class: "previewer-name" };
const _sfc_main = /* @__PURE__ */ Vue.defineComponent({
__name: "ScreenWindowPreviewer",
props: {
data: {}
},
setup(__props) {
const { data } = __props;
const canvasRef = Vue.ref(null);
Vue.onMounted(() => {
var _a, _b, _c;
if (canvasRef.value) {
if (((_a = data.thumbBGRA) == null ? void 0 : _a.width) && ((_b = data.thumbBGRA) == null ? void 0 : _b.height) && ((_c = data.thumbBGRA) == null ? void 0 : _c.buffer)) {
const ctx = canvasRef.value.getContext("2d");
if (ctx !== null) {
const img = new ImageData(
new Uint8ClampedArray(data.thumbBGRA.buffer),
data.thumbBGRA.width,
data.thumbBGRA.height
);
ctx.putImageData(img, 0, 0);
}
}
}
});
return (_ctx, _cache) => {
return Vue.openBlock(), Vue.createElementBlock("li", _hoisted_1, [
Vue.createElementVNode("canvas", {
ref_key: "canvasRef",
ref: canvasRef,
class: Vue.normalizeClass([_ctx.data.isMinimizeWindow ? "previewer-mini" : "previewer-canvas"]),
width: _ctx.data.thumbBGRA.width,
height: _ctx.data.thumbBGRA.height,
"data-id": _ctx.data.sourceId
}, null, 10, _hoisted_2),
Vue.createElementVNode("div", _hoisted_3, Vue.toDisplayString(_ctx.data.sourceName), 1)
]);
};
}
});
exports.default = _sfc_main;