Skip to content

Commit b96e53e

Browse files
authored
Rename resourceName to cogSvcsSubdomain, bump version to 0.0.2 (#54)
1 parent 8bd8b57 commit b96e53e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@microsoft/immersive-reader-sdk",
3-
"version": "1.0.0",
3+
"version": "0.0.2",
44
"homepage": "https://github.com/Microsoft/immersive-reader-sdk",
55
"license": "MIT",
66
"main": "lib/immersive-reader-sdk.js",

src/launchAsync.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,20 @@ import { Error, ErrorCode } from './error';
77

88
type Message = {
99
cogSvcsAccessToken: string;
10-
resourceName: string;
10+
cogSvcsSubdomain: string;
1111
request: Content;
1212
launchToPostMessageSentDurationInMs: number;
1313
};
1414

1515
/**
1616
* Launch the Immersive Reader within an iframe.
1717
* @param token The authentication token.
18-
* @param resourceName Reserved. Leave as null.
18+
* @param subdomain The Immersive Reader Cognitive Service subdomain.
1919
* @param content The content that should be shown in the Immersive Reader.
2020
* @param options Options for configuring the look and feel of the Immersive Reader.
2121
* @return A promise that resolves when the Immersive Reader is launched. The promise resolves with the div that contains an iframe which contains the Immersive Reader.
2222
*/
23-
export function launchAsync(token: string, resourceName: string, content: Content, options?: Options): Promise<HTMLDivElement> {
23+
export function launchAsync(token: string, subdomain: string, content: Content, options?: Options): Promise<HTMLDivElement> {
2424
return new Promise((resolve, reject: (reason: Error) => void): void => {
2525
if (!token) {
2626
reject({ code: ErrorCode.BadArgument, message: 'Token must not be null' });
@@ -95,7 +95,7 @@ export function launchAsync(token: string, resourceName: string, content: Conten
9595
} else if (e.data === 'ImmersiveReader-ReadyForContent') {
9696
const message: Message = {
9797
cogSvcsAccessToken: token,
98-
resourceName,
98+
cogSvcsSubdomain: subdomain,
9999
request: content,
100100
launchToPostMessageSentDurationInMs: Date.now() - startTime
101101
};

0 commit comments

Comments
 (0)