Skip to main content

SnapshotService

@auvious/snapshot / Exports / SnapshotService

Class: SnapshotService

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new SnapshotService(commonSource, rtcSource, createInternalSignedUrl?)

Snapshot Service constructor.

Parameters

NameTypeDefault valueDescription
commonSourceObservable<AuviousCommon>undefinedsource for AuviousCommon
rtcSourceObservable<AuviousRtc>undefinedsource for AuviousRtc
createInternalSignedUrlbooleanfalse-

Properties

common

Private common: AuviousCommon


rtc

Private rtc: AuviousRtc


snapshotEventSubscription

Private snapshotEventSubscription: IEventClientSubscription


snapshotEventsSubject

Private snapshotEventsSubject: Subject<DomainEvent>


snapshotResource

Private snapshotResource: ApiResource

Methods

acquireSnapshot

acquireSnapshot(ev, blob): Promise<void>

Parameters

NameType
evSnapshotRequestedEvent
blobBlob

Returns

Promise<void>


approve

approve(snapshot, snapshotType): Promise<void>

Parameters

NameType
snapshotISnapshot
snapshotTypestring

Returns

Promise<void>


cameraRequestFailureReport

cameraRequestFailureReport(ev, additionalInformation): Promise<void>

Parameters

NameType
evSnapshotCameraRequestedEvent
additionalInformationstring

Returns

Promise<void>


cameraRequestReport

Private cameraRequestReport(ev, succeeded, additionalInformation?): Promise<void>

Parameters

NameType
evSnapshotCameraRequestedEvent
succeededboolean
additionalInformation?string

Returns

Promise<void>


cameraRequestSuccessReport

cameraRequestSuccessReport(ev): Promise<void>

Parameters

NameType
evSnapshotCameraRequestedEvent

Returns

Promise<void>


discard

discard(snapshot): Promise<void>

Parameters

NameType
snapshotISnapshot

Returns

Promise<void>


events

events(): Observable<DomainEvent>

Use this to get Snapshot events.

Returns

Observable<DomainEvent>

snapshot events


findByInteractionId

findByInteractionId(interactionId): Promise<ISnapshot[]>

Parameters

NameType
interactionIdstring

Returns

Promise<ISnapshot[]>


requestCameraOperation

Private requestCameraOperation(endpoint, cameraRequestType, timeoutSeconds?): Promise<void>

Parameters

NameType
endpointIEndpoint<{ [key: string]: any; }>
cameraRequestType"CAMERA_SWITCH" | "FLASH_ON" | "FLASH_OFF"
timeoutSecondsnumber

Returns

Promise<void>


requestCameraSwitch

requestCameraSwitch(endpoint): Promise<void>

Parameters

NameType
endpointIEndpoint<{ [key: string]: any; }>

Returns

Promise<void>


requestCameraTorch

requestCameraTorch(endpoint, on): Promise<void>

Parameters

NameType
endpointIEndpoint<{ [key: string]: any; }>
onboolean

Returns

Promise<void>


requestSnapshot

requestSnapshot(params): Promise<ISnapshot>

Parameters

NameType
paramsIRequestSnapshotParams

Returns

Promise<ISnapshot>


signedUrlProvider

signedUrlProvider(): SignedUrlProvider

Returns

SignedUrlProvider


uploadSnapshot

uploadSnapshot(params): Promise<void>

Parameters

NameType
paramsIUploadSnapshotParams

Returns

Promise<void>