Skip to content

Commit 662ba57

Browse files
authored
Merge branch 'main' into carocao/RTTWork
2 parents 02434ea + 2b3201a commit 662ba57

10 files changed

+929
-8
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"type": "prerelease",
3+
"area": "feature",
4+
"workstream": "together-mode",
5+
"comment": "together mode component",
6+
"packageName": "@azure/communication-react",
7+
"dependentChangeType": "patch"
8+
}

packages/communication-react/review/beta/communication-react.api.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5568,7 +5568,7 @@ export interface VideoBackgroundReplacementEffect extends BackgroundReplacementC
55685568
export const VideoGallery: (props: VideoGalleryProps) => JSX.Element;
55695569

55705570
// @public (undocumented)
5571-
export type VideoGalleryLayout = 'default' | 'floatingLocalVideo' | 'speaker' | /* @conditional-compile-remove(large-gallery) */ 'largeGallery' | 'focusedContent';
5571+
export type VideoGalleryLayout = 'default' | 'floatingLocalVideo' | 'speaker' | /* @conditional-compile-remove(large-gallery) */ 'largeGallery' | /* @conditional-compile-remove(together-mode) */ 'togetherMode' | 'focusedContent';
55725572

55735573
// @public
55745574
export interface VideoGalleryLocalParticipant extends VideoGalleryParticipant {
@@ -5594,6 +5594,8 @@ export type VideoGalleryParticipant = {
55945594
// @public
55955595
export interface VideoGalleryProps {
55965596
dominantSpeakers?: string[];
5597+
// (undocumented)
5598+
isTogetherModeActive?: boolean;
55975599
layout?: VideoGalleryLayout;
55985600
localParticipant: VideoGalleryLocalParticipant;
55995601
localVideoCameraCycleButtonProps?: LocalVideoCameraCycleButtonProps;
@@ -5603,12 +5605,16 @@ export interface VideoGalleryProps {
56035605
maxRemoteVideoStreams?: number;
56045606
onCreateLocalStreamView?: (options?: VideoStreamOptions) => Promise<void | CreateVideoStreamViewResult>;
56055607
onCreateRemoteStreamView?: (userId: string, options?: VideoStreamOptions) => Promise<void | CreateVideoStreamViewResult>;
5608+
// (undocumented)
5609+
onCreateTogetherModeStreamView?: (options?: VideoStreamOptions) => Promise<void | TogetherModeStreamViewResult>;
56065610
onDisposeLocalScreenShareStreamView?: () => Promise<void>;
56075611
onDisposeLocalStreamView?: () => void;
56085612
onDisposeRemoteScreenShareStreamView?: (userId: string) => Promise<void>;
56095613
// @deprecated (undocumented)
56105614
onDisposeRemoteStreamView?: (userId: string) => Promise<void>;
56115615
onDisposeRemoteVideoStreamView?: (userId: string) => Promise<void>;
5616+
// (undocumented)
5617+
onDisposeTogetherModeStreamView?: () => Promise<void>;
56125618
onForbidAudio?: (userIds: string[]) => Promise<void>;
56135619
onForbidVideo?: (userIds: string[]) => Promise<void>;
56145620
onMuteParticipant?: (userId: string) => Promise<void>;
@@ -5618,8 +5624,11 @@ export interface VideoGalleryProps {
56185624
onRenderAvatar?: OnRenderAvatarCallback;
56195625
onRenderLocalVideoTile?: (localParticipant: VideoGalleryLocalParticipant) => JSX.Element;
56205626
onRenderRemoteVideoTile?: (remoteParticipant: VideoGalleryRemoteParticipant) => JSX.Element;
5627+
// (undocumented)
5628+
onSetTogetherModeSceneSize?: (width: number, height: number) => void;
56215629
onStartLocalSpotlight?: () => Promise<void>;
56225630
onStartRemoteSpotlight?: (userIds: string[]) => Promise<void>;
5631+
onStartTogetherMode?: () => Promise<void>;
56235632
onStopLocalSpotlight?: () => Promise<void>;
56245633
onStopRemoteSpotlight?: (userIds: string[]) => Promise<void>;
56255634
onUnpinParticipant?: (userId: string) => void;
@@ -5632,8 +5641,14 @@ export interface VideoGalleryProps {
56325641
showCameraSwitcherInLocalPreview?: boolean;
56335642
showMuteIndicator?: boolean;
56345643
spotlightedParticipants?: string[];
5644+
// (undocumented)
5645+
startTogetherModeEnabled?: boolean;
56355646
strings?: Partial<VideoGalleryStrings>;
56365647
styles?: VideoGalleryStyles;
5648+
// (undocumented)
5649+
togetherModeSeatingCoordinates?: VideoGalleryTogetherModeParticipantPosition;
5650+
// (undocumented)
5651+
togetherModeStreams?: VideoGalleryTogetherModeStreams;
56375652
videoTilesOptions?: VideoTilesOptions;
56385653
}
56395654

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

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,15 @@ import {
88
VideoGalleryLocalParticipant,
99
VideoGalleryRemoteParticipant
1010
} from '../types';
11+
/* @conditional-compile-remove(together-mode) */
12+
import { VideoGalleryTogetherModeParticipantPosition } from '../types';
1113
import React, { useLayoutEffect, useRef, useState } from 'react';
1214
import { ParticipantVideoTileOverlay } from './VideoGallery/ParticipantVideoTileOverlay';
1315
import { RemoteContentShareReactionOverlay } from './VideoGallery/RemoteContentShareReactionOverlay';
16+
/* @conditional-compile-remove(together-mode) */
17+
import { TogetherModeOverlay } from './TogetherModeOverlay';
18+
/* @conditional-compile-remove(together-mode) */
19+
import { togetherModeMeetingOverlayStyle } from './styles/TogetherMode.styles';
1420

1521
/**
1622
* Reaction overlay component props
@@ -40,6 +46,9 @@ export interface MeetingReactionOverlayProps {
4046
* Remote participant's reaction event.
4147
*/
4248
remoteParticipants?: VideoGalleryRemoteParticipant[];
49+
50+
/* @conditional-compile-remove(together-mode) */
51+
togetherModeSeatPositions?: VideoGalleryTogetherModeParticipantPosition;
4352
}
4453

4554
/**
@@ -68,7 +77,14 @@ const REACTION_EMOJI_RESIZE_SCALE_CONSTANT = 3;
6877
* @internal
6978
*/
7079
export const MeetingReactionOverlay = (props: MeetingReactionOverlayProps): JSX.Element => {
71-
const { overlayMode, reaction, reactionResources, localParticipant, remoteParticipants } = props;
80+
const {
81+
overlayMode,
82+
reaction,
83+
reactionResources,
84+
localParticipant,
85+
remoteParticipants,
86+
/* @conditional-compile-remove(together-mode) */ togetherModeSeatPositions
87+
} = props;
7288
const [emojiSizePx, setEmojiSizePx] = useState(0);
7389
const [divHeight, setDivHeight] = useState(0);
7490
const [divWidth, setDivWidth] = useState(0);
@@ -125,6 +141,24 @@ export const MeetingReactionOverlay = (props: MeetingReactionOverlayProps): JSX.
125141
/>
126142
</div>
127143
);
144+
} else if (props.overlayMode === 'together-mode') {
145+
/* @conditional-compile-remove(together-mode) */
146+
return (
147+
<div
148+
style={{
149+
...togetherModeMeetingOverlayStyle
150+
}}
151+
>
152+
<TogetherModeOverlay
153+
emojiSize={emojiSizePx}
154+
reactionResources={reactionResources}
155+
localParticipant={localParticipant ?? ({} as VideoGalleryLocalParticipant)}
156+
remoteParticipants={remoteParticipants ?? ([] as VideoGalleryRemoteParticipant[])}
157+
togetherModeSeatPositions={togetherModeSeatPositions ?? {}}
158+
/>
159+
</div>
160+
);
161+
return <></>;
128162
} else {
129163
return <></>;
130164
}

0 commit comments

Comments
 (0)