Skip to content

Commit

Permalink
Rename resourceName to cogSvcsSubdomain, bump version to 0.0.2 (#54)
Browse files Browse the repository at this point in the history
  • Loading branch information
metanMSFT authored Jul 11, 2019
1 parent 8bd8b57 commit b96e53e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@microsoft/immersive-reader-sdk",
"version": "1.0.0",
"version": "0.0.2",
"homepage": "https://github.com/Microsoft/immersive-reader-sdk",
"license": "MIT",
"main": "lib/immersive-reader-sdk.js",
Expand Down
8 changes: 4 additions & 4 deletions src/launchAsync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@ import { Error, ErrorCode } from './error';

type Message = {
cogSvcsAccessToken: string;
resourceName: string;
cogSvcsSubdomain: string;
request: Content;
launchToPostMessageSentDurationInMs: number;
};

/**
* Launch the Immersive Reader within an iframe.
* @param token The authentication token.
* @param resourceName Reserved. Leave as null.
* @param subdomain The Immersive Reader Cognitive Service subdomain.
* @param content The content that should be shown in the Immersive Reader.
* @param options Options for configuring the look and feel of the Immersive Reader.
* @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.
*/
export function launchAsync(token: string, resourceName: string, content: Content, options?: Options): Promise<HTMLDivElement> {
export function launchAsync(token: string, subdomain: string, content: Content, options?: Options): Promise<HTMLDivElement> {
return new Promise((resolve, reject: (reason: Error) => void): void => {
if (!token) {
reject({ code: ErrorCode.BadArgument, message: 'Token must not be null' });
Expand Down Expand Up @@ -95,7 +95,7 @@ export function launchAsync(token: string, resourceName: string, content: Conten
} else if (e.data === 'ImmersiveReader-ReadyForContent') {
const message: Message = {
cogSvcsAccessToken: token,
resourceName,
cogSvcsSubdomain: subdomain,
request: content,
launchToPostMessageSentDurationInMs: Date.now() - startTime
};
Expand Down

0 comments on commit b96e53e

Please sign in to comment.