Home Reference Source

Function

Static Public Summary
public

bufferDebounce(time: *): *

Emits an array of the values emitted by the source after t seconds without an emission.

public

bufferDuringTime(time: *)

Emits an array of the values emitted by the source for t seconds after an emission.

public

async createAnonymousSession(issuer: string, config: Object): Promise<Session>

Factory method for anonymous user session creation

public

async createSession(issuer: string, token: string, config: Object): Promise<Session>

Factory method for session creation

public

fromEvent(emitter: *, eventName: *): *

public

async recoverSession(token: string, config: Object): Promise<Session>

Factory method for session recovery

public

async scaleImage(file: *, width: *, height: *, format: *): *

Scales the image provided to the given width and height.

Static Public

public bufferDebounce(time: *): * source

import {bufferDebounce} from '@quobis/sippojs'

Emits an array of the values emitted by the source after t seconds without an emission.

Params:

NameTypeAttributeDescription
time *

Return:

*

public bufferDuringTime(time: *) source

import {bufferDuringTime} from '@quobis/sippojs'

Emits an array of the values emitted by the source for t seconds after an emission.

Params:

NameTypeAttributeDescription
time *

public async createAnonymousSession(issuer: string, config: Object): Promise<Session> source

import {createAnonymousSession} from '@quobis/sippojs'

Factory method for anonymous user session creation

Params:

NameTypeAttributeDescription
issuer string

The authorization token issuer identifier

config Object

Session configuration

config.wacUri string

The address where the WAC is available

config.applicationToken string

A token for the application

config.deviceId string

string which identifies the device this session belongs to

Return:

Promise<Session>

A promise of a new SippoJS session

public async createSession(issuer: string, token: string, config: Object): Promise<Session> source

import {createSession} from '@quobis/sippojs'

Factory method for session creation

Params:

NameTypeAttributeDescription
issuer string

The authorization token issuer identifier

token string

The authorization token from the given issuer.

config Object

Session configuration

config.wacUri string

The address where the WAC is available

config.applicationToken string

A token for the application

config.deviceId string

string which identifies the device this session belongs to

Return:

Promise<Session>

A promise of a new SippoJS session

public fromEvent(emitter: *, eventName: *): * source

import {fromEvent} from '@quobis/sippojs'

Params:

NameTypeAttributeDescription
emitter *
eventName *

Return:

*

public async recoverSession(token: string, config: Object): Promise<Session> source

import {recoverSession} from '@quobis/sippojs'

Factory method for session recovery

Params:

NameTypeAttributeDescription
token string

The authorization token

config Object

Session configuration

config.wacUri string

The address where the WAC is available

config.applicationToken string

A token for the application

config.deviceId string

string which identifies the device this session belongs to

Return:

Promise<Session>

A promise of a new SippoJS session

public async scaleImage(file: *, width: *, height: *, format: *): * source

import {scaleImage} from '@quobis/sippojs'

Scales the image provided to the given width and height.

Params:

NameTypeAttributeDescription
file *

A blob containing the image to scale.

width *

The width to scale the image to.

height *

The height to scale the image to.

format *

The format of the scaled image.

Return:

*

A promise that resolves to a string containing the scaled image in a base64 representation.