You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
1022 B
29 lines
1022 B
|
7 months ago
|
import { BooleanCameraCapability } from "../../camera/core";
|
||
|
|
export type OnTorchActionFailureCallback = (failureMessage: string) => void;
|
||
|
|
interface TorchButtonController {
|
||
|
|
disable(): void;
|
||
|
|
enable(): void;
|
||
|
|
setText(text: string): void;
|
||
|
|
}
|
||
|
|
export interface TorchButtonOptions {
|
||
|
|
display: string;
|
||
|
|
marginLeft: string;
|
||
|
|
}
|
||
|
|
export declare class TorchButton implements TorchButtonController {
|
||
|
|
private readonly torchButton;
|
||
|
|
private readonly onTorchActionFailureCallback;
|
||
|
|
private torchController;
|
||
|
|
private constructor();
|
||
|
|
private render;
|
||
|
|
updateTorchCapability(torchCapability: BooleanCameraCapability): void;
|
||
|
|
getTorchButton(): HTMLButtonElement;
|
||
|
|
hide(): void;
|
||
|
|
show(): void;
|
||
|
|
disable(): void;
|
||
|
|
enable(): void;
|
||
|
|
setText(text: string): void;
|
||
|
|
reset(): void;
|
||
|
|
static create(parentElement: HTMLElement, torchCapability: BooleanCameraCapability, torchButtonOptions: TorchButtonOptions, onTorchActionFailureCallback: OnTorchActionFailureCallback): TorchButton;
|
||
|
|
}
|
||
|
|
export {};
|