Skip to content

Commit

Permalink
Merge branch 'main' into prerelease-beta-release-beta/1.25.0-beta.1
Browse files Browse the repository at this point in the history
  • Loading branch information
dmceachernmsft authored Feb 28, 2025
2 parents 8b7b7ee + b15b2b0 commit ab63573
Show file tree
Hide file tree
Showing 6 changed files with 193 additions and 41 deletions.
Binary file modified packages/storybook8/public/images/CaptionsBannerRTT.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed packages/storybook8/public/images/RTTModal.png
Binary file not shown.
68 changes: 68 additions & 0 deletions packages/storybook8/stories/Concepts/BreakoutRooms/Docs.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
import { Meta, Source } from '@storybook/addon-docs';
import BreakoutRoomsEventSnippetText from '!!raw-loader!./snippets/BreakoutRoomsUpdatedEvent.snippet.tsx';

<Meta
id="breakout rooms"
title="Concepts/Breakout rooms"
parameters={{ previewTabs: { canvas: { disable: true, hidden: true } } }}
/>

# Breakout Rooms

## Overview

ACS and Team identity users are now ready to be moved into breakout rooms in Teams meetings when the meeting organizer
assigns the ACS or Teams identity user a breakout room and opens that breakout room. ACS and Teams identity users,
however, will not yet have the ability to choose their breakout room when they are granted by meeting organizer. ACS
and Teams identity users can be move into breakout rooms but they will not yet have the ability to create and manage
breakout rooms when they have organizer or co-organizer role.

