@azure/communication-react 1.4.3-alpha-202301070013.0 → 1.4.3-alpha-202301080014.0
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/dist/communication-react.d.ts +57 -8
- package/dist/dist-cjs/communication-react/index.js +47 -12
- package/dist/dist-cjs/communication-react/index.js.map +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
- package/dist/dist-esm/communication-react/src/index.d.ts +1 -0
- package/dist/dist-esm/communication-react/src/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery.d.ts +44 -8
- package/dist/dist-esm/react-components/src/components/VideoGallery.js +26 -8
- package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/index.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.d.ts +17 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.d.ts +2 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js +18 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/index.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js +3 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js.map +1 -1
- package/package.json +8 -8
@@ -1238,6 +1238,10 @@ export declare type CallCompositeOptions = {
|
|
1238
1238
|
* if this is not supplied, the composite will not show a unsupported browser page.
|
1239
1239
|
*/
|
1240
1240
|
onEnvironmentInfoTroubleshootingClick?: () => void;
|
1241
|
+
/**
|
1242
|
+
* Remote participant video tile menu options
|
1243
|
+
*/
|
1244
|
+
remoteVideoTileMenu?: RemoteVideoTileMenuOptions;
|
1241
1245
|
};
|
1242
1246
|
|
1243
1247
|
/**
|
@@ -7042,6 +7046,20 @@ export declare interface RemoteVideoStreamState {
|
|
7042
7046
|
view?: VideoStreamRendererViewState;
|
7043
7047
|
}
|
7044
7048
|
|
7049
|
+
/**
|
7050
|
+
* Menu options for remote video tiles in {@link VideoGallery}.
|
7051
|
+
*
|
7052
|
+
* @beta
|
7053
|
+
*/
|
7054
|
+
export declare interface RemoteVideoTileMenuOptions {
|
7055
|
+
/**
|
7056
|
+
* If set to true, remote video tiles in the VideoGallery will not have menu options
|
7057
|
+
*
|
7058
|
+
* @defaultValue false
|
7059
|
+
*/
|
7060
|
+
isHidden?: boolean;
|
7061
|
+
}
|
7062
|
+
|
7045
7063
|
/**
|
7046
7064
|
* @beta
|
7047
7065
|
* The role of a call participant.
|
@@ -8226,22 +8244,23 @@ export declare interface VideoGalleryProps {
|
|
8226
8244
|
*/
|
8227
8245
|
localVideoCameraCycleButtonProps?: LocalVideoCameraCycleButtonProps;
|
8228
8246
|
/**
|
8229
|
-
* List of pinned participant userIds
|
8247
|
+
* List of pinned participant userIds.
|
8230
8248
|
*/
|
8231
8249
|
pinnedParticipants?: string[];
|
8232
8250
|
/**
|
8233
|
-
*
|
8234
|
-
* @defaultValue `true`
|
8235
|
-
*/
|
8236
|
-
showRemoteVideoTileContextualMenu?: boolean;
|
8237
|
-
/**
|
8238
|
-
* This callback will be called when a participant video tile is pinned
|
8251
|
+
* This callback will be called when a participant video tile is pinned.
|
8239
8252
|
*/
|
8240
8253
|
onPinParticipant?: (userId: string) => void;
|
8241
8254
|
/**
|
8242
|
-
* This callback will be called when a participant video tile is un-pinned
|
8255
|
+
* This callback will be called when a participant video tile is un-pinned.
|
8243
8256
|
*/
|
8244
8257
|
onUnpinParticipant?: (userId: string) => void;
|
8258
|
+
/**
|
8259
|
+
* Options for showing the remote video tile menu.
|
8260
|
+
*
|
8261
|
+
* @defaultValue \{ kind: 'contextual' \}
|
8262
|
+
*/
|
8263
|
+
remoteVideoTileMenuOptions?: false | VideoTileContextualMenuProps | VideoTileDrawerMenuProps;
|
8245
8264
|
}
|
8246
8265
|
|
8247
8266
|
/**
|
@@ -8378,6 +8397,36 @@ export declare interface VideoStreamRendererViewState {
|
|
8378
8397
|
*/
|
8379
8398
|
export declare const VideoTile: (props: VideoTileProps) => JSX.Element;
|
8380
8399
|
|
8400
|
+
/**
|
8401
|
+
* Properties for showing contextual menu for remote {@link VideoTile} components in {@link VideoGallery}.
|
8402
|
+
*
|
8403
|
+
* @beta
|
8404
|
+
*/
|
8405
|
+
export declare interface VideoTileContextualMenuProps {
|
8406
|
+
/**
|
8407
|
+
* The menu property kind
|
8408
|
+
*/
|
8409
|
+
kind: 'contextual';
|
8410
|
+
}
|
8411
|
+
|
8412
|
+
/**
|
8413
|
+
* Properties for showing drawer menu on remote {@link VideoTile} long touch in {@link VideoGallery}.
|
8414
|
+
*
|
8415
|
+
* @beta
|
8416
|
+
*/
|
8417
|
+
export declare interface VideoTileDrawerMenuProps {
|
8418
|
+
/**
|
8419
|
+
* The menu property kind
|
8420
|
+
*/
|
8421
|
+
kind: 'drawer';
|
8422
|
+
/**
|
8423
|
+
* The optional id property provided on an element that the drawer menu should render within when a
|
8424
|
+
* remote participant video tile Drawer is shown. If an id is not provided, then a drawer menu will
|
8425
|
+
* render within the VideoGallery component.
|
8426
|
+
*/
|
8427
|
+
hostId?: string;
|
8428
|
+
}
|
8429
|
+
|
8381
8430
|
/**
|
8382
8431
|
* Props for {@link VideoTile}.
|
8383
8432
|
*
|
@@ -158,7 +158,7 @@ const _toCommunicationIdentifier = (id) => {
|
|
158
158
|
// Copyright (c) Microsoft Corporation.
|
159
159
|
// Licensed under the MIT license.
|
160
160
|
// GENERATED FILE. DO NOT EDIT MANUALLY.
|
161
|
-
var telemetryVersion = '1.4.3-alpha-
|
161
|
+
var telemetryVersion = '1.4.3-alpha-202301080014.0';
|
162
162
|
|
163
163
|
// Copyright (c) Microsoft Corporation.
|
164
164
|
/**
|
@@ -10199,6 +10199,13 @@ const PinnedParticipantsLayout = (props) => {
|
|
10199
10199
|
* Currently the Calling JS SDK supports up to 4 remote video streams
|
10200
10200
|
*/
|
10201
10201
|
const DEFAULT_MAX_REMOTE_VIDEO_STREAMS = 4;
|
10202
|
+
/**
|
10203
|
+
* @private
|
10204
|
+
* Default remote video tile menu options
|
10205
|
+
*/
|
10206
|
+
const DEFAULT_REMOTE_VIDEO_TILE_MENU_OPTIONS = {
|
10207
|
+
kind: 'contextual'
|
10208
|
+
};
|
10202
10209
|
/**
|
10203
10210
|
* VideoGallery represents a layout of video tiles for a specific call.
|
10204
10211
|
* It displays a {@link VideoTile} for the local user as well as for each remote participant who has joined the call.
|
@@ -10211,14 +10218,19 @@ const VideoGallery = (props) => {
|
|
10211
10218
|
/* @conditional-compile-remove(pinned-participants) */
|
10212
10219
|
onPinParticipant: onPinParticipantHandler,
|
10213
10220
|
/* @conditional-compile-remove(pinned-participants) */
|
10214
|
-
onUnpinParticipant: onUnpinParticipantHandler
|
10221
|
+
onUnpinParticipant: onUnpinParticipantHandler,
|
10222
|
+
/* @conditional-compile-remove(pinned-participants) */
|
10223
|
+
remoteVideoTileMenuOptions = DEFAULT_REMOTE_VIDEO_TILE_MENU_OPTIONS } = props;
|
10215
10224
|
const ids = useIdentifiers();
|
10216
10225
|
const theme = useTheme();
|
10217
10226
|
const localeStrings = useLocale$1().strings.videoGallery;
|
10218
10227
|
const strings = React.useMemo(() => (Object.assign(Object.assign({}, localeStrings), props.strings)), [localeStrings, props.strings]);
|
10219
|
-
|
10220
|
-
|
10221
|
-
|
10228
|
+
/* @conditional-compile-remove(pinned-participants) */
|
10229
|
+
const drawerMenuHostIdFromProp = remoteVideoTileMenuOptions && remoteVideoTileMenuOptions.kind === 'drawer'
|
10230
|
+
? remoteVideoTileMenuOptions.hostId
|
10231
|
+
: undefined;
|
10232
|
+
/* @conditional-compile-remove(pinned-participants) */
|
10233
|
+
const drawerMenuHostId = reactHooks.useId('drawerMenuHost', drawerMenuHostIdFromProp);
|
10222
10234
|
const shouldFloatLocalVideo = !!(layout === 'floatingLocalVideo' && remoteParticipants.length > 0);
|
10223
10235
|
const containerRef = React.useRef(null);
|
10224
10236
|
const containerWidth = _useContainerWidth(containerRef);
|
@@ -10289,7 +10301,9 @@ const VideoGallery = (props) => {
|
|
10289
10301
|
/* @conditional-compile-remove(PSTN-calls) */
|
10290
10302
|
participantState: participant.state,
|
10291
10303
|
/* @conditional-compile-remove(pinned-participants) */
|
10292
|
-
showRemoteVideoTileContextualMenu:
|
10304
|
+
showRemoteVideoTileContextualMenu: remoteVideoTileMenuOptions && remoteVideoTileMenuOptions.kind === 'contextual',
|
10305
|
+
/* @conditional-compile-remove(pinned-participants) */
|
10306
|
+
drawerMenuHostId: drawerMenuHostId,
|
10293
10307
|
/* @conditional-compile-remove(pinned-participants) */
|
10294
10308
|
onPinParticipant: onPinParticipant,
|
10295
10309
|
/* @conditional-compile-remove(pinned-participants) */
|
@@ -10303,8 +10317,8 @@ const VideoGallery = (props) => {
|
|
10303
10317
|
onRenderAvatar,
|
10304
10318
|
showMuteIndicator,
|
10305
10319
|
strings,
|
10306
|
-
drawerMenuHostId,
|
10307
|
-
/* @conditional-compile-remove(pinned-participants) */
|
10320
|
+
/* @conditional-compile-remove(pinned-participants) */ drawerMenuHostId,
|
10321
|
+
/* @conditional-compile-remove(pinned-participants) */ remoteVideoTileMenuOptions,
|
10308
10322
|
/* @conditional-compile-remove(pinned-participants) */ pinnedParticipants,
|
10309
10323
|
/* @conditional-compile-remove(pinned-participants) */ onPinParticipant,
|
10310
10324
|
/* @conditional-compile-remove(pinned-participants) */ onUnpinParticipant
|
@@ -10355,7 +10369,10 @@ const VideoGallery = (props) => {
|
|
10355
10369
|
}
|
10356
10370
|
return React__default['default'].createElement(DefaultLayout, Object.assign({}, layoutProps));
|
10357
10371
|
}, [layout, layoutProps]);
|
10358
|
-
return (React__default['default'].createElement("div", {
|
10372
|
+
return (React__default['default'].createElement("div", {
|
10373
|
+
/* @conditional-compile-remove(pinned-participants) */
|
10374
|
+
// We don't assign an drawer menu host id to the VideoGallery when a drawerMenuHostId is assigned from props
|
10375
|
+
id: drawerMenuHostIdFromProp ? undefined : drawerMenuHostId, "data-ui-id": ids.videoGallery, ref: containerRef, className: react.mergeStyles(videoGalleryOuterDivStyle, styles === null || styles === void 0 ? void 0 : styles.root) }, videoGalleryLayout));
|
10359
10376
|
};
|
10360
10377
|
|
10361
10378
|
// Copyright (c) Microsoft Corporation.
|
@@ -18609,6 +18626,7 @@ const remoteVideoViewOptions = {
|
|
18609
18626
|
* @private
|
18610
18627
|
*/
|
18611
18628
|
const MediaGallery = (props) => {
|
18629
|
+
var _a;
|
18612
18630
|
const videoGalleryProps = usePropsFor$1(VideoGallery);
|
18613
18631
|
const cameraSwitcherCameras = useSelector$1(localVideoCameraCycleButtonSelector);
|
18614
18632
|
const cameraSwitcherCallback = useHandlers();
|
@@ -18622,11 +18640,26 @@ const MediaGallery = (props) => {
|
|
18622
18640
|
React__default['default'].createElement(AvatarPersona, Object.assign({ userId: userId }, options, { dataProvider: props.onFetchAvatarPersonaData })))));
|
18623
18641
|
}, [props.onFetchAvatarPersonaData]);
|
18624
18642
|
useLocalVideoStartTrigger(!!props.isVideoStreamOn);
|
18643
|
+
/* @conditional-compile-remove(pinned-participants) */
|
18644
|
+
const remoteVideoTileMenuOptions = React.useMemo(() => {
|
18645
|
+
var _a;
|
18646
|
+
return ((_a = props.remoteVideoTileMenuOptions) === null || _a === void 0 ? void 0 : _a.isHidden)
|
18647
|
+
? false
|
18648
|
+
: props.isMobile
|
18649
|
+
? { kind: 'drawer', hostId: props.drawerMenuHostId }
|
18650
|
+
: { kind: 'contextual' };
|
18651
|
+
}, [(_a = props.remoteVideoTileMenuOptions) === null || _a === void 0 ? void 0 : _a.isHidden, props.isMobile, props.drawerMenuHostId]);
|
18625
18652
|
const VideoGalleryMemoized = React.useMemo(() => {
|
18626
18653
|
return (React__default['default'].createElement(VideoGallery, Object.assign({}, videoGalleryProps, { localVideoViewOptions: localVideoViewOptions$2, remoteVideoViewOptions: remoteVideoViewOptions, styles: VideoGalleryStyles, layout: "floatingLocalVideo", showCameraSwitcherInLocalPreview: props.isMobile, localVideoCameraCycleButtonProps: cameraSwitcherProps, onRenderAvatar: onRenderAvatar,
|
18627
18654
|
/* @conditional-compile-remove(pinned-participants) */
|
18628
|
-
|
18629
|
-
}, [
|
18655
|
+
remoteVideoTileMenuOptions: remoteVideoTileMenuOptions })));
|
18656
|
+
}, [
|
18657
|
+
videoGalleryProps,
|
18658
|
+
props.isMobile,
|
18659
|
+
onRenderAvatar,
|
18660
|
+
cameraSwitcherProps,
|
18661
|
+
/* @conditional-compile-remove(pinned-participants) */ remoteVideoTileMenuOptions
|
18662
|
+
]);
|
18630
18663
|
return (React__default['default'].createElement(React__default['default'].Fragment, null,
|
18631
18664
|
React__default['default'].createElement(Announcer, { announcementString: announcerString, ariaLive: 'polite' }),
|
18632
18665
|
VideoGalleryMemoized));
|
@@ -18857,7 +18890,9 @@ const CallPage = (props) => {
|
|
18857
18890
|
/* @conditional-compile-remove(one-to-n-calling) */
|
18858
18891
|
onFetchAvatarPersonaData: onFetchAvatarPersonaData, mobileView: mobileView,
|
18859
18892
|
/* @conditional-compile-remove(one-to-n-calling) */
|
18860
|
-
modalLayerHostId: props.modalLayerHostId, onRenderGalleryContent: () => _isInCall(callStatus) ? (isNetworkHealthy(networkReconnectTileProps.networkReconnectValue) ? (React__default['default'].createElement(MediaGallery, Object.assign({ isMobile: mobileView }, mediaGalleryProps, mediaGalleryHandlers, { onRenderAvatar: onRenderAvatar, onFetchAvatarPersonaData: onFetchAvatarPersonaData,
|
18893
|
+
modalLayerHostId: props.modalLayerHostId, onRenderGalleryContent: () => _isInCall(callStatus) ? (isNetworkHealthy(networkReconnectTileProps.networkReconnectValue) ? (React__default['default'].createElement(MediaGallery, Object.assign({ isMobile: mobileView }, mediaGalleryProps, mediaGalleryHandlers, { onRenderAvatar: onRenderAvatar, onFetchAvatarPersonaData: onFetchAvatarPersonaData,
|
18894
|
+
/* @conditional-compile-remove(pinned-participants) */
|
18895
|
+
remoteVideoTileMenuOptions: options === null || options === void 0 ? void 0 : options.remoteVideoTileMenu, drawerMenuHostId: drawerMenuHostId }))) : (React__default['default'].createElement(NetworkReconnectTile, Object.assign({}, networkReconnectTileProps)))) : (React__default['default'].createElement(React__default['default'].Fragment, null)), dataUiId: 'call-page' }));
|
18861
18896
|
};
|
18862
18897
|
/**
|
18863
18898
|
* @private
|