差别
这里会显示出您选择的修订版和当前版本之间的差别。
两侧同时换到之前的修订记录 前一修订版 后一修订版 | 前一修订版 后一修订版 两侧同时换到之后的修订记录 | ||
im:web:intro:integration [2020/05/15 07:06] zhangdong [配置] |
im:web:intro:integration [2020/12/04 10:58] tikiqu |
||
---|---|---|---|
行 87: | 行 87: | ||
3.0 SDK,在 WebIMConfig.js 文件内进行以下配置: | 3.0 SDK,在 WebIMConfig.js 文件内进行以下配置: | ||
<code javascript> | <code javascript> | ||
- | xmppURL: '//im-api-v2.easemob.com/ws', // xmpp Server地址 | + | socketServer: '//im-api-v2.easemob.com/ws', // socket Server地址 |
- | apiURL: '//a1.easemob.com', // rest Server地址 | + | |
+ | restServer: '//a1.easemob.com', // rest Server地址 | ||
appkey: 'easemob-demo#chatdemoui', // App key | appkey: 'easemob-demo#chatdemoui', // App key | ||
https : false, // 是否使用https | https : false, // 是否使用https | ||
- | isHttpDNS: true, // 3.0 SDK支持,防止DNS劫持从服务端获取XMPPUrl、restUrl | + | isHttpDNS: true, // 3.0 SDK支持,防止DNS劫持从服务端获取XMPPUrl、restUrl,私有部署请设置 false |
isMultiLoginSessions: false, // 是否开启多页面同步收消息,注意,需要先联系商务开通此功能 | isMultiLoginSessions: false, // 是否开启多页面同步收消息,注意,需要先联系商务开通此功能 | ||
行 101: | 行 103: | ||
autoReconnectNumMax: 2, // 断线重连最大次数 | autoReconnectNumMax: 2, // 断线重连最大次数 | ||
- | heartBeatWait: 4500, // 使用webrtc(视频聊天)时发送心跳包的时间间隔,单位ms | + | heartBeatWait: 30000, // 心跳间隔(只在小程序中使用) |
- | delivery: true, // 是否发送已读回执 | + | delivery: false, // 是否发送已读回执 |
+ | |||
+ | useOwnUploadFun: false // 是否使用自己的上传方式(如将图片文件等上传到自己的服务器,构建消息时只传url) | ||
</code> | </code> | ||
行 124: | 行 128: | ||
autoReconnectNumMax: 2, // 断线重连最大次数 | autoReconnectNumMax: 2, // 断线重连最大次数 | ||
- | |||
- | autoReconnectInterval: 2, // 断线重连时间间隔 | ||
- | heartBeatWait: 4500, // 使用webrtc(视频聊天)时发送心跳包的时间间隔,单位ms | + | autoReconnectInterval: 3, // 断线重连每次尝试连接的间隔 |
+ | |||
+ | heartBeatWait: 30000, // 使用webrtc(视频聊天)时发送心跳包的时间间隔,单位ms | ||
delivery: true, // 是否发送已读回执 | delivery: true, // 是否发送已读回执 |