Skip to content

SDK for using the Immersive Reader through Cognitive Services

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
LICENSE.txt
Notifications You must be signed in to change notification settings

vleitzgen/immersive-reader-sdk

 
 

Repository files navigation

Cognitive Services - Immersive Reader SDK (preview)

Build status

The Immersive Reader SDK is a JavaScript library that allows you to easily and quickly integrate the Immersive Reader into your web application.

Usage

Usage of this SDK requires an Azure subscription to Immersive Reader. Create an Immersive Reader resource in the Azure portal.

Once you have a subscription key, use that to acquire an access token by following these steps.

Include the library in your web application:

  • Stable build
<script type='text/javascript' src='https://contentstorage.onenote.office.net/onenoteltir/immersivereadersdk/immersive-reader-sdk.0.0.1.js'></script>
npm install @microsoft/immersive-reader-sdk
yarn add @microsoft/immersive-reader-sdk
  • Canary build (use at your own risk!)
<script type='text/javascript' src='https://contentstorage.onenote.office.net/onenoteltir/immersivereadersdk/immersive-reader-sdk.preview.js'></script>
npm install @microsoft/immersive-reader-sdk@next
yarn add @microsoft/immersive-reader-sdk@next

Add an HTML element to your webpage with the immersive-reader-button class attribute.

<div class='immersive-reader-button' onclick='launchImmersiveReader()'></div>

Next, invoke the Immersive Reader when the button is clicked:

function launchImmersiveReader() {
    const content = {
        title: 'Immersive Reader',
        chunks: [ {
            content: 'Hello, world!'
        } ]
    };
    ImmersiveReader.launchAsync(YOUR_TOKEN, null, content);
}

Take a look at the samples for examples of a full end-to-end integration.

Building

In order to build the SDK, ensure that you have Git, Node.js, and Yarn installed.

Clone a copy of the repo:

git clone https://github.com/Microsoft/immersive-reader-sdk

Change to the immersive-reader-sdk directory:

cd immersive-reader-sdk

Install dependencies:

yarn

Build and test:

yarn run build
yarn run test

Contributing

We welcome contributions to this project.

Reporting Security Issues

Security issues and bugs should be reported privately, via email, to the Microsoft Security Response Center (MSRC) at secure@microsoft.com. You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Further information, including the MSRC PGP key, can be found in the Security TechCenter.

License

Copyright (c) Microsoft Corporation. All rights reserved.

Licensed under the MIT License.

About

SDK for using the Immersive Reader through Cognitive Services

Resources

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
LICENSE.txt

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 95.1%
  • JavaScript 4.9%