RongIMLib View Markdown
    Preparing search index...

    Variable sendHQVoiceMessageConst

    sendHQVoiceMessage: (
        conversation: IConversationIdentifier,
        msgBody: ISendBody,
        hooks?: IUploadHooks,
        sendOptions?: IUploadMessageOption,
    ) => Promise<RCResult<IAReceivedMessage>> = ...

    发送高清语音消息

    Type Declaration

    待发送的文件必须为 AAC 音频文件。 发送高清语音消息的快捷方式,等同于使用 new HQVoiceMessage() 创建消息体后调用 sendMessage() 方法,支持高清语音上传,上传成功后自动发送消息

    发送高清语音消息示例:

    const msgBody = { file }; // file 为待上传高清语音
    const conversation = {
    conversationType: RongIMLib.ConversationType.PRIVATE,
    targetId: 'targetId'
    }
    const sendRes = await RongIMLib.sendHQVoiceMessage(conversation, msgBody);
    console.info('消息发送结果:', sendRes);