# yach.ext.agora

# owner

庞豪杰(069132)

# 安装

npm i yach.ext.agora

# init

import * as agoraFn from 'yach.ext.agora'
agoraFn.initAgoraSDK();

# startCall

agoraFn.startCall

/**
 * 拨打语音电话
 * @param {Sring} id: 当前会话的id
 * @param {Object} sessionActive: 当前会话的对象
 */
agoraFn.startCall(id, sessionActive);

# acceptCall

agoraFn.acceptCall

/**
 * 接听语音电话
 * @param no param
 */
agoraFn.acceptCall();

# joinCall

agoraFn.joinCall

/**
 * 接听后加入语音电话
 * @param no param
 */
agoraFn.joinCall();

# refuseCall

agoraFn.refuseCall

/**
 * 拒绝语音电话
 * @param no param
 */
agoraFn.refuseCall();

# cancelCall

agoraFn.cancelCall

/**
 * 取消语音电话
 * @param no param
 */
agoraFn.cancelCall();

# leaveCall

agoraFn.leaveCall

/**
 * 取消后离开语音电话
 * @param no param
 */
agoraFn.leaveCall();

# sendMessageToPeer

agoraFn.sendMessageToPeer

/**
 * 主叫挂断电话给被叫端发送点对点消息
 * @param no param
 */
agoraFn.sendMessageToPeer();

# channelAudio

agoraFn.channelAudio

/**
 * 开启/关闭音频
 * @param {Blean} status: true开启|false关闭
 */
agoraFn.channelAudio(status);

# closeVoice5

agoraFn.closeVoice5

/**
 * 关闭通话界面
 * @param no param
 */
agoraFn.closeVoice5();

# logoutRtmAndRtc

agoraFn.logoutRtmAndRtc

/**
 * 退出rtm和rtc
 * @param no param
 */
agoraFn.logoutRtmAndRtc();

# uploadRtmAndRtcBpit

agoraFn.uploadRtmAndRtcBpit

/**
 * 上报数据到elk系统
 * @param {Object} 
 * {
 *  module: 'api',//模块
 *  result: obj.code ==200 ? 0 : obj.code,//接口返回的code码 
 *  startTime: Date.now(),//请求接口的开始时间
 *  path: 'meeting/create_stream'//接口路由
 * }
 */
agoraFn.uploadRtmAndRtcBpit({
  module: 'api',
  result: obj.code ==200 ? 0 : obj.code,
  startTime: Date.now(),
  path: '/meeting/create_stream'
});

# version

# 0.0.9.20200912

  1. noticeStream接口增加elk数据上报
  2. 被叫接听瞬间,主叫方挂断问题处理,增加点对点消息

# 0.0.8.20200903

  1. 接口配置文件修改

# 0.0.7.20200901

  1. 被叫挂断-主叫再次呼叫问题修复
  2. 30s后再次呼叫时只呼叫未收到邀请的端

# 0.0.6.20200831

  1. 视频会议发消息问题修复

# 0.0.5.20200828

  1. 修复拨通电话立即挂断,然后再次拨打无反应问题

# 0.0.4.20200826

  1. modify ajax fun

# 0.0.3.20200821

  1. rtm/rtc fun

# 0.0.2.20200810

  1. yach.util.agora --> yach.ext.agora

# 0.0.1.20200720

  1. init project
  2. agora rtc
foo