import { PeerState, ICEState } from '../../type/index'; /** * 接口表示Peer的连接状态,包括当前的Peer状态和ICE状态。 * 用于跟踪Peer连接和ICE协商过程的状态。 */ export interface XYConnectState { peer: PeerState; ice: ICEState; } /** * 编码优先级 * * @param MAINTAIN_FRAMERATE maintain-framerate - 帧率优先 * @param MAINTAIN_RESOLUTION maintain-resolution - 分辨率优先 * @param BALANCED balanced - 平衡 */ export declare enum XYDegradationPreference { MAINTAIN_FRAMERATE = "maintain-framerate", MAINTAIN_RESOLUTION = "maintain-resolution", BALANCED = "balanced" } /** * 流参数配置 */ export interface XYStreamParameterConfig { degradationPreference?: XYDegradationPreference; } /** * 对端Answer报文 */ export interface XYRTCSessionDescriptionInit extends RTCSessionDescriptionInit { offerKey?: string; } /** * 协商网络信息 * * @property { string } address - 地址 * @property { string } candidateType - 候选类型 * @property { string } foundation - 基础 * @property { string } id - ID * @property { string } ip - 本地/远端IP * @property { boolean } isRemote - 是否远程 * @property { string } networkType - 网络类型 * @property { number } port - 端口 * @property { number } priority - 优先级 * @property { string } protocol - 协议 * @property { string } relatedAddress - 协商真实的IP * @property { number } relatedPort - 协商真实的端口 * @property { number } timestamp - 时间戳 * @property { string } type - 类型 * @property { string } usernameFragment - 用户名片段 */ export interface XYCandidateInfo { address?: string; candidateType?: string; foundation?: string; id?: string; ip?: string; isRemote?: boolean; networkType?: string; port?: number; priority?: number; protocol?: string; relatedAddress?: string; relatedPort?: number; timestamp?: number; type?: string; usernameFragment?: string; }