Coder Social home page Coder Social logo

vleitzgen / immersive-reader-sdk Goto Github PK

View Code? Open in Web Editor NEW

This project forked from microsoft/immersive-reader-sdk

0.0 0.0 0.0 715 KB

SDK for using the Immersive Reader through Cognitive Services

License: MIT License

JavaScript 4.94% TypeScript 95.06%

immersive-reader-sdk's Introduction

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 [email protected]. 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.

immersive-reader-sdk's People

Contributors

metanmsft avatar sahirboghani avatar dylankil avatar microsoftopensource avatar dependabot[bot] avatar guillaumesimonnet avatar meganroach avatar msftgits avatar nickblow avatar parkergirard avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.