Skip to content

Commit ace706f

Browse files
feat: added profile image url provision on video comp
1 parent 3ebf5bc commit ace706f

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

client/packages/lowcoder/src/comps/comps/meetingComp/videoMeetingStreamComp.tsx

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ import { IAgoraRTCRemoteUser } from "agora-rtc-sdk-ng";
3737

3838
import {
3939
MeetingEventHandlerControl,
40+
StringStateControl,
4041
hiddenPropertyView,
4142
stringExposingStateControl,
4243
} from "@lowcoder-ee/index.sdk";
@@ -175,6 +176,10 @@ export const meetingStreamChildren = {
175176
style: ButtonStyleControl,
176177
viewRef: RefControl<HTMLElement>,
177178
userId: stringExposingStateControl(""),
179+
profileImageUrl: withDefault(
180+
StringStateControl,
181+
"https://via.placeholder.com/120"
182+
),
178183
noVideoText: stringExposingStateControl("No Video"),
179184
};
180185

@@ -299,9 +304,16 @@ let VideoCompBuilder = (function (props) {
299304
<TextContainer
300305
onClick={() => props.onEvent("videoClicked")}
301306
ref={placeholderRef}
302-
style={{ display: `${!showVideo ? "flex" : "none"}` }}
307+
style={{
308+
display: `${!showVideo ? "flex" : "none"}`,
309+
flexDirection: "column",
310+
}}
303311
$style={props.style}
304312
>
313+
<img
314+
style={{ borderRadius: "50%" }}
315+
src={props.profileImageUrl.value}
316+
/>
305317
{userName ?? "No Username"}
306318
</TextContainer>
307319
</>
@@ -321,6 +333,10 @@ let VideoCompBuilder = (function (props) {
321333
<>
322334
<Section name={sectionNames.basic}>
323335
{children.userId.propertyView({ label: trans("meeting.videoId") })}
336+
{children.profileImageUrl.propertyView({
337+
label: trans("meeting.profileImageUrl"),
338+
placeholder: "https://via.placeholder.com/120",
339+
})}
324340
{children.autoHeight.getPropertyView()}
325341
{children.shareScreen.propertyView({
326342
label: trans("meeting.shareScreen"),
@@ -348,5 +364,7 @@ VideoCompBuilder = class extends VideoCompBuilder {
348364

349365
export const VideoMeetingStreamComp = withExposingConfigs(VideoCompBuilder, [
350366
new NameConfig("loading", trans("button.loadingDesc")),
367+
new NameConfig("profileImageUrl", trans("meeting.profileImageUrl")),
368+
351369
...CommonNameConfig,
352370
]);

client/packages/lowcoder/src/i18n/locales/en.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1452,6 +1452,7 @@ export const en = {
14521452
appid: "Application Id",
14531453
meetingName: "Meeting Name",
14541454
videoCompText: "No video Text",
1455+
profileImageUrl: "Profile Image Url",
14551456
right: "Right",
14561457
bottom: "Bottom",
14571458
videoId: "Video Id",

0 commit comments

Comments
 (0)