@flashphoner/websdk 2.0.250 → 2.0.252

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,6 +11,10 @@
11
11
  * @param {String} options.username Username to login with
12
12
  * @param {String} options.token JWT token
13
13
  * @param {String} options.appKey Application key
14
+ * @param {Integer=} options.timeout Connection timeout in milliseconds [0]
15
+ * @param {Integer=} options.pingInterval Server ping interval in milliseconds [0]
16
+ * @param {Integer=} options.receiveProbes A maximum subsequental pings received missing count [0]
17
+ * @param {Integer=} options.probesInterval Interval to check subsequental pings received [0]
14
18
  * @returns {roomApi.RoomSession}
15
19
  * @memberof roomApi
16
20
  * @method connect
@@ -21,6 +25,10 @@ declare function appSession(options: {
21
25
  username: string;
22
26
  token?: string;
23
27
  appKey?: string;
28
+ timeout?: number | undefined;
29
+ pingInterval?: number | undefined;
30
+ receiveProbes?: number | undefined;
31
+ probesInterval?: number | undefined;
24
32
  }): RoomSession;
25
33
  export declare class RoomSession extends Flashphoner.Session {
26
34
  getRooms: () => Room[];
@@ -21,6 +21,10 @@ var Flashphoner = require('./flashphoner-core');
21
21
  * @param {String} options.username Username to login with
22
22
  * @param {String} options.token JWT Token
23
23
  * @param {String} options.appKey Application Key
24
+ * @param {Integer=} options.timeout Connection timeout in milliseconds [0]
25
+ * @param {Integer=} options.pingInterval Server ping interval in milliseconds [0]
26
+ * @param {Integer=} options.receiveProbes A maximum subsequental pings received missing count [0]
27
+ * @param {Integer=} options.probesInterval Interval to check subsequental pings received [0]
24
28
  * @returns {roomApi.RoomSession}
25
29
  * @memberof roomApi
26
30
  * @method connect
@@ -43,7 +47,11 @@ var appSession = function (options) {
43
47
  custom: {
44
48
  login: options.username,
45
49
  token: options.token
46
- }
50
+ },
51
+ timeout: options.timeout || 0,
52
+ pingInterval: options.pingInterval || 0,
53
+ receiveProbes: options.receiveProbes || 0,
54
+ probesInterval: options.probesInterval || 0
47
55
  }).on(SESSION_STATUS.ESTABLISHED, function (session) {
48
56
  if (callbacks[session.status()]) {
49
57
  callbacks[session.status()](exports);