Integrate supported ops into the UI

This commit is contained in:
Ingvar Stepanyan
2021-07-26 13:09:10 +00:00
parent 95ed711729
commit e3ea463db5
6 changed files with 49 additions and 44 deletions

10
libapi.mjs.d.ts vendored
View File

@@ -13,6 +13,15 @@ export type Config = {
| { type: 'datetime'; value: number }
);
declare interface SupportedOps {
captureImage: boolean;
captureVideo: boolean;
captureAudio: boolean;
capturePreview: boolean;
config: boolean;
triggerCapture: boolean;
}
declare class Context {
configToJS(): Promise<Config & { type: 'window' }>;
setConfigValue(
@@ -22,6 +31,7 @@ declare class Context {
capturePreviewAsBlob(): Promise<Blob>;
captureImageAsFile(): Promise<File>;
hasPendingEvent(): Promise<boolean>;
supportedOps(): SupportedOps;
delete(): void;
isDeleted(): boolean;