Skip to content

Commit 2466da7

Browse files
author
Jill Grant
authored
Merge pull request #267457 from cdpark/howto-token-read-math
User Story 201187: Q&M: Freshness pass for Immersive Reader -- "How to" token read math
2 parents 6462082 + 5c50a53 commit 2466da7

File tree

4 files changed

+50
-50
lines changed

4 files changed

+50
-50
lines changed

articles/ai-services/immersive-reader/how-to-cache-token.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
---
22
title: "Cache the authentication token"
33
titleSuffix: Azure AI services
4-
description: This article will show you how to cache the authentication token.
5-
author: rwallerms
4+
description: Learn how to cache the authentication token in the Immersive Reader app.
5+
author: sharmas
66
manager: nitinme
77

88
ms.service: azure-ai-immersive-reader
99
ms.topic: how-to
10-
ms.date: 01/14/2020
11-
ms.author: rwaller
10+
ms.date: 02/26/2024
11+
ms.author: sharmas
1212
ms.custom: "devx-track-js, devx-track-csharp"
1313
---
1414

1515
# How to cache the authentication token
1616

17-
This article demonstrates how to cache the authentication token in order to improve performance of your application.
17+
This article demonstrates how to cache the authentication token in order to improve the performance of your application.
1818

1919
## Using ASP.NET
2020

