/** * 语音签名的返回值 */ export type GetVoiceSignReturnType = { /** * rtc 的 sdkAppId */ sdkAppId: number; /** * rtc 的 用户 id */ userId: string; /** * rtc 的 语音房间号 */ roomId: string | number; /** * rtc 的 用户签名 */ userSig: string; }; /** * 获取用户语音签名的参数 */ export type GetVoiceSignParams = { /** * 语音房间号 */ voiceId: string; /** * 用户 id */ userId: string; /** * 房间 id */ roomId: string | number; }; /** * 获取用户语音签名的函数 * * 用于获取加入 RTC 语音房间所需的签名信息。 * 通常需要调用后端 API 来生成签名。 * * @param params 获取语音签名所需的参数,包含以下属性: * - voiceId: 语音房间ID * - userId: 用户ID * - roomId: 房间ID * @returns Promise 返回包含签名信息的 Promise,包含: * - sdkAppId: RTC的sdkAppId * - userId: RTC的用户ID * - roomId: RTC的语音房间号 * - userSig: RTC的用户签名 * @example * ```typescript * const getVoiceSign: GetVoiceSign = async (params) => { * const response = await fetch('/api/get-voice-sign', { * method: 'POST', * headers: { 'Content-Type': 'application/json' }, * body: JSON.stringify(params) * }) * return response.json() * } * ``` */ export declare function GetVoiceSignFn(params: GetVoiceSignParams): Promise; /** * 获取用户语音签名的方法类型 * * 用于配置 Live 实例时提供获取语音签名的函数。 */ export type GetVoiceSign = typeof GetVoiceSignFn;