SnapshotService
@auvious/snapshot / Exports / SnapshotService
Class: SnapshotService
Table of contents
Constructors
Properties
Methods
- acquireSnapshot
- approve
- cameraRequestFailureReport
- cameraRequestReport
- cameraRequestSuccessReport
- discard
- events
- findByInteractionId
- requestCameraOperation
- requestCameraSwitch
- requestCameraTorch
- requestSnapshot
- signedUrlProvider
- uploadSnapshot
Constructors
constructor
• new SnapshotService(commonSource
, rtcSource
, createInternalSignedUrl?
)
Snapshot Service constructor.
Parameters
Name | Type | Default value | Description |
---|---|---|---|
commonSource | Observable <AuviousCommon > | undefined | source for AuviousCommon |
rtcSource | Observable <AuviousRtc > | undefined | source for AuviousRtc |
createInternalSignedUrl | boolean | false | - |
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
Name | Type |
---|---|
ev | SnapshotRequestedEvent |
blob | Blob |
Returns
Promise
<void
>
approve
▸ approve(snapshot
, snapshotType
): Promise
<void
>
Parameters
Name | Type |
---|---|
snapshot | ISnapshot |
snapshotType | string |
Returns
Promise
<void
>
cameraRequestFailureReport
▸ cameraRequestFailureReport(ev
, additionalInformation
): Promise
<void
>
Parameters
Name | Type |
---|---|
ev | SnapshotCameraRequestedEvent |
additionalInformation | string |
Returns
Promise
<void
>
cameraRequestReport
▸ Private
cameraRequestReport(ev
, succeeded
, additionalInformation?
): Promise
<void
>
Parameters
Name | Type |
---|---|
ev | SnapshotCameraRequestedEvent |
succeeded | boolean |
additionalInformation? | string |
Returns
Promise
<void
>
cameraRequestSuccessReport
▸ cameraRequestSuccessReport(ev
): Promise
<void
>
Parameters
Name | Type |
---|---|
ev | SnapshotCameraRequestedEvent |
Returns
Promise
<void
>
discard
▸ discard(snapshot
): Promise
<void
>
Parameters
Name | Type |
---|---|
snapshot | ISnapshot |
Returns
Promise
<void
>
events
▸ events(): Observable
<DomainEvent
>
Use this to get Snapshot events.
Returns
Observable
<DomainEvent
>
snapshot events
findByInteractionId
▸ findByInteractionId(interactionId
): Promise
<ISnapshot
[]>
Parameters
Name | Type |
---|---|
interactionId | string |
Returns
Promise
<ISnapshot
[]>
requestCameraOperation
▸ Private
requestCameraOperation(endpoint
, cameraRequestType
, timeoutSeconds?
): Promise
<void
>
Parameters
Name | Type |
---|---|
endpoint | IEndpoint <{ [key: string] : any ; }> |
cameraRequestType | "CAMERA_SWITCH" | "FLASH_ON" | "FLASH_OFF" |
timeoutSeconds | number |
Returns
Promise
<void
>
requestCameraSwitch
▸ requestCameraSwitch(endpoint
): Promise
<void
>
Parameters
Name | Type |
---|---|
endpoint | IEndpoint <{ [key: string] : any ; }> |
Returns
Promise
<void
>
requestCameraTorch
▸ requestCameraTorch(endpoint
, on
): Promise
<void
>
Parameters
Name | Type |
---|---|
endpoint | IEndpoint <{ [key: string] : any ; }> |
on | boolean |
Returns
Promise
<void
>
requestSnapshot
▸ requestSnapshot(params
): Promise
<ISnapshot
>
Parameters
Name | Type |
---|---|
params | IRequestSnapshotParams |
Returns
Promise
<ISnapshot
>
signedUrlProvider
▸ signedUrlProvider(): SignedUrlProvider
Returns
SignedUrlProvider
uploadSnapshot
▸ uploadSnapshot(params
): Promise
<void
>
Parameters
Name | Type |
---|---|
params | IUploadSnapshotParams |
Returns
Promise
<void
>