@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,
22 lines (21 loc) • 609 B
text/typescript
import { ref } from 'vue';
export enum OverlayMap {
AISubtitlesOverlay = 'AISubtitlesOverlay',
RoomInviteOverlay = 'RoomInviteOverlay',
}
const overlayMap = ref<{
[key in OverlayMap]: { visible: boolean };
}>({
[OverlayMap.AISubtitlesOverlay]: { visible: false },
[OverlayMap.RoomInviteOverlay]: { visible: false },
});
export function useRoomOverlayHooks() {
const getOverlayMap = () => overlayMap;
const toggleOverlayVisibility = (overlay: OverlayMap, isShow: boolean) => {
overlayMap.value[overlay].visible = isShow;
};
return {
getOverlayMap,
toggleOverlayVisibility,
};
}