0.0.8 • Published 1 year ago

aai-osp-websdk v0.0.8

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

aai osp SDK

The official Javascript client library for the AAI one-stop flow.

Table of Contents

Install

npm install aai-osp-websdk

Documentation

The module provides a sdk for the AAI OSP flow. For complete information about the API, head to the docs.

Getting Started

To open the flow you must create a osp object.

import OSP from 'aai-osp-websdk'
const container = document.querySelector('#app')
const osp = OSP.init(container!, {
    token: 'XXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX', // Obtain the token according to the integration doc
    environment: 'sandbox',
    language: 'en',
    captureConfig: {
        type: !!window.MediaRecorder ? 'video' : 'image',
        videoConfig: {
            videoBitsPerSecond: 200000,
        },
        imageConfig: {
            mimeType: 'image/jpeg',
            quality: 0.4,
            loopTime: 1000
        }
    },
    onReady() {
        console.log('onReady')
        osp.open()
    },
    onLoad() {
        console.log('onload')
    },
    onError() {
        console.error('onerror')
    },
    onEvent(data) {
        console.log(`onEvent:${JSON.stringify(data)}`)
    },
    onComplete(){
        console.log('workflow complete!')
    }
})

DEMO

npm integration OSP Demo

License

MIT

0.0.8

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago