差别
这里会显示出您选择的修订版和当前版本之间的差别。
两侧同时换到之前的修订记录 前一修订版 后一修订版 | 前一修订版 后一修订版 两侧同时换到之后的修订记录 | ||
im:web:intro:integration [2019/11/28 02:34] lizg [配置] |
im:web:intro:integration [2020/05/15 07:06] zhangdong [配置] |
||
---|---|---|---|
行 80: | 行 80: | ||
**注意:**Web SDK 向下兼容V1.1.2和V1.1.1。关于详细的引用文件和配置参数(WebIMConfig)的方法,请查看本页“兼容性”的内容。 | **注意:**Web SDK 向下兼容V1.1.2和V1.1.1。关于详细的引用文件和配置参数(WebIMConfig)的方法,请查看本页“兼容性”的内容。 | ||
+ | |||
+ | 初始化 WebIM.connection 和 构造消息 WebIM.message, 需要在中间加上 default,如:WebIM.default.message。 | ||
行 85: | 行 87: | ||
3.0 SDK,在 WebIMConfig.js 文件内进行以下配置: | 3.0 SDK,在 WebIMConfig.js 文件内进行以下配置: | ||
<code javascript> | <code javascript> | ||
- | xmppURL: '//im-api-v2.easemob.com/ws', // xmpp Server地址,vip6集群 地址 '//im-api-vip6-v2.easemob.com/ws' | + | xmppURL: '//im-api-v2.easemob.com/ws', // xmpp Server地址 |
- | apiURL: '//a1.easemob.com', // rest Server地址,vip6集群 地址 '//a1-vip6.easemob.com' | + | apiURL: '//a1.easemob.com', // rest Server地址 |
appkey: 'easemob-demo#chatdemoui', // App key | appkey: 'easemob-demo#chatdemoui', // App key | ||
行 94: | 行 96: | ||
isMultiLoginSessions: false, // 是否开启多页面同步收消息,注意,需要先联系商务开通此功能 | isMultiLoginSessions: false, // 是否开启多页面同步收消息,注意,需要先联系商务开通此功能 | ||
- | |||
- | isAutoLogin: true, // 自动出席,(如设置为false,则表示离线,无法收消息,需要在登录成功后手动调用conn.setPresence()才可以收消息) | ||
isDebug: false, // 打开调试,会自动打印log,在控制台的console中查看log | isDebug: false, // 打开调试,会自动打印log,在控制台的console中查看log | ||
autoReconnectNumMax: 2, // 断线重连最大次数 | autoReconnectNumMax: 2, // 断线重连最大次数 | ||
- | |||
- | autoReconnectInterval: 2, // 断线重连时间间隔 | ||
heartBeatWait: 4500, // 使用webrtc(视频聊天)时发送心跳包的时间间隔,单位ms | heartBeatWait: 4500, // 使用webrtc(视频聊天)时发送心跳包的时间间隔,单位ms | ||
行 112: | 行 110: | ||
<code javascript> | <code javascript> | ||
xmppURL: '//im-api.easemob.com', // xmpp Server地址,对于在console.easemob.com创建的appKey,固定为该值 | xmppURL: '//im-api.easemob.com', // xmpp Server地址,对于在console.easemob.com创建的appKey,固定为该值 | ||
- | // vip6集群 地址 '//im-api-vip6.easemob.com' | + | |
apiURL: 'http://a1.easemob.com', // rest Server地址,对于在console.easemob.com创建的appkey,固定为该值 | apiURL: 'http://a1.easemob.com', // rest Server地址,对于在console.easemob.com创建的appkey,固定为该值 | ||
- | // vip6集群 地址 '//a1-vip6.easemob.com' | + | |
appkey: 'easemob-demo#chatdemoui', // App key | appkey: 'easemob-demo#chatdemoui', // App key | ||
行 122: | 行 120: | ||
isMultiLoginSessions: false, // 是否开启多页面同步收消息,注意,需要先联系商务开通此功能 | isMultiLoginSessions: false, // 是否开启多页面同步收消息,注意,需要先联系商务开通此功能 | ||
- | |||
- | isAutoLogin: true, // 自动出席,(如设置为false,则表示离线,无法收消息,需要在登录成功后手动调用conn.setPresence()才可以收消息) | ||
isDebug: false, // 打开调试,会自动打印log,在控制台的console中查看log | isDebug: false, // 打开调试,会自动打印log,在控制台的console中查看log |