);
})
- .setPropertyViewFn((children) => (
+ .setPropertyViewFn((children: any) => (
<>
{children.userId.propertyView({ label: trans("meeting.videoId") })}
-
+
{children.profileImageUrl.propertyView({
label: trans("meeting.profileImageUrl"),
- placeholder: "https://api.dicebear.com/7.x/fun-emoji/svg?seed=Peanut&radius=50&backgroundColor=transparent&randomizeIds=true&eyes=wink,sleepClose",
+ placeholder:
+ "https://api.dicebear.com/7.x/fun-emoji/svg?seed=Peanut&radius=50&backgroundColor=transparent&randomizeIds=true&eyes=wink,sleepClose",
})}
- {(useContext(EditorContext).editorModeStatus === "logic" || useContext(EditorContext).editorModeStatus === "both") && (
+ {/* {(useContext(EditorContext).editorModeStatus === "logic" ||
+ useContext(EditorContext).editorModeStatus === "both") && (
{children.onEvent.getPropertyView()}
{hiddenPropertyView(children)}
)}
- {(useContext(EditorContext).editorModeStatus === "layout" || useContext(EditorContext).editorModeStatus === "both") && (
- <>
- {children.autoHeight.getPropertyView()}
-
-
- {children.profilePadding.propertyView({
- label: "Profile Image Padding",
- })}
- {children.profileBorderRadius.propertyView({
- label: "Profile Image Border Radius",
- })}
- {children.videoAspectRatio.propertyView({
- label: "Video Aspect Ratio",
- })}
- {children.style.getPropertyView()}
-
- >
- )}
+ {(useContext(EditorContext).editorModeStatus === "layout" ||
+ useContext(EditorContext).editorModeStatus === "both") && (
+ <> */}
+
+ {children.autoHeight.getPropertyView()}
+
+
+ {children.profilePadding.propertyView({
+ label: "Profile Image Padding",
+ })}
+ {children.profileBorderRadius.propertyView({
+ label: "Profile Image Border Radius",
+ })}
+ {children.videoAspectRatio.propertyView({
+ label: "Video Aspect Ratio",
+ })}
+ {children.style.getPropertyView()}
+
+ {/* > */}
+ {/* )} */}
>
))
.build();
})();
VideoCompBuilder = class extends VideoCompBuilder {
- override autoHeight(): boolean {
- return this.children.autoHeight.getView();
+ autoHeight(): boolean {
+ return false;
}
};
export const VideoMeetingStreamComp = withExposingConfigs(VideoCompBuilder, [
- new NameConfig("loading", trans("button.loadingDesc")),
+ new NameConfig("loading", trans("meeting.loadingDesc")),
new NameConfig("profileImageUrl", trans("meeting.profileImageUrl")),
...CommonNameConfig,
diff --git a/client/packages/lowcoder/src/comps/comps/meetingComp/videoSharingStreamComp.tsx b/client/packages/lowcoder-comps/src/comps/agoraMeetingComp/videoSharingStreamComp.tsx
similarity index 70%
rename from client/packages/lowcoder/src/comps/comps/meetingComp/videoSharingStreamComp.tsx
rename to client/packages/lowcoder-comps/src/comps/agoraMeetingComp/videoSharingStreamComp.tsx
index d03897dd7..902f34a7c 100644
--- a/client/packages/lowcoder/src/comps/comps/meetingComp/videoSharingStreamComp.tsx
+++ b/client/packages/lowcoder-comps/src/comps/agoraMeetingComp/videoSharingStreamComp.tsx
@@ -1,29 +1,26 @@
-import { BoolCodeControl, StringControl } from "comps/controls/codeControl";
-import { EditorContext } from "comps/editorState";
-import { withDefault } from "comps/generators";
-import { UICompBuilder } from "comps/generators/uiCompBuilder";
-import ReactResizeDetector from "react-resize-detector";
import {
+ NameConfig,
+ withDefault,
+ withExposingConfigs,
+ StringControl,
Section,
sectionNames,
-} from "lowcoder-design";
-import { trans } from "i18n";
-import styled from "styled-components";
-import {
+ AutoHeightControl,
+ EditorContext,
+ styled,
+ MeetingEventHandlerControl,
+ BoolCodeControl,
+ RefControl,
+ stringExposingStateControl,
+ UICompBuilder,
CommonNameConfig,
- NameConfig,
- withExposingConfigs,
-} from "../../generators/withExposing";
-import { ButtonStyleControl } from "./videobuttonCompConstants";
-import { RefControl } from "comps/controls/refControl";
+} from "lowcoder-sdk";
import { useEffect, useRef, useState } from "react";
-import { AutoHeightControl } from "comps/controls/autoHeightControl";
-import { client } from "./videoMeetingControllerComp";
+import { client } from "./meetingControllerComp";
import type { IAgoraRTCRemoteUser } from "agora-rtc-sdk-ng";
-import { useContext } from "react";
-import { MeetingEventHandlerControl } from "comps/controls/eventHandlerControl";
-import { stringExposingStateControl } from "comps/controls/codeStateControl";
-import { hiddenPropertyView } from "comps/utils/propertyUtils";
+import { trans } from "../../i18n/comps";
+import ReactResizeDetector from "react-resize-detector";
+import { ButtonStyleControl } from "./videobuttonCompConstants";
const VideoContainer = styled.video`
height: 100%;
@@ -42,13 +39,13 @@ const sharingStreamChildren = {
disabled: BoolCodeControl,
loading: BoolCodeControl,
style: ButtonStyleControl,
- viewRef: RefControl
,
+ viewRef: RefControl,
userId: withDefault(stringExposingStateControl(""), "{{meeting1.localUser}}"),
noVideoText: stringExposingStateControl(trans("meeting.noVideo")),
};
let SharingCompBuilder = (function () {
- return new UICompBuilder(sharingStreamChildren, (props) => {
+ return new UICompBuilder(sharingStreamChildren, (props: any) => {
const videoRef = useRef(null);
const conRef = useRef(null);
const [userId, setUserId] = useState();
@@ -95,8 +92,6 @@ let SharingCompBuilder = (function () {
client.on(
"user-unpublished",
(user: IAgoraRTCRemoteUser, mediaType: "video" | "audio") => {
- // console.log("user-unpublished");
-
if (mediaType === "audio") {
if (
!user.hasAudio &&
@@ -130,7 +125,7 @@ let SharingCompBuilder = (function () {
return (
- {(editorState) => (
+ {(editorState: any) => (
{userId ? (
@@ -161,7 +156,7 @@ let SharingCompBuilder = (function () {
) : (
<>>
)}
- {/*
{userName ?? ""}
-
*/}
+