UIActionRecord

概述

UIActionRecord 是一个语音聊天输入功能插件。通过 open 接口可在当前 window 底部打开一个语音输入面板,该语音输入面板的生命属于当前 window 所有。

接口

recordAudio

打开语音输入面板

recordAudio(callback(ret))

callback(ret)

ret:

  • 类型:JSON 对象
  • 内部字段:
{
    bytes: ''    //字符串类型;点击发送后获取语音base64字符串
}

示例代码

var UIActionRecord = api.require('UIActionRecord');
UIActionRecord.recordAudio(function(ret) {
    if (ret) {
        api.alert({msg:JSON.stringify(ret)});
    }
});

可用性

iOS 系统,Android 系统

可提供的 1.0.0 及更高版本

是否仍需要帮助? 请保持联络!
最后更新于 2024/04/24