(null);
+ const [userId, setUserId] = useState();
+ const [userName, setUsername] = useState("");
+ const [showVideoSharing, setVideoSharing] = useState(true);
+
+ useEffect(() => {
+ if (props.userId.value !== "") {
+ let userData = JSON.parse(props.userId?.value);
+ client.on(
+ "user-published",
+ async (user: IAgoraRTCRemoteUser, mediaType: "video" | "audio") => {
+ if (mediaType === "video") {
+ const remoteTrack = await client.subscribe(user, mediaType);
+ let userId = user.uid + "";
+ if (
+ user.hasVideo &&
+ user.uid + "" !== userData.user &&
+ userData.user !== ""
+ ) {
+ props.onEvent("videoOn");
+ }
+ const element = document.getElementById(userId);
+
+ if (element) {
+ remoteTrack.play(userId);
+ }
+ }
+ if (mediaType === "audio") {
+ const remoteTrack = await client.subscribe(user, mediaType);
+ if (
+ user.hasAudio &&
+ user.uid + "" !== userData.user &&
+ userData.user !== ""
+ ) {
+ userData.audiostatus = user.hasVideo;
+
+ props.onEvent("audioUnmuted");
+ }
+ remoteTrack.play();
+ }
+ }
+ );
+ client.on(
+ "user-unpublished",
+ (user: IAgoraRTCRemoteUser, mediaType: "video" | "audio") => {
+ console.log("user-unpublished");
+
+ if (mediaType === "audio") {
+ if (
+ !user.hasAudio &&
+ user.uid + "" !== userData.user &&
+ userData.user !== ""
+ ) {
+ userData.audiostatus = user.hasVideo;
+ props.onEvent("audioMuted");
+ }
+ }
+ if (mediaType === "video") {
+ if (videoRef.current && videoRef.current?.id === user.uid + "") {
+ videoRef.current.srcObject = null;
+ }
+ if (
+ !user.hasVideo &&
+ user.uid + "" !== userData.user &&
+ userData.user !== ""
+ ) {
+ props.onEvent("videoOff");
+ }
+ }
+ }
+ );
+
+ setUserId(userData.user);
+ setUsername(userData.userName);
+ setVideoSharing(userData.streamingSharing);
+ }
+ }, [props.userId.value]);
+
+ return (
+
+ {(editorState) => (
+
+
+ {userId ? (
+
props.onEvent("videoClicked")}
+ ref={videoRef}
+ style={{
+ display: `${showVideoSharing ? "flex" : "none"}`,
+ aspectRatio: props.videoAspectRatio,
+ borderRadius: props.style.radius,
+ width: "auto",
+ }}
+ id="share-screen"
+ >
+ ) : (
+ <>>
+ )}
+
+

+
{userName ?? ""}
+
+
+
+ )}
+
+ );
+ })
+ .setPropertyViewFn((children) => (
+ <>
+
+ {children.userId.propertyView({ label: trans("meeting.videoId") })}
+ {children.autoHeight.getPropertyView()}
+ {children.profileImageUrl.propertyView({
+ label: trans("meeting.profileImageUrl"),
+ placeholder: "https://via.placeholder.com/120",
+ })}
+
+
+
+ {children.onEvent.getPropertyView()}
+
+
+ {hiddenPropertyView(children)}
+
+
+ {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();
+})();
+
+SharingCompBuilder = class extends SharingCompBuilder {
+ override autoHeight(): boolean {
+ return this.children.autoHeight.getView();
+ }
+};
+
+export const VideoSharingStreamComp = withExposingConfigs(SharingCompBuilder, [
+ new NameConfig("loading", trans("button.loadingDesc")),
+ new NameConfig("profileImageUrl", trans("meeting.profileImageUrl")),
+
+ ...CommonNameConfig,
+]);
diff --git a/client/packages/lowcoder/src/comps/index.tsx b/client/packages/lowcoder/src/comps/index.tsx
index 8aa9386b7..a14e4e682 100644
--- a/client/packages/lowcoder/src/comps/index.tsx
+++ b/client/packages/lowcoder/src/comps/index.tsx
@@ -142,6 +142,7 @@ import { ResponsiveLayoutComp } from "./comps/responsiveLayout";
import { VideoMeetingStreamComp } from "./comps/meetingComp/videoMeetingStreamComp";
import { ControlButton } from "./comps/meetingComp/controlButton";
import { VideoMeetingControllerComp } from "./comps/meetingComp/videoMeetingControllerComp";
+import { VideoSharingStreamComp } from "./comps/meetingComp/videoSharingStreamComp";
type Registry = {
[key in UICompType]?: UICompManifest;
@@ -560,7 +561,17 @@ const uiCompMap: Registry = {
},
defaultDataFn: defaultContainerData,
},
-
+ //ADDED BY FRED
+ sharingcomponent: {
+ name: trans("meeting.sharingCompName"),
+ enName: "Sharing",
+ description: trans("meeting.sharingCompName"),
+ categories: ["meeting"],
+ icon: VideoCompIcon,
+ keywords: trans("meeting.meetingCompKeywords"),
+ comp: VideoSharingStreamComp,
+ withoutLoading: true,
+ },
videocomponent: {
name: trans("meeting.videoCompName"),
enName: "Video",
@@ -581,6 +592,7 @@ const uiCompMap: Registry = {
comp: ControlButton,
withoutLoading: true,
},
+ //END
tabbedContainer: {
name: trans("uiComp.tabbedContainerCompName"),
enName: "Tabbed Container",
@@ -931,7 +943,7 @@ const uiCompMap: Registry = {
layoutInfo: {
w: 13,
h: 55,
- }
+ },
},
mention: {
name: trans("uiComp.mentionCompName"),
diff --git a/client/packages/lowcoder/src/comps/uiCompRegistry.ts b/client/packages/lowcoder/src/comps/uiCompRegistry.ts
index c48be999e..54d0f5d2c 100644
--- a/client/packages/lowcoder/src/comps/uiCompRegistry.ts
+++ b/client/packages/lowcoder/src/comps/uiCompRegistry.ts
@@ -58,6 +58,7 @@ export type UICompType =
| "chart"
| "meeting"
| "videocomponent"
+ | "sharingcomponent"
| "controlButton"
| "imageEditor"
| "calendar"
diff --git a/client/packages/lowcoder/src/i18n/locales/en.ts b/client/packages/lowcoder/src/i18n/locales/en.ts
index ade1d8355..73756da19 100644
--- a/client/packages/lowcoder/src/i18n/locales/en.ts
+++ b/client/packages/lowcoder/src/i18n/locales/en.ts
@@ -861,6 +861,7 @@ export const en = {
audioCompDesc: "Audio component",
audioCompKeywords: "",
videoCompName: "Video",
+ sharingCompName: "Sharing",
videoCompDesc: "Video component",
videoCompKeywords: "",
drawerCompName: "Drawer",
@@ -1466,8 +1467,8 @@ export const en = {
meetingName: "Meeting Name",
localUserID: "Host User Id",
userName: "Host User Name",
- rtmToken : "Agora RTM Token",
- rtcToken : "Agora RTC Token",
+ rtmToken: "Agora RTM Token",
+ rtcToken: "Agora RTC Token",
videoCompText: "No video Text",
profileImageUrl: "Profile Image Url",
right: "Right",
@@ -1484,18 +1485,21 @@ export const en = {
actionBtnDesc: "Action Button",
broadCast: "BroadCast Messages",
title: "Meeting Title",
- meetingCompName: "Meeting Controller",
- videoCompName: "Video Stream",
- videoSharingCompName: "Screen Sharing",
- meetingControlCompName: "Controls Buttons",
- meetingCompDesc: "Meeting component",
- meetingCompControls: "Meeting control",
- meetingCompKeywords: "",
+ //ADDED BY FRED
+ meetingCompName: "Agora Meeting Controller",
+ sharingCompName: "Screen share Stream",
+ videoCompName: "Camera Stream",
+ videoSharingCompName: "Screen share Stream",
+ meetingControlCompName: "Control Button",
+ meetingCompDesc: "Meeting Component",
+ meetingCompControls: "Meeting Control",
+ meetingCompKeywords: "Agora Meeting, Web Meeting, Collaboration",
+ //END
iconSize: "Icon Size",
userId: "userId",
roomId: "roomId",
- meetingActive : "Ongoing Meeting",
- messages : "Broadcasted Messages",
+ meetingActive: "Ongoing Meeting",
+ messages: "Broadcasted Messages",
},
settings: {
title: "Settings",
@@ -1844,6 +1848,8 @@ export const en = {
preloadLibsEmpty: "No JavaScript libraries were added",
preloadLibsAddBtn: "Add a library",
saveSuccess: "Saved successfully",
+ AuthOrgTitle: "Workspace welcome Screen",
+ AuthOrgDescrition: "The URL for your users to Sign in to the current workspace.",
},
branding: {
title: "Branding",
diff --git a/client/packages/lowcoder/src/pages/editor/editorConstants.tsx b/client/packages/lowcoder/src/pages/editor/editorConstants.tsx
index 8baf2944d..2820e14c9 100644
--- a/client/packages/lowcoder/src/pages/editor/editorConstants.tsx
+++ b/client/packages/lowcoder/src/pages/editor/editorConstants.tsx
@@ -88,6 +88,7 @@ export const CompStateIcon: {
meeting: ,
mermaid: ,
videocomponent: ,
+ sharingcomponent: ,
controlButton: ,
tabbedContainer: ,
modal: ,
diff --git a/client/packages/lowcoder/src/pages/setting/idSource/list.tsx b/client/packages/lowcoder/src/pages/setting/idSource/list.tsx
index 62f121ac0..353fba1a4 100644
--- a/client/packages/lowcoder/src/pages/setting/idSource/list.tsx
+++ b/client/packages/lowcoder/src/pages/setting/idSource/list.tsx
@@ -34,6 +34,7 @@ import { messageInstance, AddIcon } from "lowcoder-design";
import { currentOrgAdmin } from "../../../util/permissionUtils";
import CreateModal from "./createModal";
import _ from "lodash";
+import { HelpText } from "components/HelpText";
export const IdSourceList = (props: any) => {
const user = useSelector(getUser);
@@ -44,6 +45,18 @@ export const IdSourceList = (props: any) => {
const [modalVisible, setModalVisible] = useState(false);
const enableEnterpriseLogin = useSelector(selectSystemConfig)?.featureFlag?.enableEnterpriseLogin;
+ let protocol = window.location.protocol;
+ const port = window.location.port;
+ let currentDomain = window.location.hostname;
+
+ // Show port only if it is not a standard port
+ if (port && port !== '80' && port !== '443') {
+ currentDomain += `:${port}`;
+ }
+
+ const redirectUrl = encodeURIComponent(`${protocol}//${currentDomain}/apps`);
+ const loginUrl = `${protocol}//${currentDomain}/org/${currentOrgId}/auth/login?redirectUrl=${encodeURIComponent(redirectUrl)}`;
+
useEffect(() => {
if (!currentOrgId) {
return;
@@ -154,6 +167,11 @@ export const IdSourceList = (props: any) => {
)}
/>
+
+ {trans("advanced.AuthOrgTitle")}
+ {trans("advanced.AuthOrgDescrition") + ": "}
+ {loginUrl}
+
{
>
);
};
+