WebIMConfig.js 2.27 KB
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
'use strict';

/**
* git do not control webim.config.js
* everyone should copy webim.config.js to webim.config.js
* and have their own configs.
* In this way , others won't be influenced by this config while git pull.
*
*/

// for react native
let location = {
protocol: 'https'
}

let config = {
/*
* XMPP server
*/
xmppURL: 'wss://im-api.easemob.com/ws/',
// xmppURL: '172.17.3.122:5280',
/*
* Backend REST API URL
*/
// apiURL: (location.protocol === 'https:' ? 'https:' : 'http:') + '//a1.easemob.com',
// ios must be https!!! by lwz
apiURL: 'https://a1.easemob.com',
// apiURL: (location.protocol === 'https:' ? 'https:' : 'http:') + '//172.17.3.155:8080',
/*
* Application AppKey
*/
appkey: '1123170414115195#mommybaby',//测试版
// appkey: '1123170414115195#mommybabyfinalversion',//正式版
/*
* Whether to use HTTPS '1177161227178308#xcx'
* @parameter {Boolean} true or false
*/
https: true,
/*
* isMultiLoginSessions
* true: A visitor can sign in to multiple webpages and receive messages at all the webpages.
* false: A visitor can sign in to only one webpage and receive messages at the webpage.
*/
isMultiLoginSessions: true,
/**
* Whether to use window.doQuery()
* @parameter {Boolean} true or false
*/
isWindowSDK: false,
/**
* isSandBox=true: xmppURL: 'im-api.sandbox.easemob.com', apiURL: '//a1.sdb.easemob.com',
* isSandBox=false: xmppURL: 'im-api.easemob.com', apiURL: '//a1.easemob.com',
* @parameter {Boolean} true or false
*/
isSandBox: false,
/**
* Whether to console.log in strophe.log()
* @parameter {Boolean} true or false
*/
isDebug: true,
/**
* will auto connect the xmpp server autoReconnectNumMax times in background when client is offline.
* won't auto connect if autoReconnectNumMax=0.
*/
autoReconnectNumMax: 20,
/**
* the interval secons between each atuo reconnectting.
* works only if autoReconnectMaxNum >= 2.
*/
autoReconnectInterval: 2,
/**
* webrtc supports WebKit and https only
*/
isWebRTC: false,
/*
* Set to auto sign-in
*/
isAutoLogin: true
};

export default config;