Files
sociology_app/uni_modules/yb-screen-capture/index.d.ts

30 lines
852 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
export type CaptureScreenSuccess = {
/**
* 截图结果,格式为 data URLdata:image/jpeg;base64,xxxx
*/
base64 : string
}
export type CaptureScreenSuccessCallback = (res : CaptureScreenSuccess) => void
export type CaptureScreenFail = {
errCode : number,
errMsg : string
}
export type CaptureScreenFailCallback = (res : CaptureScreenFail) => void
export type CaptureScreenCompleteCallback = (res : any) => void
export type CaptureScreenOptions = {
success ?: CaptureScreenSuccessCallback,
fail ?: CaptureScreenFailCallback,
complete ?: CaptureScreenCompleteCallback
}
/**
* 截取当前应用窗口画面(含视频等硬件加速渲染内容),通过 base64 返回。
* 仅 App-Android 生效,基于 Android PixelCopy 实现。
*/
export declare const captureScreen : (options : CaptureScreenOptions) => void