Files
sociology_app/uni_modules/yb-screen-capture/utssdk/interface.uts

74 lines
1.7 KiB
Plaintext
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.
/**
* uni.captureScreen 成功回调参数
*/
export type CaptureScreenSuccess = {
/**
* 截图结果,格式为 data URLdata:image/jpeg;base64,xxxx
*/
base64 : string
}
/**
* uni.captureScreen 成功回调函数定义
*/
export type CaptureScreenSuccessCallback = (res : CaptureScreenSuccess) => void
/**
* uni.captureScreen 失败回调参数
*/
export type CaptureScreenFail = {
errCode : number,
errMsg : string
}
/**
* uni.captureScreen 失败回调函数定义
*/
export type CaptureScreenFailCallback = (res : CaptureScreenFail) => void
/**
* uni.captureScreen 完成回调函数定义(成功、失败都会执行)
*/
export type CaptureScreenCompleteCallback = (res : any) => void
/**
* uni.captureScreen 参数
*/
export type CaptureScreenOptions = {
/**
* 接口调用成功的回调函数
*/
success ?: CaptureScreenSuccessCallback,
/**
* 接口调用失败的回调函数
*/
fail ?: CaptureScreenFailCallback,
/**
* 接口调用结束的回调函数(调用成功、失败都会执行)
*/
complete ?: CaptureScreenCompleteCallback
}
export type CaptureScreen = (options : CaptureScreenOptions) => void
export interface Uni {
/**
* 截取当前应用窗口画面(含视频等硬件加速渲染内容),通过 base64 返回。
* 仅 App-Android 生效,基于 Android PixelCopy 实现。
*
* @param {CaptureScreenOptions} options
* @uniPlatform {
* "app": {
* "android": {
* "osVer": "8.0",
* "uniVer": "3.7.7",
* "unixVer": "3.9.0"
* }
* }
* }
* @uniVersion 3.7.7
* @uniVueVersion 2,3
*/
captureScreen(options : CaptureScreenOptions) : void
}