Skip to content

Commit 963aebb

Browse files
authored
Merge pull request #280786 from garchiro7/closed-captions-ui-native
Add closed captions support into UI library
2 parents 2f8b2e7 + 0c960c6 commit 963aebb

File tree

9 files changed

+197
-0
lines changed

9 files changed

+197
-0
lines changed
886 KB
Loading

articles/communication-services/concepts/ui-library/includes/mobile-ui-use-cases.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ You can use the call composite in Communication Services to create these use cas
2222
| [Teams interoperability](../../teams-interop.md) | Join the call lobby |
2323
| | Display a transcription and recording alert banner |
2424
| | Admit/Reject lobby participants |
25+
| Closed Captions | Teams interoperability |
26+
| | Group call, Rooms call, and 1:1 call |
2527
| Participant gallery | Show remote participants on a grid |
2628
| | Make video preview available throughout a call for a local user |
2729
| | Make default avatars available when video is off |
@@ -69,6 +71,17 @@ The distinction between each role lies in the capabilities they possess during a
6971
> [!NOTE]
7072
> The Rooms API serves the purpose of creating rooms, managing users, and adjusting the lifetime of rooms. It is important to note that the Rooms API is a back-end service that is separate from the UI Library.
7173
74+
### Closed captions
75+
76+
Closed captions enable a wide range of scenarios, including interoperability with Teams, Azure Communication Services Group calls, Rooms calls, and one-on-one calls. This feature ensures that users can follow along with conversations in various calling environments, **enhancing accessibility** and user experience. However, it's important to note that users need to manually select the language for captions using the UI Library out of the box, as the system doesn't automatically detect the spoken language.
77+
78+
:::image type="content" source="mobile-ui-closed-captions.png" alt-text="Screenshot that shows the experience of closed captions integration in the UI Library.":::
79+
80+
> [!NOTE]
81+
>Closed Captions will not be billed at the beginning of its Public Preview. This is for a limited time only, usage of Captions will likely be billed starting from June.
82+
83+
If you're looking more detailed information about closed captions, feel free to visit [the documentation](../../voice-video-calling/closed-captions.md) to review explanations and usage guidelines. Additionally, if you want to jump directly into the configuration of closed captions directly within the UI Library, you can follow our [tutorial](../../../how-tos/ui-library-sdk/closed-captions.md) for easy setup.
84+
7285
### View shared content
7386

7487
Through the UI Library for mobile native platforms, call participants can view shared content when other participants share their screens during a Teams call. A remote participant can use stretch and pinch gestures to zoom in or out on the shared content in the call.

articles/communication-services/concepts/voice-video-calling/closed-captions.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,4 @@ Microsoft indicates to you via the Azure Communication Services API that recordi
4646

4747
- Get started with a [Closed Captions Quickstart](../../quickstarts/voice-video-calling/get-started-with-closed-captions.md)
4848
- Learn more about using closed captions in [Teams interop](../interop/enable-closed-captions.md) scenarios.
49+
- Learn more about the [UI Library](../ui-library/ui-library-overview.md).

