获取用户语音签名的函数
用于获取加入 RTC 语音房间所需的签名信息。 通常需要调用后端 API 来生成签名。
获取语音签名所需的参数,包含以下属性:
Promise 返回包含签名信息的 Promise,包含:
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()} Copy
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()}
获取用户语音签名的函数
用于获取加入 RTC 语音房间所需的签名信息。 通常需要调用后端 API 来生成签名。