You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/ai-services/immersive-reader/how-to-cache-token.md
+13-12Lines changed: 13 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,24 +1,24 @@
1
1
---
2
2
title: "Cache the authentication token"
3
3
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
6
6
manager: nitinme
7
7
8
8
ms.service: azure-ai-immersive-reader
9
9
ms.topic: how-to
10
-
ms.date: 01/14/2020
11
-
ms.author: rwaller
10
+
ms.date: 02/26/2024
11
+
ms.author: sharmas
12
12
ms.custom: "devx-track-js, devx-track-csharp"
13
13
---
14
14
15
15
# How to cache the authentication token
16
16
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.
18
18
19
19
## Using ASP.NET
20
20
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).
22
22
23
23
Create a confidential client application property.
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).
43
43
44
44
> [!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).
46
46
47
47
48
48
```csharp
@@ -59,11 +59,11 @@ public async Task<string> GetTokenAsync()
59
59
}
60
60
```
61
61
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.
63
63
64
64
## Using Node.JS
65
65
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).
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.
93
93
94
94
```javascript
95
95
asyncfunctiongetToken() {
@@ -100,6 +100,7 @@ async function getToken() {
100
100
}
101
101
```
102
102
103
-
## Next steps
103
+
## Next step
104
104
105
-
* Explore the [Immersive Reader SDK Reference](./reference.md)
105
+
> [!div class="nextstepaction"]
106
+
> [Explore the Immersive Reader SDK reference](reference.md)
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).
38
38
39
39
```typescript
40
40
const options = {
@@ -46,7 +46,7 @@ const options = {
46
46
47
47
## Configure playback speed
48
48
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.
50
50
51
51
```typescript
52
52
const options = {
@@ -56,6 +56,7 @@ const options = {
56
56
};
57
57
```
58
58
59
-
## Next steps
59
+
## Next step
60
60
61
-
* Explore the [Immersive Reader SDK Reference](./reference.md)
61
+
> [!div class="nextstepaction"]
62
+
> [Explore the Immersive Reader SDK reference](reference.md)
Copy file name to clipboardExpand all lines: articles/ai-services/immersive-reader/how-to/display-math.md
+14-13Lines changed: 14 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,26 +1,26 @@
1
1
---
2
2
title: "Display math in the Immersive Reader"
3
3
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
6
6
manager: nitinme
7
7
8
8
ms.service: azure-ai-immersive-reader
9
9
ms.topic: how-to
10
-
ms.date: 01/14/2020
11
-
ms.author: rwaller
10
+
ms.date: 02/26/2024
11
+
ms.author: sharmas
12
12
ms.custom:
13
13
---
14
14
15
15
# How to display math in the Immersive Reader
16
16
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)).
19
18
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
22
20
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:
24
24
25
25
```html
26
26
<divid='ir-content'>
@@ -49,7 +49,7 @@ For example, if your content were the following:
49
49
</div>
50
50
```
51
51
52
-
Then you could display your content by using the following JavaScript.
52
+
You can then display your content by using the following JavaScript.
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.
5
5
#services: cognitive-services
6
-
author: rwallerms
6
+
author: sharmas
7
7
manager: nitinme
8
8
9
9
ms.service: azure-ai-immersive-reader
10
10
ms.topic: how-to
11
-
ms.date: 01/06/2020
12
-
ms.author: rwaller
11
+
ms.date: 02/26/2024
12
+
ms.author: sharmas
13
13
ms.custom:
14
14
---
15
15
16
16
# How to set the cookie policy for the Immersive Reader
17
17
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.
19
19
20
20
The cookie policy can be set through the Immersive Reader [options](../reference.md#options).
* 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