21-
Import the **Microsoft.Identity.Client** NuGet package, which is used to acquire a token.
21+
Import the `Microsoft.Identity.Client` NuGet package, which is used to acquire a token. For details, see [Install Identity Client NuGet package](quickstarts/client-libraries.md?pivots=programming-language-csharp#install-identity-client-nuget-package).
2222

2323
Create a confidential client application property.
2424

@@ -42,7 +42,7 @@ private IConfidentialClientApplication ConfidentialClientApplication
4242
Next, use the following code to acquire an `AuthenticationResult`, using the authentication values you got when you [created the Immersive Reader resource](./how-to-create-immersive-reader.md).
4343

4444
> [!IMPORTANT]
45-
> The [Microsoft.IdentityModel.Clients.ActiveDirectory](https://www.nuget.org/packages/Microsoft.IdentityModel.Clients.ActiveDirectory) NuGet package and Azure AD Authentication Library (ADAL) have been deprecated. No new features have been added since June 30, 2020. We strongly encourage you to upgrade, see the [migration guide](../../active-directory/develop/msal-migration.md) for more details.
45+
> The [Microsoft.IdentityModel.Clients.ActiveDirectory](https://www.nuget.org/packages/Microsoft.IdentityModel.Clients.ActiveDirectory) NuGet package and Azure AD Authentication Library (ADAL) have been deprecated. No new features have been added since June 30, 2020. We strongly encourage you to upgrade. To learn more, see the [migration guide](../../active-directory/develop/msal-migration.md).
4646
4747

4848
```csharp
@@ -59,11 +59,11 @@ public async Task<string> GetTokenAsync()
5959
}
6060
```
6161

62-
The `AuthenticationResult` object has an `AccessToken` property which is the actual token you will use when launching the Immersive Reader using the SDK. It also has an `ExpiresOn` property which denotes when the token will expire. Before launching the Immersive Reader, you can check whether the token has expired, and acquire a new token only if it has expired.
62+
The `AuthenticationResult` object has an `AccessToken` property, which is the actual token you use when launching the Immersive Reader using the SDK. It also has an `ExpiresOn` property that denotes when the token expires. Before launching the Immersive Reader, you can check whether the token is expired, and acquire a new token only if it expired.
6363

6464
## Using Node.JS
6565

66-
Add the [**request**](https://www.npmjs.com/package/request) npm package to your project. Use the following code to acquire a token, using the authentication values you got when you [created the Immersive Reader resource](./how-to-create-immersive-reader.md).
66+
Add the [request](https://www.npmjs.com/package/request) npm package to your project. Use the following code to acquire a token, using the authentication values you got when you [created the Immersive Reader resource](./how-to-create-immersive-reader.md).
6767

6868
```javascript
6969
router.get('/token', function(req, res) {
@@ -89,7 +89,7 @@ router.get('/token', function(req, res) {
8989
});
9090
```
9191

92-
The `expires_on` property is the date and time at which the token expires, expressed as the number of seconds since January 1, 1970 UTC. Use this value to determine whether your token has expired before attempting to acquire a new one.
92+
The `expires_on` property is the date and time at which the token expires, expressed as the number of seconds since January 1, 1970 UTC. Use this value to determine whether your token is expired before attempting to acquire a new one.
9393

9494
```javascript
9595
async function getToken() {
@@ -100,6 +100,7 @@ async function getToken() {
100100
}
101101
```
102102

103-
## Next steps
103+
## Next step
104104

105-
* Explore the [Immersive Reader SDK Reference](./reference.md)
105+
> [!div class="nextstepaction"]
106+
> [Explore the Immersive Reader SDK reference](reference.md)

articles/ai-services/immersive-reader/how-to-configure-read-aloud.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
---
22
title: "Configure Read Aloud"
33
titleSuffix: Azure AI services
4-
description: This article will show you how to configure the various options for Read Aloud.
5-
author: rwallerms
4+
description: Learn how to configure the various options for Read Aloud in Immersive Reader.
5+
author: sharmas
66
manager: nitinme
77

88
ms.service: azure-ai-immersive-reader
99
ms.topic: how-to
10-
ms.date: 06/29/2020
11-
ms.author: rwaller
10+
ms.date: 02/26/2024
11+
ms.author: sharmas
1212
---
1313

1414
# How to configure Read Aloud
1515

16-
This article demonstrates how to configure the various options for Read Aloud in the Immersive Reader.
16+
This article demonstrates how to configure the various options for Read Aloud in your Immersive Reader application.
1717

1818
## Automatically start Read Aloud
1919

@@ -34,7 +34,7 @@ ImmersiveReader.launchAsync(YOUR_TOKEN, YOUR_SUBDOMAIN, YOUR_DATA, options);
3434
3535
## Configure the voice
3636

37-
Set `voice` to either `male` or `female`. Not all languages support both voices. For more information, see the [Language Support](./language-support.md) page.
37+
Set `voice` to either `male` or `female`. Not all languages support both voices. For more information, see [Language support](./language-support.md).
3838

3939
```typescript
4040
const options = {
@@ -46,7 +46,7 @@ const options = {
4646

4747
## Configure playback speed
4848

49-
Set `speed` to a number between `0.5` (50%) and `2.5` (250%) inclusive. Values outside this range will get clamped to either 0.5 or 2.5.
49+
Set `speed` to a number between `0.5` (50%) and `2.5` (250%) inclusive. Values outside this range get clamped to either 0.5 or 2.5.
5050

5151
```typescript
5252
const options = {
@@ -56,6 +56,7 @@ const options = {
5656
};
5757
```
5858

59-
## Next steps
59+
## Next step
6060

61-
* Explore the [Immersive Reader SDK Reference](./reference.md)
61+
> [!div class="nextstepaction"]
62+
> [Explore the Immersive Reader SDK reference](reference.md)

articles/ai-services/immersive-reader/how-to/display-math.md

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
---
22
title: "Display math in the Immersive Reader"
33
titleSuffix: Azure AI services
4-
description: This article will show you how to display math in the Immersive Reader.
5-
author: rwallerms
4+
description: Learn how to display math in the Immersive Reader app.
5+
author: sharmas
66
manager: nitinme
77

88
ms.service: azure-ai-immersive-reader
99
ms.topic: how-to
10-
ms.date: 01/14/2020
11-
ms.author: rwaller
10+
ms.date: 02/26/2024
11+
ms.author: sharmas
1212
ms.custom:
1313
---
1414

1515
# How to display math in the Immersive Reader
1616

17-
The Immersive Reader can display math when provided in the form of Mathematical Markup Language ([MathML](https://developer.mozilla.org/docs/Web/MathML)).
18-
The MIME type can be set through the Immersive Reader [chunk](../reference.md#chunk). See [supported MIME types](../reference.md#supported-mime-types) for more information.
17+
The Immersive Reader can display math expressions when provided in the form of Mathematical Markup Language ([MathML](https://developer.mozilla.org/docs/Web/MathML)).
1918

20-
## Send Math to the Immersive Reader
21-
In order to send math to the Immersive Reader, supply a chunk containing MathML, and set the MIME type to ```application/mathml+xml```;
19+
## Send math to the Immersive Reader
2220

23-
For example, if your content were the following:
21+
In order to display math in the Immersive Reader app, supply a [chunk](../reference.md#chunk) that contains MathML, and set the MIME type to `application/mathml+xml`. To learn more, see [supported MIME types](../reference.md#supported-mime-types).
22+
23+
For example, see the following content:
2424

2525
```html
2626
<div id='ir-content'>
@@ -49,7 +49,7 @@ For example, if your content were the following:
4949
</div>
5050
```
5151

52-
Then you could display your content by using the following JavaScript.
52+
You can then display your content by using the following JavaScript.
5353

5454
```javascript
5555
const data = {
@@ -65,8 +65,9 @@ ImmersiveReader.launchAsync(YOUR_TOKEN, YOUR_SUBDOMAIN, data, YOUR_OPTIONS);
6565

6666
When you launch the Immersive Reader, you should see:
6767

68-
![Math in Immersive Reader](../media/how-tos/1-math.png)
68+
:::image type="content" source="../media/how-tos/1-math.png" alt-text="Screenshot of the rendered math equation in Immersive Reader.":::
6969

70-
## Next steps
70+
## Next step
7171

72-
* Explore the [Immersive Reader SDK](https://github.com/microsoft/immersive-reader-sdk) and the [Immersive Reader SDK Reference](../reference.md)
72+
> [!div class="nextstepaction"]
73+
> [Explore the Immersive Reader SDK reference](../reference.md)
Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,45 @@
11
---
2-
title: "Set Immersive Reader Cookie Policy"
2+
title: "Set Immersive Reader cookie policy"
33
titleSuffix: Azure AI services
4-
description: This article will show you how to set the cookie policy for the Immersive Reader.
4+
description: Learn how to set the cookie policy for the Immersive Reader app.
55
#services: cognitive-services
6-
author: rwallerms
6+
author: sharmas
77
manager: nitinme
88

99
ms.service: azure-ai-immersive-reader
1010
ms.topic: how-to
11-
ms.date: 01/06/2020
12-
ms.author: rwaller
11+
ms.date: 02/26/2024
12+
ms.author: sharmas
1313
ms.custom:
1414
---
1515

1616
# How to set the cookie policy for the Immersive Reader
1717

18-
The Immersive Reader will disable cookie usage by default. If you enable cookie usage, then the Immersive Reader may use cookies to maintain user preferences and track feature usage. If you enable cookie usage in the Immersive Reader, please consider the requirements of EU Cookie Compliance Policy. It is the responsibility of the host application to obtain any necessary user consent in accordance with EU Cookie Compliance Policy.
18+
The Immersive Reader disables cookie usage by default. If you enable cookie usage, then the Immersive Reader can use cookies to maintain user preferences and track feature usage. If you enable cookie usage in the Immersive Reader, consider the requirements of the EU Cookie Compliance Policy. It's the responsibility of the host application to obtain any necessary user consent in accordance with the EU Cookie Compliance Policy.
1919

2020
The cookie policy can be set through the Immersive Reader [options](../reference.md#options).
2121

22-
## Enable Cookie Usage
22+
## Enable cookie usage
2323

2424
```javascript
25-
var options = {
25+
const options = {
2626
'cookiePolicy': ImmersiveReader.CookiePolicy.Enable
2727
};
2828

2929
ImmersiveReader.launchAsync(YOUR_TOKEN, YOUR_SUBDOMAIN, YOUR_DATA, options);
3030
```
3131

32-
## Disable Cookie Usage
32+
## Disable cookie usage
3333

3434
```javascript
35-
var options = {
35+
const options = {
3636
'cookiePolicy': ImmersiveReader.CookiePolicy.Disable
3737
};
3838

3939
ImmersiveReader.launchAsync(YOUR_TOKEN, YOUR_SUBDOMAIN, YOUR_DATA, options);
4040
```
4141

42-
## Next steps
42+
## Next step
4343

44-
* View the [Node.js quickstart](../quickstarts/client-libraries.md?pivots=programming-language-nodejs) to see what else you can do with the Immersive Reader SDK using Node.js
45-
* View the [Android tutorial](../how-to-launch-immersive-reader.md) to see what else you can do with the Immersive Reader SDK using Java or Kotlin for Android
46-
* View the [iOS tutorial](../how-to-launch-immersive-reader.md) to see what else you can do with the Immersive Reader SDK using Swift for iOS
47-
* View the [Python tutorial](../how-to-launch-immersive-reader.md) to see what else you can do with the Immersive Reader SDK using Python
48-
* Explore the [Immersive Reader SDK](https://github.com/microsoft/immersive-reader-sdk) and the [Immersive Reader SDK Reference](../reference.md)
44+
> [!div class="nextstepaction"]
45+
> [View the quickstart guides](../quickstarts/client-libraries.md?pivots=programming-language-nodejs)

0 commit comments

Comments
 (0)