articles/communication-services/how-tos/calling-sdk/closed-captions-teams-interop-how-to.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,4 @@ For more information, see the following articles:
4343
- Learn about [Voice](./manage-calls.md) and [Video calling](./manage-video.md).
4444
- Learn about [Teams interoperability](./teams-interoperability.md).
4545
- Learn more about Microsoft Teams [live translated captions](https://support.microsoft.com//office/use-live-captions-in-a-teams-meeting-4be2d304-f675-4b57-8347-cbd000a21260).
46+
- Learn more about the [UI Library](../../concepts//ui-library/ui-library-overview.md).
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
---
2+
title: Enable scenarios using closed captions and the UI Library
3+
titleSuffix: An Azure Communication Services how-to guide
4+
description: Enable scenarios using closed captions and Azure Communication Services UI Library.
5+
author: garchiro7
6+
ms.author: jorgegarc
7+
ms.service: azure-communication-services
8+
ms.subservice: calling
9+
ms.topic: how-to
10+
ms.date: 07/01/2024
11+
ms.custom: references_regions
12+
zone_pivot_groups: acs-plat-ios-android
13+
14+
#Customer intent: As a developer, I want setup closed captions into a call using the UI Library.
15+
---
16+
17+
# Closed captions
18+
19+
Closed captions play a critical role in video voice calling apps, providing numerous benefits that enhance the accessibility, usability, and overall user experience of these platforms.
20+
21+
In this article, you learn how to enable closed captions scenarios using the UI Library. There's two main scenarios to enable closed captions: Azure Communication Services video and voice calls and Interop calls.
22+
23+
## Azure Communication Service based captions
24+
25+
Supported for calls involving Azure Communication Service users only. Currently, Azure Communication Service captions **do not support language translation**.
26+
27+
## Teams Interop closed captions
28+
29+
Supported during calls with one or more Teams users.
30+
31+
### Translation support
32+
33+
Unlike Azure Communication Service closed captions, Teams Interop closed captions support translation. Users can opt to have closed captions translated into a different language through the captions settings.
34+
35+
## How to use captions
36+
37+
Captions are seamlessly integrated within the `CallingUILibrary`.
38+
39+
1. **Activate captions**:
40+
- During a connected call, navigate to the control bar and click the **more button**.
41+
- In the menu pop-up, toggle to turn on captions.
42+
43+
2. **Adjust spoken language**:
44+
- If a different language is being used in the meeting, users can change the spoken language via the UI. This change applies to all users in the call.
45+
46+
3. **Set caption language** (for Teams Interop Closed Captions):
47+
- By default, live captions are displayed in the meeting or event spoken language. Live translated captions allow users to see captions translated into the language they’re most comfortable with.
48+
- Change the caption language by clicking on the **Captions language** button after captions start, if translation to a different language is desired.
49+
50+
:::image type="content" source="./includes/closed-captions/mobile-ui-closed-captions.png" alt-text="Screenshot that shows the experience of closed captions integration in the UI Library.":::
51+
52+
> [!NOTE]
53+
> Live translated captions in meetings are only available as part of [**Teams Premium**](https://learn.microsoft.com/MicrosoftTeams/teams-add-on-licensing/licensing-enhance-teams#meetings), an add-on license that provides additional features to make Teams meetings more personalized, intelligent, and secure. To get access to Teams Premium, contact your IT admin. More details you can find it [here](../calling-sdk/closed-captions-teams-interop-how-to.md).
54+
55+
## Supported languages
56+
57+
Azure Communication Services supports various spoken languages for captions. The next table contains the list of supported language codes that you can use with the `setSpokenLanguage` method to set the desired language for captions.
58+
59+
| Language | ACS Spoken Code | Teams Spoken Code | Teams Captions Code |
60+
|-----------------------|-----------------|-------------------|--------------------|
61+
| Arabic | ar-ae, ar-sa | ar-ae, ar-sa | ar |
62+
| Danish | da-dk | da-dk | da |
63+
| German | de-de | de-de | de |
64+
| English | en-au, en-ca, en-gb, en-in, en-nz, en-us | en-au, en-ca, en-gb, en-in, en-nz, en-us | en |
65+
| Spanish | es-es, es-mx | es-es, es-mx | es |
66+
| Finnish | fi-fi | fi-fi | fi |
67+
| French | fr-ca, fr-fr | fr-ca, fr-fr | fr, fr-ca |
68+
| Hindi | hi-in | hi-in | hi |
69+
| Italian | it-it | it-it | it |
70+
| Japanese | ja-jp | ja-jp | ja |
71+
| Korean | ko-kr | ko-kr | ko |
72+
| Norwegian | nb-no | nb-no | nb |
73+
| Dutch | nl-be, nl-nl | nl-be, nl-nl | nl |
74+
| Polish | pl-pl | pl-pl | pl |
75+
| Portuguese | pt-br | pt-br, pt-pt | pt, pt-pt |
76+
| Russian | ru-ru | ru-ru | ru |
77+
| Swedish | sv-se | sv-se | sv |
78+
| Chinese | zh-cn, zh-hk | zh-cn, zh-hk | zh-Hans, zh-Hant |
79+
| Czech || cs-cz | cs |
80+
| Slovak || sk-sk | sk |
81+
| Turkish || tr-tr | tr |
82+
| Vietnamese || vi-vn | vi |
83+
| Thai || th-th | th |
84+
| Hebrew || he-il | he |
85+
| Welsh || cy-gb | cy |
86+
| Ukrainian || uk-ua | uk |
87+
| Greek || el-gr | el |
88+
| Hungarian || hu-hu | hu |
89+
| Romanian || ro-ro | ro |
90+
91+
Ensure the spoken language selected matches the language used in the call to accurately generate captions.
92+
93+
## Prerequisites
94+
95+
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
96+
- A deployed Communication Services resource. [Create a Communication Services resource](../../quickstarts/create-communication-resource.md).
97+
- A user access token to enable the call client. [Get a user access token](../../quickstarts/access-tokens.md).
98+
- Optional: Completion of the [quickstart for getting started with the UI Library composites](../../quickstarts/ui-library/get-started-composites.md).
99+
100+
## Set up the feature
101+
102+
::: zone pivot="platform-android"
103+
[!INCLUDE [Enable closed captions in the Android UI Library](./includes/closed-captions/android.md)]
104+
::: zone-end
105+
106+
::: zone pivot="platform-ios"
107+
[!INCLUDE [Enable closed captions in the iOS UI Library](./includes/closed-captions/ios.md)]
108+
::: zone-end
109+
110+
## Next steps
111+
112+
- [Learn more about the UI Library](../../concepts/ui-library/ui-library-overview.md)
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
description: description: Enable scenarios using closed captions and the UI Library in Android
3+
author: garchiro7
4+
5+
ms.author: jorgegarc
6+
ms.date: 07/01/2024
7+
ms.topic: include
8+
ms.service: azure-communication-services
9+
---
10+
11+
### Enable closed captions
12+
13+
The method `setCaptionsOn` is configured to start captions by default.
14+
15+
#### [Kotlin](#tab/kotlin)
16+
17+
```kotlin
18+
val captionsOptions = CallCompositeCaptionsOptions()
19+
captionsOptions.setCaptionsOn(true)
20+
captionsOptions.setSpokenLanguage("en-US")
21+
22+
val localOptions = CallCompositeLocalOptions()
23+
localOptions.setCaptionsOptions(captionsOptions)
24+
25+
```
26+
27+
#### [Java](#tab/java)
28+
29+
```java
30+
CallCompositeCaptionsOptions captionsOptions = new CallCompositeCaptionsOptions();
31+
captionsOptions.setCaptionsOn(true);
32+
captionsOptions.setSpokenLanguage("en-us");
33+
34+
CallCompositeLocalOptions localOptions = new CallCompositeLocalOptions();
35+
localOptions.setCaptionsOptions(captionsOptions);
36+
```
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
description: Enable scenarios using closed captions and the UI Library in iOS
3+
author: garchiro7
4+
5+
ms.author: jorgegarc
6+
ms.date: 07/01/2024
7+
ms.topic: include
8+
ms.service: azure-communication-services
9+
---
10+
11+
### Enable closed captions
12+
13+
The method `captionsOn` is configured to start captions by default.
14+
15+
```swift
16+
let captionsOptions = CaptionsOptions(
17+
captionsOn: true,
18+
spokenLanguage: "en-US"
19+
)
20+
21+
let localOptions = LocalOptions(
22+
participantViewData: participantViewData,
23+
setupScreenViewData: setupScreenViewData,
24+
cameraOn: false,
25+
microphoneOn: false,
26+
skipSetupScreen: false,
27+
audioVideoMode: .audioAndVideo,
28+
captionsOptions: captionsOptions
29+
)
30+
31+
```
32+
886 KB
Loading

articles/communication-services/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,8 @@ items:
430430
items:
431431
- name: Configure default orientation
432432
href: how-tos/ui-library-sdk/orientation.md
433+
- name: Configure closed captions
434+
href: how-tos/ui-library-sdk/closed-captions.md
433435
- name: Configure theming
434436
href: how-tos/ui-library-sdk/theming.md
435437
- name: Disable end call confirmation

0 commit comments

Comments
 (0)