Click [here](https://support.microsoft.com/en-us/office/use-breakout-rooms-in-microsoft-teams-meetings-7de1f48a-da07-466c-a5ab-4ebace28e461)
to learn more about breakout rooms in Teams meetings and how to create and manage breakout rooms as a Teams user.

## Composites

ACS and Team identity users using the CallComposite and CallWithChatComposite will now be able move to breakout rooms
in Teams meetings. When the meeting organizer assigns a breakout room to an ACS or Teams identity user and that
breakout room is opened, the composite will automatically change the current call to the breakout room. When the
breakout room is closed, the ACS or Teams identity user will automatically be moved back the the main meeting.

There are notifications that will be shown to guide the ACS or Teams identity user through the composite transitions
between the main meeting and breakout room. The notifications are shown when:

- the user's assigned breakout room opens and the user will be automatically moved to the breakout room
- the user's assigned breakout room opens and the user is prompted to join
- the user joins a breakout room
- the user's assigned breakout room is changed while already in a breakout room
- the user is in a breakout room with a time limit and that breakout room is closing soon
- the user is in a breakout room and that breakout room is closed

## Handling breakoutRoomsUpdated events

The [CallAdapter](?path=/docs/composites-adapters--docs#calladapter) and CallWithChatAdapter are able to receive
`breakoutRoomsUpdated` events and allows you to handle these events by defining your own `BreakoutRoomsUpdateListener`
callback. The following code snippet shows an example of a `BreakoutRoomsUpdateListener` that outputs the event to the
browser console.

<Source code={BreakoutRoomsEventSnippetText} />

Note: The `breakoutRoomsUpdated` room event encompasses 4 types: `assignedBreakoutRooms`, `join`,
`breakoutRoomsSettings`, and `breakoutRooms`

## FAQs

### Are breakout rooms supported in calls other than Teams meetings?

No. Breakout rooms is a feature that is currently only available in Teams meetings

### Can ACS or Teams identity users choose their own breakout room to join?

Can ACS or Teams identity users will not yet be able to choose their own breakout room like in Teams. The meeting
organizer must assign the breakout room for the ACS or Teams identity user.

### Where can I learn about managing breakout rooms and their settings?

This [documentation](https://support.microsoft.com/en-us/office/use-breakout-rooms-in-microsoft-teams-meetings-7de1f48a-da07-466c-a5ab-4ebace28e461)
will guide you on everything you need to know about creating and managing breakout rooms as a Teams user.

Note: ACS Web UI Library cannot yet be used to manage breakout rooms and their settings
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
import { AzureCommunicationTokenCredential, CommunicationUserIdentifier } from '@azure/communication-common';
import {
CallAdapter,
CallComposite,
CallCompositeOptions,
CompositeLocale,
useAzureCommunicationCallAdapter
} from '@azure/communication-react';
import { PartialTheme, Theme } from '@fluentui/react';
import React, { useCallback, useMemo } from 'react';

export type ContainerProps = {
userId: CommunicationUserIdentifier;
token: string;
formFactor?: 'desktop' | 'mobile';
fluentTheme?: PartialTheme | Theme;
locale?: CompositeLocale;
options?: CallCompositeOptions;
// Teams user ids need to be in format '28:orgid:<UUID>'. For example, '28:orgid:87d349ed-44d7-43e1-9a83-5f2406dee5bd'
meetingLink: string;
};

export const ContosoCallContainer = (props: ContainerProps): JSX.Element => {
const credential = useMemo(() => {
try {
return new AzureCommunicationTokenCredential(props.token);
} catch {
console.error('Failed to construct token credential');
return undefined;
}
}, [props.token]);

const callAdapterArgs = useMemo(
() => ({
userId: props.userId,
credential,
locator: props.meetingLink
}),
[props.userId, credential, props.meetingLink]
);

const afterCallAdapterCreate = useCallback(async (adapter: CallAdapter): Promise<CallAdapter> => {
adapter.on('breakoutRoomsUpdated', (event) => {
if (event.type === 'assignedBreakoutRooms') {
console.log('Assigned breakout rooms event: ', event);
} else if (event.type === 'join') {
console.log('Breakout rooms join event: ', event);
} else if (event.type === 'breakoutRoomsSettings') {
console.log('Breakout rooms settings event: ', event);
}
});
return adapter;
}, []);

const leaveCall = async (adapter: CallAdapter): Promise<void> => {
await adapter.leaveCall().catch((e) => {
console.error('Failed to leave call', e);
});
};

const adapter = useAzureCommunicationCallAdapter(callAdapterArgs, afterCallAdapterCreate, leaveCall);

if (!props.meetingLink) {
return <>Teams meeting link not provided.</>;
}

if (adapter) {
return (
<div style={{ height: '90vh', width: '90vw' }}>
<CallComposite
adapter={adapter}
formFactor={props.formFactor}
fluentTheme={props.fluentTheme}
locale={props?.locale}
options={props?.options}
/>
</div>
);
}
if (credential === undefined) {
return <>Failed to construct credential. Provided token is malformed.</>;
}
return <>Initializing...</>;
};
78 changes: 38 additions & 40 deletions packages/storybook8/stories/Concepts/RealTimeText/Docs.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { Stack } from '@fluentui/react';
import { Meta } from '@storybook/addon-docs';
import { SingleLineBetaBanner } from '../../BetaBanners/SingleLineBetaBanner';
import { overviewPageImagesStackStyle } from '../../constants';

<Meta title="Concepts/Real-Time Text" />

Expand All @@ -25,11 +23,26 @@ Enhancing Clarity: In noisy environments or situations with audio quality issues

Microsoft is dedicated to accessibility, and the incorporation of Real-Time Text (RTT) supports this commitment by adhering to accessibility standards such as The European Accessibility Act (Directive (EU) 2019/882. This directive requires that voice and video services support RTT by June 2025, ensuring inclusive communication throughout Europe. Voice and video services will not be permitted to operate in Europe or have Europe based customers after June 2025 without RTT, making the inclusion of this feature in the UI Library critically important.

## Incorporating RTT in Your Experience
## How RTT Works in a Call Experience

Real-Time Text (RTT) is tightly integrated into both the communication flow and the UI, ensuring that users can engage in dynamic, real-time conversations.

When a call starts, RTT is not enabled by default. Participants can choose to activate it at any time during the call. To enable RTT, users open the call control bar—usually located at the bottom of the screen—and click on the "More" button, represented by an ellipsis (...). From the menu that appears, selecting the "Start Real-Time Text" option activates RTT for everyone in the call. A notification is displayed to inform all participants that RTT has been turned on and cannot be disabled for the rest of the call.

Real-Time Text is supported by default and are automatically included within the CallComposite and CallWithChatComposite experiences.
<img style={{ width: '100%' }} src="images/StartRTT.png" alt="example of component that can be used for starting RTT" />

Real-Time Text is also supported for component only users.
Once RTT is enabled, participants can type messages in a dedicated text window that appears in the captions area. As each character is typed, it is immediately visible to everyone in real time, creating a natural, continuous flow of communication. This allows both the person typing and other participants to engage with the conversation without waiting for complete messages. RTT can also merge seamlessly with live captions to deliver a unified text experience. This allows users to view both real-time messages and captions in one place, ensuring accessibility and minimal UI clutter.

Although RTT exists in the caption window, it can still be enabled without captions being enabled. Similarly, captions can still be enabled without RTT being enabled. When both captions and RTT are enabled, both captions and RTT messages are displayed in the same interface. RTT messages show a "RTT Typing" tag while they are being composed and then integrate into the captions feed once committed. The design prioritizes usability, making it easy for participants to activate and follow conversations without interruptions.

<img
style={{ width: '100%' }}
src="images/CaptionsBannerRTT.png"
alt="example of Captions Banner with Real-Time Text Enabled"
/>
## Incorporating RTT in Your Experience

RTT is automatically available in the UI Library. RTT is integrated by default within the CallComposite, CallWithChatComposite, and is available to be built using the associated Components. These components automatically manage message display states, typing indicators, and user interaction prompts to deliver a fluid, accessible experience. Developers can use these four components to build their own customer RTT experience.

List of components exported for Real-Time Text:

Expand All @@ -41,41 +54,6 @@ List of components exported for Real-Time Text:

[CaptionsBanner](./?path=/docs/components-captions-banner--docs) is a component that combines and displays captions and Real-Time Text in one banner. Developers and use 'usePropsFor' to gather all the information required to power this component, including the list of Real-Time Text and captions messages in the call. User can also use this component for captions only or Real-Time Text only.

## How to use Real-Time Text

Real-Time Text is automatically included within the CallComposite and CallWithChatComposite experiences.

To turn on Real-Time Text, users need to navigate to the control bar after call is connected, and click on more button. Inside the menu pop up, click on Real-Time Text, then click on Turn on RTT for this call.

Note that Real-Time Text will be enabled for all participants in the call once the first message is sent. It cannot be turned off.

<Stack tokens={{ childrenGap: '3rem' }} style={overviewPageImagesStackStyle}>
<Stack.Item align="center">
<>Using the more menu to turn on Real-Time Text</>
<img
style={{ width: '100%' }}
src="images/StartRTT.png"
alt="example of component that can be used for starting RTT"
/>
</Stack.Item>
<Stack.Item align="center">
<>Real-Time Text Modal showing the disclaimer warning</>
<img
style={{ width: '100%' }}
src="images/RTTModal.png"
alt="example of component that can be used for showing a disclaimer warning that Real-Time Text is enabled for everyone in the call once turned on"
/>
</Stack.Item>
<Stack.Item align="center">
<>Captions Banner with Real-Time Text Enabled</>
<img
style={{ width: '100%' }}
src="images/CaptionsBannerRTT.png"
alt="example of Captions Banner with Real-Time Text Enabled"
/>
</Stack.Item>
</Stack>

## RTT is available in these scenarios

| Call Type | Supported | Notes |
Expand All @@ -89,3 +67,23 @@ Note that Real-Time Text will be enabled for all participants in the call once t

To read more details about the underlying infrastructure, click here:
[Real Time Text (RTT) Overview - An Azure Communication Services concept document | Microsoft Learn](https://learn.microsoft.com/en-us/azure/communication-services/concepts/voice-video-calling/real-time-text)

## FAQ

### How can I enable RTT?

RTT can be enabled during calls via the control bar “more” button.

Enabling RTT opens the RTT window for everyone in the call. When one user enables RTT, other users do not need to enable it for themselves. This window cannot be closed for the duration of the call nor can RTT be disabled.

### When I type a sentence in the RTT window, when does it get sent?

A message is sent when the user explicitly takes an action, such as pressing "Enter," or if no additional text is typed for 3 seconds, at which point the text will automatically commit.

Otherwise, text remains ephemeral as it is being typed, allowing users to see characters appear in real time without immediately committing to a message.

### How does this differ from chat?

Chat is an asynchronous form of messaging that requires a user to type out their whole sentence and commit it before anyone else sees the message. Chat can also be closed or hidden in many calls, giving it a secondary level of prominence.

RTT is a synchronous form of messaging that shows text as it is typed in the main video gallery. The window cannot be hidden or closed, giving it the same level of prominence as speaking would in a call. RTT is also a focused accessibility feature.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ test.describe('JS Bundle Test', () => {

// Flakey test fix: wait for participant list to have finished loading
if (isBetaBuild) {
await page.waitForSelector('[data-ui-id=participant-item]');
const selector = '[data-ui-id="participant-item"]';
const component = page.locator(selector);
await component.waitFor({ state: 'visible' });
}

await page.addScriptTag({
Expand Down

0 comments on commit ab63573

Please sign in to comment.