@azure/communication-react 1.7.1-alpha-202308260012 → 1.7.1-alpha-202308290013
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 +12 -0
- package/dist/dist-cjs/communication-react/index.js +64 -16
- 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/calling-component-bindings/src/utils/videoGalleryUtils.js +3 -1
- package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +7 -0
- package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallContext.d.ts +4 -0
- package/dist/dist-esm/calling-stateful-client/src/CallContext.js +15 -0
- package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/Converter.js +3 -1
- package/dist/dist-esm/calling-stateful-client/src/Converter.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/RemoteVideoStreamSubscriber.d.ts +1 -0
- package/dist/dist-esm/calling-stateful-client/src/RemoteVideoStreamSubscriber.js +17 -0
- package/dist/dist-esm/calling-stateful-client/src/RemoteVideoStreamSubscriber.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ImageGallery.js +4 -2
- package/dist/dist-esm/react-components/src/components/ImageGallery.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ParticipantList.js +2 -2
- package/dist/dist-esm/react-components/src/components/ParticipantList.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery.js +13 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoTile.js +1 -1
- package/dist/dist-esm/react-components/src/components/VideoTile.js.map +1 -1
- package/dist/dist-esm/react-components/src/types/VideoGalleryParticipant.d.ts +5 -0
- package/dist/dist-esm/react-components/src/types/VideoGalleryParticipant.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/RaiseHand.js +11 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/RaiseHand.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallControls.styles.js +1 -6
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallControls.styles.js.map +1 -1
- package/package.json +8 -8
@@ -8548,6 +8548,13 @@ export declare interface RemoteVideoStreamState {
|
|
8548
8548
|
* API. This can be undefined if the stream has not yet been rendered and defined after createView creates the view.
|
8549
8549
|
*/
|
8550
8550
|
view?: VideoStreamRendererViewState;
|
8551
|
+
/**
|
8552
|
+
* Proxy of {@link @azure/communication-calling#RemoteVideoStream.size}.
|
8553
|
+
*/
|
8554
|
+
streamSize?: {
|
8555
|
+
width: number;
|
8556
|
+
height: number;
|
8557
|
+
};
|
8551
8558
|
}
|
8552
8559
|
|
8553
8560
|
/**
|
@@ -10061,6 +10068,11 @@ export declare interface VideoGalleryStream {
|
|
10061
10068
|
renderElement?: HTMLElement;
|
10062
10069
|
/** Scaling mode of the video stream */
|
10063
10070
|
scalingMode?: ViewScalingMode;
|
10071
|
+
/** Stream Size of the video stream */
|
10072
|
+
streamSize?: {
|
10073
|
+
width: number;
|
10074
|
+
height: number;
|
10075
|
+
};
|
10064
10076
|
}
|
10065
10077
|
|
10066
10078
|
/**
|
@@ -178,7 +178,7 @@ const _isValidIdentifier = (identifier) => {
|
|
178
178
|
// Copyright (c) Microsoft Corporation.
|
179
179
|
// Licensed under the MIT license.
|
180
180
|
// GENERATED FILE. DO NOT EDIT MANUALLY.
|
181
|
-
var telemetryVersion = '1.7.1-alpha-
|
181
|
+
var telemetryVersion = '1.7.1-alpha-202308290013';
|
182
182
|
|
183
183
|
// Copyright (c) Microsoft Corporation.
|
184
184
|
/**
|
@@ -1578,7 +1578,9 @@ function convertSdkRemoteStreamToDeclarativeRemoteStream(stream) {
|
|
1578
1578
|
isAvailable: stream.isAvailable,
|
1579
1579
|
/* @conditional-compile-remove(video-stream-is-receiving-flag) */
|
1580
1580
|
isReceiving: stream.isReceiving,
|
1581
|
-
view: undefined
|
1581
|
+
view: undefined,
|
1582
|
+
/* @conditional-compile-remove(pinned-participants) */
|
1583
|
+
streamSize: stream.size
|
1582
1584
|
};
|
1583
1585
|
}
|
1584
1586
|
/**
|
@@ -2168,6 +2170,21 @@ class CallContext$2 {
|
|
2168
2170
|
}
|
2169
2171
|
});
|
2170
2172
|
}
|
2173
|
+
/* @conditional-compile-remove(pinned-participants) */
|
2174
|
+
setRemoteVideoStreamSize(callId, participantKey, streamId, size) {
|
2175
|
+
this.modifyState((draft) => {
|
2176
|
+
const call = draft.calls[this._callIdHistory.latestCallId(callId)];
|
2177
|
+
if (call) {
|
2178
|
+
const participant = call.remoteParticipants[participantKey];
|
2179
|
+
if (participant) {
|
2180
|
+
const stream = participant.videoStreams[streamId];
|
2181
|
+
if (stream) {
|
2182
|
+
stream.streamSize = size;
|
2183
|
+
}
|
2184
|
+
}
|
2185
|
+
}
|
2186
|
+
});
|
2187
|
+
}
|
2171
2188
|
setRemoteVideoStreams(callId, participantKey, addRemoteVideoStream, removeRemoteVideoStream) {
|
2172
2189
|
this.modifyState((draft) => {
|
2173
2190
|
const call = draft.calls[this._callIdHistory.latestCallId(callId)];
|
@@ -2617,12 +2634,16 @@ class RemoteVideoStreamSubscriber {
|
|
2617
2634
|
this._remoteVideoStream.on('isAvailableChanged', this.isAvailableChanged);
|
2618
2635
|
/* @conditional-compile-remove(video-stream-is-receiving-flag) */
|
2619
2636
|
this._remoteVideoStream.on('isReceivingChanged', this.isReceivingChanged);
|
2637
|
+
/* @conditional-compile-remove(pinned-participants) */
|
2638
|
+
this._remoteVideoStream.on('sizeChanged', this.isSizeChanged);
|
2620
2639
|
this.checkAndUpdateScreenShareState();
|
2621
2640
|
};
|
2622
2641
|
this.unsubscribe = () => {
|
2623
2642
|
this._remoteVideoStream.off('isAvailableChanged', this.isAvailableChanged);
|
2624
2643
|
/* @conditional-compile-remove(video-stream-is-receiving-flag) */
|
2625
2644
|
this._remoteVideoStream.off('isReceivingChanged', this.isReceivingChanged);
|
2645
|
+
/* @conditional-compile-remove(pinned-participants) */
|
2646
|
+
this._remoteVideoStream.off('sizeChanged', this.isSizeChanged);
|
2626
2647
|
};
|
2627
2648
|
this.includesActiveScreenShareStream = (streams) => {
|
2628
2649
|
for (const stream of Object.values(streams)) {
|
@@ -2675,6 +2696,19 @@ class RemoteVideoStreamSubscriber {
|
|
2675
2696
|
this.isReceivingChanged = () => {
|
2676
2697
|
this._context.setRemoteVideoStreamIsReceiving(this._callIdRef.callId, this._participantKey, this._remoteVideoStream.id, this._remoteVideoStream.isReceiving);
|
2677
2698
|
};
|
2699
|
+
/* @conditional-compile-remove(pinned-participants) */
|
2700
|
+
this.isSizeChanged = () => {
|
2701
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
2702
|
+
if (((_a = this._remoteVideoStream) === null || _a === void 0 ? void 0 : _a.size.width) === 0 && ((_b = this._remoteVideoStream) === null || _b === void 0 ? void 0 : _b.size.height) === 0) {
|
2703
|
+
return;
|
2704
|
+
}
|
2705
|
+
const streamSize = (_e = (_d = (_c = this._context.getState().calls[this._callIdRef.callId]) === null || _c === void 0 ? void 0 : _c.remoteParticipants[this._participantKey]) === null || _d === void 0 ? void 0 : _d.videoStreams[this._remoteVideoStream.id]) === null || _e === void 0 ? void 0 : _e.streamSize;
|
2706
|
+
const existingAspectRatio = streamSize ? streamSize.width / streamSize.height : undefined;
|
2707
|
+
const newAspectRatio = ((_f = this._remoteVideoStream) === null || _f === void 0 ? void 0 : _f.size.width) / ((_g = this._remoteVideoStream) === null || _g === void 0 ? void 0 : _g.size.height);
|
2708
|
+
if (!streamSize || existingAspectRatio !== newAspectRatio) {
|
2709
|
+
this._context.setRemoteVideoStreamSize(this._callIdRef.callId, this._participantKey, this._remoteVideoStream.id, this._remoteVideoStream.size);
|
2710
|
+
}
|
2711
|
+
};
|
2678
2712
|
this._callIdRef = callIdRef;
|
2679
2713
|
this._participantKey = participantKey;
|
2680
2714
|
this._remoteVideoStream = remoteVideoStream;
|
@@ -8740,10 +8774,12 @@ const ImageGallery = (props) => {
|
|
8740
8774
|
// Ensure when the focus trap has focus, the light dismiss area can still be clicked with mouse to dismiss.
|
8741
8775
|
// Note: this still correctly captures keyboard focus, this just allows mouse click outside of the focus trap.
|
8742
8776
|
isClickableOutsideFocusTrap: true, className: react.mergeStyles(bodyFocusZone) },
|
8743
|
-
React__default['default'].createElement("img", { src: image.imageUrl, className: react.mergeStyles(imageStyle), alt: image.altText || 'image', "aria-label": 'image-gallery-main-image', onError: (event) => {
|
8777
|
+
React__default['default'].createElement("img", { src: image.imageUrl, className: react.mergeStyles(imageStyle), alt: image.altText || 'image', "aria-label": 'image-gallery-main-image', "aria-live": 'polite', onError: (event) => {
|
8744
8778
|
setIsImageLoaded(false);
|
8745
8779
|
onError && onError(event);
|
8746
|
-
}, onClick: (event) => event.stopPropagation(),
|
8780
|
+
}, onClick: (event) => event.stopPropagation(), onDoubleClick: (event) => {
|
8781
|
+
event.persist();
|
8782
|
+
} }))));
|
8747
8783
|
};
|
8748
8784
|
return (React__default['default'].createElement(react.Modal, { titleAriaId: image.title, isOpen: isOpen, onDismiss: onDismiss, overlay: { styles: Object.assign({}, overlayStyles(theme, isDarkTheme)) }, styles: { main: focusTrapZoneStyle, scrollableContent: scrollableContentStyle }, isDarkOverlay: true },
|
8749
8785
|
renderHeaderBar(),
|
@@ -11402,9 +11438,9 @@ const onRenderParticipantDefault = (participant, strings, myUserId, onRenderAvat
|
|
11402
11438
|
return (React__default['default'].createElement(react.Stack, { horizontal: true, tokens: { childrenGap: '0.5rem' } },
|
11403
11439
|
/* @conditional-compile-remove(raise-hand) */ callingParticipant.raisedHand && (React__default['default'].createElement(react.Stack, { horizontal: true, tokens: { childrenGap: '0.2rem' }, style: {
|
11404
11440
|
alignItems: 'center',
|
11405
|
-
padding: '0.2rem',
|
11441
|
+
padding: '0.1rem 0.2rem',
|
11406
11442
|
backgroundColor: theme === null || theme === void 0 ? void 0 : theme.palette.neutralLighter,
|
11407
|
-
borderRadius: '
|
11443
|
+
borderRadius: '0.3rem'
|
11408
11444
|
} },
|
11409
11445
|
callingParticipant.raisedHand.raisedHandOrderPosition && (React__default['default'].createElement(react.Stack.Item, null,
|
11410
11446
|
React__default['default'].createElement(react.Text, null, (_a = callingParticipant.raisedHand) === null || _a === void 0 ? void 0 : _a.raisedHandOrderPosition))),
|
@@ -12356,7 +12392,7 @@ const VideoTile = (props) => {
|
|
12356
12392
|
children && (React__default['default'].createElement(react.Stack, { className: react.mergeStyles(overlayContainerStyles, styles === null || styles === void 0 ? void 0 : styles.overlayContainer) }, children)),
|
12357
12393
|
/* @conditional-compile-remove(raise-hand) */ raisedHand && canShowLabel && (React__default['default'].createElement(react.Stack, { horizontal: true, tokens: { childrenGap: '0.2rem' }, style: {
|
12358
12394
|
alignItems: 'center',
|
12359
|
-
padding: '0.2rem',
|
12395
|
+
padding: '0.2rem 0.3rem',
|
12360
12396
|
backgroundColor: theme.palette.white,
|
12361
12397
|
opacity: 0.9,
|
12362
12398
|
borderRadius: '1rem',
|
@@ -14960,7 +14996,18 @@ const VideoGallery = (props) => {
|
|
14960
14996
|
const remoteVideoStream = participant.videoStream;
|
14961
14997
|
/* @conditional-compile-remove(pinned-participants) */
|
14962
14998
|
const isPinned = pinnedParticipants === null || pinnedParticipants === void 0 ? void 0 : pinnedParticipants.includes(participant.userId);
|
14963
|
-
|
14999
|
+
const createViewOptions = () => {
|
15000
|
+
var _a, _b;
|
15001
|
+
/* @conditional-compile-remove(pinned-participants) */
|
15002
|
+
return (remoteVideoStream === null || remoteVideoStream === void 0 ? void 0 : remoteVideoStream.streamSize) &&
|
15003
|
+
((_a = remoteVideoStream.streamSize) === null || _a === void 0 ? void 0 : _a.height) > ((_b = remoteVideoStream.streamSize) === null || _b === void 0 ? void 0 : _b.width)
|
15004
|
+
? {
|
15005
|
+
scalingMode: 'Fit',
|
15006
|
+
isMirrored: remoteVideoViewOptions === null || remoteVideoViewOptions === void 0 ? void 0 : remoteVideoViewOptions.isMirrored
|
15007
|
+
}
|
15008
|
+
: remoteVideoViewOptions;
|
15009
|
+
};
|
15010
|
+
return (React__default['default'].createElement(_RemoteVideoTile, { key: participant.userId, userId: participant.userId, remoteParticipant: participant, onCreateRemoteStreamView: isVideoParticipant ? onCreateRemoteStreamView : undefined, onDisposeRemoteStreamView: isVideoParticipant ? onDisposeRemoteVideoStreamView : undefined, isAvailable: isVideoParticipant ? remoteVideoStream === null || remoteVideoStream === void 0 ? void 0 : remoteVideoStream.isAvailable : false, isReceiving: isVideoParticipant ? remoteVideoStream === null || remoteVideoStream === void 0 ? void 0 : remoteVideoStream.isReceiving : false, renderElement: isVideoParticipant ? remoteVideoStream === null || remoteVideoStream === void 0 ? void 0 : remoteVideoStream.renderElement : undefined, remoteVideoViewOptions: isVideoParticipant && createViewOptions() ? createViewOptions() : undefined, onRenderAvatar: onRenderAvatar, showMuteIndicator: showMuteIndicator, strings: strings,
|
14964
15011
|
/* @conditional-compile-remove(PSTN-calls) */
|
14965
15012
|
participantState: participant.state,
|
14966
15013
|
/* @conditional-compile-remove(pinned-participants) */
|
@@ -17736,7 +17783,9 @@ const convertRemoteVideoStreamToVideoGalleryStream = (stream) => {
|
|
17736
17783
|
isMirrored: (_a = stream.view) === null || _a === void 0 ? void 0 : _a.isMirrored,
|
17737
17784
|
renderElement: (_b = stream.view) === null || _b === void 0 ? void 0 : _b.target,
|
17738
17785
|
/* @conditional-compile-remove(pinned-participants) */
|
17739
|
-
scalingMode: (_c = stream.view) === null || _c === void 0 ? void 0 : _c.scalingMode
|
17786
|
+
scalingMode: (_c = stream.view) === null || _c === void 0 ? void 0 : _c.scalingMode,
|
17787
|
+
/* @conditional-compile-remove(pinned-participants) */
|
17788
|
+
streamSize: stream.streamSize
|
17740
17789
|
};
|
17741
17790
|
};
|
17742
17791
|
/** @private */
|
@@ -23484,12 +23533,7 @@ const SendDtmfDialpad = (props) => {
|
|
23484
23533
|
/** @private */
|
23485
23534
|
const controlBarContainerStyles = {
|
23486
23535
|
paddingTop: '0.25rem',
|
23487
|
-
paddingBottom: '0.25rem'
|
23488
|
-
// @TODO: this should be exposed through a custom CallComposite Theme API that extends the fluent theme with semantic values
|
23489
|
-
boxShadow: `
|
23490
|
-
0px 6.400000095367432px 14.399999618530273px 0px #00000021;
|
23491
|
-
0px 1.2000000476837158px 3.5999999046325684px 0px #0000001A;
|
23492
|
-
`
|
23536
|
+
paddingBottom: '0.25rem'
|
23493
23537
|
};
|
23494
23538
|
|
23495
23539
|
// Copyright (c) Microsoft Corporation.
|
@@ -23578,8 +23622,12 @@ const callArrangementContainerStyles = (verticalControlBar) => {
|
|
23578
23622
|
/** @private */
|
23579
23623
|
const RaiseHand = (props) => {
|
23580
23624
|
const raiseHandButtonProps = usePropsFor$1(RaiseHandButton);
|
23625
|
+
const callStatus = useSelector$1(getCallStatus);
|
23581
23626
|
const styles = React.useMemo(() => { var _a; return concatButtonBaseStyles((_a = props.styles) !== null && _a !== void 0 ? _a : {}); }, [props.styles]);
|
23582
|
-
|
23627
|
+
let raiseHandButtonDisabled = isDisabled(props.option);
|
23628
|
+
if (_isInLobbyOrConnecting(callStatus)) {
|
23629
|
+
raiseHandButtonDisabled = true;
|
23630
|
+
}
|
23583
23631
|
return (React__default['default'].createElement(RaiseHandButton, Object.assign({ "data-ui-id": "call-composite-raisehand-button" }, raiseHandButtonProps, { showLabel: props.displayType !== 'compact', disabled: raiseHandButtonDisabled || props.disabled, styles: styles })));
|
23584
23632
|
};
|
23585
23633
|
/* @conditional-compile-remove(raise-hand) */
|