Skip to content

Commit 885ab06

Browse files
[Bugfix] PiPiP Stop scaling mode popup (#4652)
* add long touch prop to disable scaling for pip * Change files
1 parent 79c7405 commit 885ab06

4 files changed

Lines changed: 33 additions & 5 deletions

File tree

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"type": "patch",
3+
"area": "fix",
4+
"workstream": "PiPiP",
5+
"comment": "Remove scaling options for PiPiP in the people and chat panes to stop surprise popup controls",
6+
"packageName": "@azure/communication-react",
7+
"email": "94866715+dmceachernmsft@users.noreply.github.com",
8+
"dependentChangeType": "patch"
9+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"type": "patch",
3+
"area": "fix",
4+
"workstream": "PiPiP",
5+
"comment": "Remove scaling options for PiPiP in the people and chat panes to stop surprise popup controls",
6+
"packageName": "@azure/communication-react",
7+
"email": "94866715+dmceachernmsft@users.noreply.github.com",
8+
"dependentChangeType": "patch"
9+
}

packages/react-components/src/components/RemoteVideoTile.tsx

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ export const _RemoteVideoTile = React.memo(
7070
disablePinMenuItem?: boolean;
7171
toggleAnnouncerString?: (announcerString: string) => void;
7272
reactionResources?: ReactionResources;
73+
onLongTouch?: (() => void) | undefined;
7374
}) => {
7475
const {
7576
isAvailable,
@@ -238,10 +239,15 @@ export const _RemoteVideoTile = React.memo(
238239
participantState={participantState}
239240
{...videoTileContextualMenuProps}
240241
isPinned={props.isPinned}
241-
onLongTouch={() =>
242-
setDrawerMenuItemProps(
243-
convertContextualMenuItemsToDrawerMenuItemProps(contextualMenuProps, () => setDrawerMenuItemProps([]))
244-
)
242+
onLongTouch={
243+
props.onLongTouch
244+
? props.onLongTouch
245+
: () =>
246+
setDrawerMenuItemProps(
247+
convertContextualMenuItemsToDrawerMenuItemProps(contextualMenuProps, () =>
248+
setDrawerMenuItemProps([])
249+
)
250+
)
245251
}
246252
/* @conditional-compile-remove(spotlight) */
247253
isSpotlighted={isSpotlighted}

packages/react-composites/src/composites/CallComposite/components/LocalAndRemotePIP.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,11 @@ export const LocalAndRemotePIP = (props: LocalAndRemotePIPProps): JSX.Element =>
115115
const primaryTileProps: _PictureInPictureInPictureTileProps = useMemo(
116116
() => ({
117117
children: remoteVideoTileProps ? (
118-
<_RemoteVideoTile {...remoteVideoTileProps} strings={locale.component.strings.videoGallery} />
118+
<_RemoteVideoTile
119+
{...remoteVideoTileProps}
120+
strings={locale.component.strings.videoGallery}
121+
onLongTouch={() => {}}
122+
/>
119123
) : (
120124
<_LocalVideoTile {...localVideoTileProps} />
121125
),

0 commit comments

Comments
 (0)