agora-appbuilder-core 4.1.19-beta.2 → 4.1.19-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -77,8 +77,8 @@ const DefaultConfig = {
|
|
|
77
77
|
CHAT_ORG_NAME: "",
|
|
78
78
|
CHAT_APP_NAME: "",
|
|
79
79
|
CHAT_URL: "",
|
|
80
|
-
CLI_VERSION: "3.1.19-beta.
|
|
81
|
-
CORE_VERSION: "4.1.19-beta.
|
|
80
|
+
CLI_VERSION: "3.1.19-beta.3",
|
|
81
|
+
CORE_VERSION: "4.1.19-beta.3",
|
|
82
82
|
DISABLE_LANDSCAPE_MODE: false,
|
|
83
83
|
STT_AUTO_START: false,
|
|
84
84
|
CLOUD_RECORDING_AUTO_START: false,
|
|
@@ -87,6 +87,7 @@ interface UserActionMenuOptionsOptionsProps {
|
|
|
87
87
|
spotlightUid?: UidType;
|
|
88
88
|
setSpotlightUid?: (uid: UidType) => void;
|
|
89
89
|
items?: UserActionMenuItemsConfig;
|
|
90
|
+
extraMenuItems?: ActionMenuItem[];
|
|
90
91
|
}
|
|
91
92
|
|
|
92
93
|
export default function UserActionMenuOptionsOptions(
|
|
@@ -102,7 +103,13 @@ export default function UserActionMenuOptionsOptions(
|
|
|
102
103
|
useState(false);
|
|
103
104
|
const [actionMenuitems, setActionMenuitems] = useState<ActionMenuItem[]>([]);
|
|
104
105
|
const {setSidePanel} = useSidePanel();
|
|
105
|
-
const {
|
|
106
|
+
const {
|
|
107
|
+
user,
|
|
108
|
+
actionMenuVisible,
|
|
109
|
+
setActionMenuVisible,
|
|
110
|
+
spotlightUid,
|
|
111
|
+
extraMenuItems,
|
|
112
|
+
} = props;
|
|
106
113
|
const {currentLayout} = useLayout();
|
|
107
114
|
const {pinnedUid, activeUids, customContent, secondaryPinnedUid} =
|
|
108
115
|
useContent();
|
|
@@ -716,6 +723,24 @@ export default function UserActionMenuOptionsOptions(
|
|
|
716
723
|
items.push(...customItems);
|
|
717
724
|
}
|
|
718
725
|
|
|
726
|
+
if (extraMenuItems?.length) {
|
|
727
|
+
items.push(
|
|
728
|
+
...extraMenuItems.map(item => ({
|
|
729
|
+
...item,
|
|
730
|
+
closeActionMenu: () => {
|
|
731
|
+
item.closeActionMenu?.();
|
|
732
|
+
setActionMenuVisible(false);
|
|
733
|
+
},
|
|
734
|
+
onPress: item.onPress
|
|
735
|
+
? () => {
|
|
736
|
+
item.onPress?.();
|
|
737
|
+
setActionMenuVisible(false);
|
|
738
|
+
}
|
|
739
|
+
: item.onPress,
|
|
740
|
+
})),
|
|
741
|
+
);
|
|
742
|
+
}
|
|
743
|
+
|
|
719
744
|
items.sort((a, b) => (a.order ?? 999) - (b.order ?? 999));
|
|
720
745
|
|
|
721
746
|
setActionMenuitems(items);
|
|
@@ -729,6 +754,8 @@ export default function UserActionMenuOptionsOptions(
|
|
|
729
754
|
secondaryPinnedUid,
|
|
730
755
|
currentLayout,
|
|
731
756
|
spotlightUid,
|
|
757
|
+
extraMenuItems,
|
|
758
|
+
setActionMenuVisible,
|
|
732
759
|
]);
|
|
733
760
|
|
|
734
761
|
const {width: globalWidth, height: globalHeight} = useWindowDimensions();
|
|
@@ -25,6 +25,7 @@ import {
|
|
|
25
25
|
} from './DefaultLayouts';
|
|
26
26
|
import IconButton from '../../atoms/IconButton';
|
|
27
27
|
import UserActionMenuOptionsOptions from '../../components/participants/UserActionMenuOptions';
|
|
28
|
+
import type {ActionMenuItem} from '../../atoms/ActionMenu';
|
|
28
29
|
import {
|
|
29
30
|
isMobileUA,
|
|
30
31
|
isValidReactComponent,
|
|
@@ -60,6 +61,7 @@ export interface VideoRendererProps {
|
|
|
60
61
|
CustomChild?: React.ComponentType;
|
|
61
62
|
avatarRadius?: number;
|
|
62
63
|
hideMenuOptions?: boolean;
|
|
64
|
+
extraMenuItems?: ActionMenuItem[];
|
|
63
65
|
containerStyle?: ViewStyle;
|
|
64
66
|
innerContainerStyle?: ViewStyle;
|
|
65
67
|
}
|
|
@@ -69,6 +71,7 @@ const VideoRenderer: React.FC<VideoRendererProps> = ({
|
|
|
69
71
|
CustomChild,
|
|
70
72
|
avatarRadius = 100,
|
|
71
73
|
hideMenuOptions = false,
|
|
74
|
+
extraMenuItems,
|
|
72
75
|
containerStyle = {},
|
|
73
76
|
innerContainerStyle = {},
|
|
74
77
|
}) => {
|
|
@@ -214,6 +217,7 @@ const VideoRenderer: React.FC<VideoRendererProps> = ({
|
|
|
214
217
|
from={'video-tile'}
|
|
215
218
|
setSpotlightUid={setSpotlightUid}
|
|
216
219
|
spotlightUid={spotlightUid}
|
|
220
|
+
extraMenuItems={extraMenuItems}
|
|
217
221
|
/>
|
|
218
222
|
<PlatformWrapper isHovered={isHovered} setIsHovered={setIsHovered}>
|
|
219
223
|
<View
|