import { XYBrowserDetector } from './browser'; import { XYStreamDetector } from './stream'; import { ICheckSystemRequirements, DetectSupportFeature, DetectSupportTest, DetectDeviceCodecList } from './index.type'; import { XYWindow } from './window'; export declare class XYDetector { /** * Canvas元素ID */ static CANVAS_TEST_ID: string; /** * Video元素ID */ static VIDEO_TEST_ID: string; /** * 浏览器检测模块 */ static browser: typeof XYBrowserDetector; /** * 浏览器window对象 */ static window: typeof XYWindow; /** * 浏览器检测模块 */ static stream: XYStreamDetector; /** * 是否是WebSDK支持的最低版本浏览器 */ static isSupportDesktopBrowser(): boolean; /** * 是否是WebSDK支持的最低版本移动端浏览器 */ static isSupportMobileBrowser(): boolean; /** * 是否支持设置视频流的宽高比 * iOS不支持,裁剪画面会造成画面有绿边 */ static isSupportAspectRatio(): boolean; /** * 是否支持采集设备流 */ static isSupportUserMedia(): boolean; /** * 创建Canvas测试视频流 * * 配套方法:调用 removeDetectElement 清理节点资源 * * @returns { MediaStream } */ static checkCanvasCapture(): { canvasStream: MediaStream | null; isSupportCanvasCapture: boolean; }; /** * 创建Video测试视频流 * * 配套方法:调用 removeDetectElement 清理节点资源 * * @param { string } src - Video地址 * @returns { MediaStream } */ static checkVideoCapture(src: string): { isSupportVideoCapture: boolean; }; /** * 清理测试元素 */ static removeDetectElement(id?: string): void; /** * 获取是否支持WebRTC相关API * * @param { MediaStream? } videoCapture - 视频流 */ static isSupportRTC(videoCapture?: MediaStream | null): Promise; /** * 是否支持WebRTC PeerConnection模块 * * @param { MediaStream? } videoCapture - 视频流 */ static isSupportPeerCB(videoCapture?: MediaStream | null): Promise; /** * 获取是否支持WebSocket连接 */ static isSupportWebsocket(): boolean; /** * 获取是否支持从Video获取数据流 */ static isSupportVideoCapture(videoRef: any): { videoCaptureStream: any; captureVideoVisible: boolean; }; /** * 获取是否支持 IndexDB 方法 * * @returns */ static isSupportIndexDB(): boolean; /** * 获取是否支持权限检测方法 */ static isSupportDevicePermission(): Promise; /** * 获取是否支持WebAudio API * @returns */ static isSupportAudioContext(): boolean; /** * 支持获取输入/输出设备数据 */ static isSupportMediaDevices(): boolean; /** * 获取是否支持视频流录制 */ static isSupportMediaRecorder(): boolean; /** * 获取是否支持WebWorker */ static isSupportWebWorker(): boolean; /** * 获取是否支持WebWorker */ static isSupportTransformStream(): boolean; /** * 获取是否支持H264编解码 */ static isSupportH264(): Promise; /** * 获取浏览器当前网络信息 * 兼容:Chrome、Edge,不兼容:Safari、Firefox * * @returns { undefined | NetworkInformation } 网络信息 */ static getNetWork(): string; /** * 获取处理器数量 * * @return { number } - 处理器数量 */ static getCPUCount(): number; /** * 获取浏览器代理信息 * * @returns { string } - 浏览器代理信息 */ static getUserAgent(): string; /** * 获取Audio编解码器数据 */ static getAudioCodec(RTCDecode: any): Promise; /** * 获取Video编解码器数据 */ static getVideoCodec(RTCDecode: any): Promise; /** * 获取浏览器支持的编解码器 */ static getSupportedCodec(): Promise; /** * 获取屏幕分辨率、像素比、最大分辨率 */ static getWidowResolution(): { maxWidth: number; maxHeight: number; width: number; height: number; dpr: number; maxScreenResolution: string; }; /** * 检测是否支持屏幕分享 * * @returns { boolean } - 是否支持分享Content */ static isSupportShareContent(): boolean; /** * 是否支持针对屏幕采集设置处理器配置 */ static isSupportSetCaptureHandleConfig(): boolean; /** * 是否支持系统压力检测API * * @returns { boolean } - 检测结果 */ static isSupportDevicePressure(): boolean; /** * 检测WebRTC浏览器兼容性 * * @returns { Promise } */ static checkSupportWebRTC(): Promise; }