@wireapp/avs 0.0.3168 → 0.0.4297

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.
package/dist/avs_wcall.js CHANGED
@@ -17,35 +17,28 @@
17
17
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
18
18
  */
19
19
  Object.defineProperty(exports, "__esModule", { value: true });
20
+ exports.getAvsInstance = exports.Wcall = exports.MODE = exports.RESOLUTION = exports.VSTREAMS = exports.STATE = exports.CONV_TYPE = exports.CALL_TYPE = exports.ENV = exports.VIDEO_STATE = exports.AUDIO_STATE = exports.LOG_LEVEL = exports.REASON = exports.QUALITY = exports.ERROR = void 0;
20
21
  /* DO NOT edit this file by hand. It is generated by the AVS make
21
22
  * system and any changes you make will be lost.
22
23
  */
23
- var avs_core_js_1 = require("./avs_core.js");
24
- var avs_pc_js_1 = require("./avs_pc.js");
25
- var LOG_LEVEL;
26
- (function (LOG_LEVEL) {
27
- LOG_LEVEL[LOG_LEVEL["DEBUG"] = 0] = "DEBUG";
28
- LOG_LEVEL[LOG_LEVEL["INFO"] = 1] = "INFO";
29
- LOG_LEVEL[LOG_LEVEL["WARN"] = 2] = "WARN";
30
- LOG_LEVEL[LOG_LEVEL["ERROR"] = 3] = "ERROR";
31
- })(LOG_LEVEL = exports.LOG_LEVEL || (exports.LOG_LEVEL = {}));
32
- var CONV_TYPE;
33
- (function (CONV_TYPE) {
34
- CONV_TYPE[CONV_TYPE["ONEONONE"] = 0] = "ONEONONE";
35
- CONV_TYPE[CONV_TYPE["GROUP"] = 1] = "GROUP";
36
- CONV_TYPE[CONV_TYPE["CONFERENCE"] = 2] = "CONFERENCE";
37
- })(CONV_TYPE = exports.CONV_TYPE || (exports.CONV_TYPE = {}));
38
- var STATE;
39
- (function (STATE) {
40
- STATE[STATE["NONE"] = 0] = "NONE";
41
- STATE[STATE["OUTGOING"] = 1] = "OUTGOING";
42
- STATE[STATE["INCOMING"] = 2] = "INCOMING";
43
- STATE[STATE["ANSWERED"] = 3] = "ANSWERED";
44
- STATE[STATE["MEDIA_ESTAB"] = 4] = "MEDIA_ESTAB";
45
- STATE[STATE["TERM_LOCAL"] = 6] = "TERM_LOCAL";
46
- STATE[STATE["TERM_REMOTE"] = 7] = "TERM_REMOTE";
47
- STATE[STATE["UNKNOWN"] = 8] = "UNKNOWN";
48
- })(STATE = exports.STATE || (exports.STATE = {}));
24
+ var avs_core = require("./avs_core");
25
+ var avs_pc_1 = require("./avs_pc");
26
+ var ERROR;
27
+ (function (ERROR) {
28
+ ERROR[ERROR["NO_MEMORY"] = 12] = "NO_MEMORY";
29
+ ERROR[ERROR["INVALID"] = 22] = "INVALID";
30
+ ERROR[ERROR["TIMED_OUT"] = 110] = "TIMED_OUT";
31
+ ERROR[ERROR["ALREADY"] = 114] = "ALREADY";
32
+ ERROR[ERROR["UNKNOWN_PROTOCOL"] = 1000] = "UNKNOWN_PROTOCOL";
33
+ })(ERROR = exports.ERROR || (exports.ERROR = {}));
34
+ var QUALITY;
35
+ (function (QUALITY) {
36
+ QUALITY[QUALITY["NORMAL"] = 1] = "NORMAL";
37
+ QUALITY[QUALITY["MEDIUM"] = 2] = "MEDIUM";
38
+ QUALITY[QUALITY["POOR"] = 3] = "POOR";
39
+ QUALITY[QUALITY["NETWORK_PROBLEM"] = 4] = "NETWORK_PROBLEM";
40
+ QUALITY[QUALITY["RECONNECTING"] = 5] = "RECONNECTING";
41
+ })(QUALITY = exports.QUALITY || (exports.QUALITY = {}));
49
42
  var REASON;
50
43
  (function (REASON) {
51
44
  REASON[REASON["NORMAL"] = 0] = "NORMAL";
@@ -59,7 +52,25 @@ var REASON;
59
52
  REASON[REASON["TIMEOUT_ECONN"] = 8] = "TIMEOUT_ECONN";
60
53
  REASON[REASON["DATACHANNEL"] = 9] = "DATACHANNEL";
61
54
  REASON[REASON["REJECTED"] = 10] = "REJECTED";
55
+ REASON[REASON["OUTDATED_CLIENT"] = 11] = "OUTDATED_CLIENT";
56
+ REASON[REASON["NOONE_JOINED"] = 12] = "NOONE_JOINED";
57
+ REASON[REASON["EVERYONE_LEFT"] = 13] = "EVERYONE_LEFT";
58
+ REASON[REASON["AUTH_FAILED"] = 14] = "AUTH_FAILED";
59
+ REASON[REASON["AUTH_FAILED_START"] = 15] = "AUTH_FAILED_START";
62
60
  })(REASON = exports.REASON || (exports.REASON = {}));
61
+ var LOG_LEVEL;
62
+ (function (LOG_LEVEL) {
63
+ LOG_LEVEL[LOG_LEVEL["DEBUG"] = 0] = "DEBUG";
64
+ LOG_LEVEL[LOG_LEVEL["INFO"] = 1] = "INFO";
65
+ LOG_LEVEL[LOG_LEVEL["WARN"] = 2] = "WARN";
66
+ LOG_LEVEL[LOG_LEVEL["ERROR"] = 3] = "ERROR";
67
+ })(LOG_LEVEL = exports.LOG_LEVEL || (exports.LOG_LEVEL = {}));
68
+ var AUDIO_STATE;
69
+ (function (AUDIO_STATE) {
70
+ AUDIO_STATE[AUDIO_STATE["CONNECTING"] = 0] = "CONNECTING";
71
+ AUDIO_STATE[AUDIO_STATE["ESTABLISHED"] = 1] = "ESTABLISHED";
72
+ AUDIO_STATE[AUDIO_STATE["NETWORK_PROBLEM"] = 2] = "NETWORK_PROBLEM";
73
+ })(AUDIO_STATE = exports.AUDIO_STATE || (exports.AUDIO_STATE = {}));
63
74
  var VIDEO_STATE;
64
75
  (function (VIDEO_STATE) {
65
76
  VIDEO_STATE[VIDEO_STATE["STOPPED"] = 0] = "STOPPED";
@@ -67,118 +78,146 @@ var VIDEO_STATE;
67
78
  VIDEO_STATE[VIDEO_STATE["BAD_CONN"] = 2] = "BAD_CONN";
68
79
  VIDEO_STATE[VIDEO_STATE["PAUSED"] = 3] = "PAUSED";
69
80
  VIDEO_STATE[VIDEO_STATE["SCREENSHARE"] = 4] = "SCREENSHARE";
81
+ VIDEO_STATE[VIDEO_STATE["RECONNECTING"] = 5] = "RECONNECTING";
70
82
  })(VIDEO_STATE = exports.VIDEO_STATE || (exports.VIDEO_STATE = {}));
71
83
  var ENV;
72
84
  (function (ENV) {
73
85
  ENV[ENV["DEFAULT"] = 0] = "DEFAULT";
74
86
  ENV[ENV["FIREFOX"] = 1] = "FIREFOX";
75
87
  })(ENV = exports.ENV || (exports.ENV = {}));
76
- var ERROR;
77
- (function (ERROR) {
78
- ERROR[ERROR["NO_MEMORY"] = 12] = "NO_MEMORY";
79
- ERROR[ERROR["INVALID"] = 22] = "INVALID";
80
- ERROR[ERROR["TIMED_OUT"] = 110] = "TIMED_OUT";
81
- ERROR[ERROR["ALREADY"] = 114] = "ALREADY";
82
- ERROR[ERROR["UNKNOWN_PROTOCOL"] = 1000] = "UNKNOWN_PROTOCOL";
83
- })(ERROR = exports.ERROR || (exports.ERROR = {}));
84
88
  var CALL_TYPE;
85
89
  (function (CALL_TYPE) {
86
90
  CALL_TYPE[CALL_TYPE["NORMAL"] = 0] = "NORMAL";
87
91
  CALL_TYPE[CALL_TYPE["VIDEO"] = 1] = "VIDEO";
88
92
  CALL_TYPE[CALL_TYPE["FORCED_AUDIO"] = 2] = "FORCED_AUDIO";
89
93
  })(CALL_TYPE = exports.CALL_TYPE || (exports.CALL_TYPE = {}));
90
- var QUALITY;
91
- (function (QUALITY) {
92
- QUALITY[QUALITY["NORMAL"] = 1] = "NORMAL";
93
- QUALITY[QUALITY["MEDIUM"] = 2] = "MEDIUM";
94
- QUALITY[QUALITY["POOR"] = 3] = "POOR";
95
- })(QUALITY = exports.QUALITY || (exports.QUALITY = {}));
94
+ var CONV_TYPE;
95
+ (function (CONV_TYPE) {
96
+ CONV_TYPE[CONV_TYPE["ONEONONE"] = 0] = "ONEONONE";
97
+ CONV_TYPE[CONV_TYPE["GROUP"] = 1] = "GROUP";
98
+ CONV_TYPE[CONV_TYPE["CONFERENCE"] = 2] = "CONFERENCE";
99
+ CONV_TYPE[CONV_TYPE["CONFERENCE_MLS"] = 3] = "CONFERENCE_MLS";
100
+ })(CONV_TYPE = exports.CONV_TYPE || (exports.CONV_TYPE = {}));
101
+ var STATE;
102
+ (function (STATE) {
103
+ STATE[STATE["NONE"] = 0] = "NONE";
104
+ STATE[STATE["OUTGOING"] = 1] = "OUTGOING";
105
+ STATE[STATE["INCOMING"] = 2] = "INCOMING";
106
+ STATE[STATE["ANSWERED"] = 3] = "ANSWERED";
107
+ STATE[STATE["MEDIA_ESTAB"] = 4] = "MEDIA_ESTAB";
108
+ STATE[STATE["TERM_LOCAL"] = 6] = "TERM_LOCAL";
109
+ STATE[STATE["TERM_REMOTE"] = 7] = "TERM_REMOTE";
110
+ STATE[STATE["UNKNOWN"] = 8] = "UNKNOWN";
111
+ })(STATE = exports.STATE || (exports.STATE = {}));
112
+ var VSTREAMS;
113
+ (function (VSTREAMS) {
114
+ VSTREAMS[VSTREAMS["LIST"] = 0] = "LIST";
115
+ })(VSTREAMS = exports.VSTREAMS || (exports.VSTREAMS = {}));
116
+ var RESOLUTION;
117
+ (function (RESOLUTION) {
118
+ RESOLUTION[RESOLUTION["ANY"] = 0] = "ANY";
119
+ RESOLUTION[RESOLUTION["LOW"] = 1] = "LOW";
120
+ RESOLUTION[RESOLUTION["HIGH"] = 2] = "HIGH";
121
+ })(RESOLUTION = exports.RESOLUTION || (exports.RESOLUTION = {}));
122
+ var MODE;
123
+ (function (MODE) {
124
+ MODE[MODE["MARSHAL"] = 0] = "MARSHAL";
125
+ MODE[MODE["DIRECT"] = 1] = "DIRECT";
126
+ })(MODE = exports.MODE || (exports.MODE = {}));
96
127
  var instance;
97
128
  var logFn;
98
- var logHandler = function (level, msg) {
129
+ var logHandler = function (level, msg, err) {
99
130
  if (logFn)
100
- logFn(level, msg, 0);
101
- else
102
- console.log(msg);
131
+ logFn(level, msg, err);
132
+ else {
133
+ if (err)
134
+ console.log(msg, err);
135
+ else
136
+ console.log(msg);
137
+ }
103
138
  };
104
139
  var Wcall = /** @class */ (function () {
105
140
  function Wcall(em_module) {
106
141
  this.em_module = em_module;
107
142
  }
108
143
  Wcall.prototype.init = function (env) {
109
- avs_pc_js_1.default.init(this.em_module, logHandler);
144
+ avs_pc_1.default.init(this.em_module, logHandler);
110
145
  this.em_module.ccall("wcall_setup", "number", [], []);
111
146
  return this.em_module.ccall("wcall_init", "number", ["number"], [env]);
112
147
  };
113
148
  Wcall.prototype.close = function () {
114
149
  this.em_module.ccall("wcall_close", "null", [], []);
115
150
  };
116
- Wcall.prototype.create = function (userid, clientid, readyh, sendh, incomingh, missedh, answerh, estabh, closeh, metricsh, cfg_reqh, acbrh, vstateh, arg) {
151
+ Wcall.prototype.create = function (userid, clientid, readyh, sendh, sfth, incomingh, missedh, answerh, estabh, closeh, metricsh, cfg_reqh, acbrh, vstateh, arg) {
117
152
  var _this = this;
118
153
  if (arg === void 0) { arg = 0; }
119
154
  var fn_readyh = this.em_module.addFunction(function (version, arg) {
120
155
  if (readyh) {
121
156
  readyh(version, arg);
122
157
  }
123
- }, "vnn");
124
- var fn_sendh = this.em_module.addFunction(function (ctx, convid, userid_self, clientid_self, userid_dest, clientid_dest, data, len, trans, arg) {
158
+ }, "vii");
159
+ var fn_sendh = this.em_module.addFunction(function (ctx, convid, userid_self, clientid_self, targets, unused, data, len, trans, my_clients_only, arg) {
125
160
  if (sendh) {
126
161
  return sendh(ctx, convid == 0 ? null : _this.em_module.UTF8ToString(convid), userid_self == 0 ? null : _this.em_module.UTF8ToString(userid_self), clientid_self == 0
127
162
  ? null
128
- : _this.em_module.UTF8ToString(clientid_self), userid_dest == 0 ? null : _this.em_module.UTF8ToString(userid_dest), clientid_dest == 0
129
- ? null
130
- : _this.em_module.UTF8ToString(clientid_dest), data == 0 ? null : _this.em_module.UTF8ToString(data), len, trans, arg);
163
+ : _this.em_module.UTF8ToString(clientid_self), targets == 0 ? null : _this.em_module.UTF8ToString(targets), unused == 0 ? null : _this.em_module.UTF8ToString(unused), data == 0 ? null : _this.em_module.UTF8ToString(data), len, trans, my_clients_only, arg);
164
+ }
165
+ return null;
166
+ }, "iiiiiiiiiiii");
167
+ var fn_sfth = this.em_module.addFunction(function (ctx, url, data, len, arg) {
168
+ if (sfth) {
169
+ return sfth(ctx, url == 0 ? null : _this.em_module.UTF8ToString(url), data == 0 ? null : _this.em_module.UTF8ToString(data), len, arg);
131
170
  }
132
171
  return null;
133
- }, "nnssssssnnn");
134
- var fn_incomingh = this.em_module.addFunction(function (convid, msg_time, userid, video_call, should_ring, arg) {
172
+ }, "iiiiii");
173
+ var fn_incomingh = this.em_module.addFunction(function (convid, msg_time, userid, clientid, video_call, should_ring, conv_type, arg) {
135
174
  if (incomingh) {
136
- incomingh(convid == 0 ? null : _this.em_module.UTF8ToString(convid), msg_time, userid == 0 ? null : _this.em_module.UTF8ToString(userid), video_call, should_ring, arg);
175
+ incomingh(convid == 0 ? null : _this.em_module.UTF8ToString(convid), msg_time, userid == 0 ? null : _this.em_module.UTF8ToString(userid), clientid == 0 ? null : _this.em_module.UTF8ToString(clientid), video_call, should_ring, conv_type, arg);
137
176
  }
138
- }, "vsnsnnn");
139
- var fn_missedh = this.em_module.addFunction(function (convid, msg_time, userid, video_call, arg) {
177
+ }, "viiiiiiii");
178
+ var fn_missedh = this.em_module.addFunction(function (convid, msg_time, userid, clientid, video_call, arg) {
140
179
  if (missedh) {
141
- missedh(convid == 0 ? null : _this.em_module.UTF8ToString(convid), msg_time, userid == 0 ? null : _this.em_module.UTF8ToString(userid), video_call, arg);
180
+ missedh(convid == 0 ? null : _this.em_module.UTF8ToString(convid), msg_time, userid == 0 ? null : _this.em_module.UTF8ToString(userid), clientid == 0 ? null : _this.em_module.UTF8ToString(clientid), video_call, arg);
142
181
  }
143
- }, "vsnsnn");
182
+ }, "viiiiii");
144
183
  var fn_answerh = this.em_module.addFunction(function (convid, arg) {
145
184
  if (answerh) {
146
185
  answerh(convid == 0 ? null : _this.em_module.UTF8ToString(convid), arg);
147
186
  }
148
- }, "vsn");
149
- var fn_estabh = this.em_module.addFunction(function (convid, userid, arg) {
187
+ }, "vii");
188
+ var fn_estabh = this.em_module.addFunction(function (convid, userid, clientid, arg) {
150
189
  if (estabh) {
151
- estabh(convid == 0 ? null : _this.em_module.UTF8ToString(convid), userid == 0 ? null : _this.em_module.UTF8ToString(userid), arg);
190
+ estabh(convid == 0 ? null : _this.em_module.UTF8ToString(convid), userid == 0 ? null : _this.em_module.UTF8ToString(userid), clientid == 0 ? null : _this.em_module.UTF8ToString(clientid), arg);
152
191
  }
153
- }, "vssn");
154
- var fn_closeh = this.em_module.addFunction(function (reason, convid, msg_time, userid, arg) {
192
+ }, "viiii");
193
+ var fn_closeh = this.em_module.addFunction(function (reason, convid, msg_time, userid, clientid, arg) {
155
194
  if (closeh) {
156
- closeh(reason, convid == 0 ? null : _this.em_module.UTF8ToString(convid), msg_time, userid == 0 ? null : _this.em_module.UTF8ToString(userid), arg);
195
+ closeh(reason, convid == 0 ? null : _this.em_module.UTF8ToString(convid), msg_time, userid == 0 ? null : _this.em_module.UTF8ToString(userid), clientid == 0 ? null : _this.em_module.UTF8ToString(clientid), arg);
157
196
  }
158
- }, "vnsnsn");
197
+ }, "viiiiii");
159
198
  var fn_metricsh = this.em_module.addFunction(function (convid, metrics_json, arg) {
160
199
  if (metricsh) {
161
200
  metricsh(convid == 0 ? null : _this.em_module.UTF8ToString(convid), metrics_json == 0
162
201
  ? null
163
202
  : _this.em_module.UTF8ToString(metrics_json), arg);
164
203
  }
165
- }, "vssn");
204
+ }, "viii");
166
205
  var fn_cfg_reqh = this.em_module.addFunction(function (wuser, arg) {
167
206
  if (cfg_reqh) {
168
207
  return cfg_reqh(wuser, arg);
169
208
  }
170
209
  return null;
171
- }, "nnn");
172
- var fn_acbrh = this.em_module.addFunction(function (userid, enabled, arg) {
210
+ }, "iii");
211
+ var fn_acbrh = this.em_module.addFunction(function (userid, clientid, enabled, arg) {
173
212
  if (acbrh) {
174
- acbrh(userid == 0 ? null : _this.em_module.UTF8ToString(userid), enabled, arg);
213
+ acbrh(userid == 0 ? null : _this.em_module.UTF8ToString(userid), clientid == 0 ? null : _this.em_module.UTF8ToString(clientid), enabled, arg);
175
214
  }
176
- }, "vsnn");
215
+ }, "viiii");
177
216
  var fn_vstateh = this.em_module.addFunction(function (convid, userid, clientid, state, arg) {
178
217
  if (vstateh) {
179
218
  vstateh(convid == 0 ? null : _this.em_module.UTF8ToString(convid), userid == 0 ? null : _this.em_module.UTF8ToString(userid), clientid == 0 ? null : _this.em_module.UTF8ToString(clientid), state, arg);
180
219
  }
181
- }, "vsssnn");
220
+ }, "viiiii");
182
221
  return this.em_module.ccall("wcall_create", "number", [
183
222
  "string",
184
223
  "string",
@@ -193,12 +232,14 @@ var Wcall = /** @class */ (function () {
193
232
  "number",
194
233
  "number",
195
234
  "number",
196
- "number"
235
+ "number",
236
+ "number",
197
237
  ], [
198
238
  userid,
199
239
  clientid,
200
240
  fn_readyh,
201
241
  fn_sendh,
242
+ fn_sfth,
202
243
  fn_incomingh,
203
244
  fn_missedh,
204
245
  fn_answerh,
@@ -208,7 +249,7 @@ var Wcall = /** @class */ (function () {
208
249
  fn_cfg_reqh,
209
250
  fn_acbrh,
210
251
  fn_vstateh,
211
- arg
252
+ arg,
212
253
  ]);
213
254
  };
214
255
  Wcall.prototype.createEx = function (userid, clientid, use_mediamgr, msys_name, readyh, sendh, sfth, incomingh, missedh, answerh, estabh, closeh, metricsh, cfg_reqh, acbrh, vstateh, arg) {
@@ -218,71 +259,69 @@ var Wcall = /** @class */ (function () {
218
259
  if (readyh) {
219
260
  readyh(version, arg);
220
261
  }
221
- }, "vnn");
222
- var fn_sendh = this.em_module.addFunction(function (ctx, convid, userid_self, clientid_self, userid_dest, clientid_dest, data, len, trans, arg) {
262
+ }, "vii");
263
+ var fn_sendh = this.em_module.addFunction(function (ctx, convid, userid_self, clientid_self, targets, unused, data, len, trans, my_clients_only, arg) {
223
264
  if (sendh) {
224
265
  return sendh(ctx, convid == 0 ? null : _this.em_module.UTF8ToString(convid), userid_self == 0 ? null : _this.em_module.UTF8ToString(userid_self), clientid_self == 0
225
266
  ? null
226
- : _this.em_module.UTF8ToString(clientid_self), userid_dest == 0 ? null : _this.em_module.UTF8ToString(userid_dest), clientid_dest == 0
227
- ? null
228
- : _this.em_module.UTF8ToString(clientid_dest), data == 0 ? null : _this.em_module.UTF8ToString(data), len, trans, arg);
267
+ : _this.em_module.UTF8ToString(clientid_self), targets == 0 ? null : _this.em_module.UTF8ToString(targets), unused == 0 ? null : _this.em_module.UTF8ToString(unused), data == 0 ? null : _this.em_module.UTF8ToString(data), len, trans, my_clients_only, arg);
229
268
  }
230
269
  return null;
231
- }, "nnssssssnnn");
270
+ }, "iiiiiiiiiiii");
232
271
  var fn_sfth = this.em_module.addFunction(function (ctx, url, data, len, arg) {
233
272
  if (sfth) {
234
273
  return sfth(ctx, url == 0 ? null : _this.em_module.UTF8ToString(url), data == 0 ? null : _this.em_module.UTF8ToString(data), len, arg);
235
274
  }
236
275
  return null;
237
- }, "nnssnn");
238
- var fn_incomingh = this.em_module.addFunction(function (convid, msg_time, userid, video_call, should_ring, arg) {
276
+ }, "iiiiii");
277
+ var fn_incomingh = this.em_module.addFunction(function (convid, msg_time, userid, clientid, video_call, should_ring, conv_type, arg) {
239
278
  if (incomingh) {
240
- incomingh(convid == 0 ? null : _this.em_module.UTF8ToString(convid), msg_time, userid == 0 ? null : _this.em_module.UTF8ToString(userid), video_call, should_ring, arg);
279
+ incomingh(convid == 0 ? null : _this.em_module.UTF8ToString(convid), msg_time, userid == 0 ? null : _this.em_module.UTF8ToString(userid), clientid == 0 ? null : _this.em_module.UTF8ToString(clientid), video_call, should_ring, conv_type, arg);
241
280
  }
242
- }, "vsnsnnn");
243
- var fn_missedh = this.em_module.addFunction(function (convid, msg_time, userid, video_call, arg) {
281
+ }, "viiiiiiii");
282
+ var fn_missedh = this.em_module.addFunction(function (convid, msg_time, userid, clientid, video_call, arg) {
244
283
  if (missedh) {
245
- missedh(convid == 0 ? null : _this.em_module.UTF8ToString(convid), msg_time, userid == 0 ? null : _this.em_module.UTF8ToString(userid), video_call, arg);
284
+ missedh(convid == 0 ? null : _this.em_module.UTF8ToString(convid), msg_time, userid == 0 ? null : _this.em_module.UTF8ToString(userid), clientid == 0 ? null : _this.em_module.UTF8ToString(clientid), video_call, arg);
246
285
  }
247
- }, "vsnsnn");
286
+ }, "viiiiii");
248
287
  var fn_answerh = this.em_module.addFunction(function (convid, arg) {
249
288
  if (answerh) {
250
289
  answerh(convid == 0 ? null : _this.em_module.UTF8ToString(convid), arg);
251
290
  }
252
- }, "vsn");
253
- var fn_estabh = this.em_module.addFunction(function (convid, userid, arg) {
291
+ }, "vii");
292
+ var fn_estabh = this.em_module.addFunction(function (convid, userid, clientid, arg) {
254
293
  if (estabh) {
255
- estabh(convid == 0 ? null : _this.em_module.UTF8ToString(convid), userid == 0 ? null : _this.em_module.UTF8ToString(userid), arg);
294
+ estabh(convid == 0 ? null : _this.em_module.UTF8ToString(convid), userid == 0 ? null : _this.em_module.UTF8ToString(userid), clientid == 0 ? null : _this.em_module.UTF8ToString(clientid), arg);
256
295
  }
257
- }, "vssn");
258
- var fn_closeh = this.em_module.addFunction(function (reason, convid, msg_time, userid, arg) {
296
+ }, "viiii");
297
+ var fn_closeh = this.em_module.addFunction(function (reason, convid, msg_time, userid, clientid, arg) {
259
298
  if (closeh) {
260
- closeh(reason, convid == 0 ? null : _this.em_module.UTF8ToString(convid), msg_time, userid == 0 ? null : _this.em_module.UTF8ToString(userid), arg);
299
+ closeh(reason, convid == 0 ? null : _this.em_module.UTF8ToString(convid), msg_time, userid == 0 ? null : _this.em_module.UTF8ToString(userid), clientid == 0 ? null : _this.em_module.UTF8ToString(clientid), arg);
261
300
  }
262
- }, "vnsnsn");
301
+ }, "viiiiii");
263
302
  var fn_metricsh = this.em_module.addFunction(function (convid, metrics_json, arg) {
264
303
  if (metricsh) {
265
304
  metricsh(convid == 0 ? null : _this.em_module.UTF8ToString(convid), metrics_json == 0
266
305
  ? null
267
306
  : _this.em_module.UTF8ToString(metrics_json), arg);
268
307
  }
269
- }, "vssn");
308
+ }, "viii");
270
309
  var fn_cfg_reqh = this.em_module.addFunction(function (wuser, arg) {
271
310
  if (cfg_reqh) {
272
311
  return cfg_reqh(wuser, arg);
273
312
  }
274
313
  return null;
275
- }, "nnn");
276
- var fn_acbrh = this.em_module.addFunction(function (userid, enabled, arg) {
314
+ }, "iii");
315
+ var fn_acbrh = this.em_module.addFunction(function (userid, clientid, enabled, arg) {
277
316
  if (acbrh) {
278
- acbrh(userid == 0 ? null : _this.em_module.UTF8ToString(userid), enabled, arg);
317
+ acbrh(userid == 0 ? null : _this.em_module.UTF8ToString(userid), clientid == 0 ? null : _this.em_module.UTF8ToString(clientid), enabled, arg);
279
318
  }
280
- }, "vsnn");
319
+ }, "viiii");
281
320
  var fn_vstateh = this.em_module.addFunction(function (convid, userid, clientid, state, arg) {
282
321
  if (vstateh) {
283
322
  vstateh(convid == 0 ? null : _this.em_module.UTF8ToString(convid), userid == 0 ? null : _this.em_module.UTF8ToString(userid), clientid == 0 ? null : _this.em_module.UTF8ToString(clientid), state, arg);
284
323
  }
285
- }, "vsssnn");
324
+ }, "viiiii");
286
325
  return this.em_module.ccall("wcall_create_ex", "number", [
287
326
  "string",
288
327
  "string",
@@ -300,7 +339,7 @@ var Wcall = /** @class */ (function () {
300
339
  "number",
301
340
  "number",
302
341
  "number",
303
- "number"
342
+ "number",
304
343
  ], [
305
344
  userid,
306
345
  clientid,
@@ -318,7 +357,7 @@ var Wcall = /** @class */ (function () {
318
357
  fn_cfg_reqh,
319
358
  fn_acbrh,
320
359
  fn_vstateh,
321
- arg
360
+ arg,
322
361
  ]);
323
362
  };
324
363
  Wcall.prototype.setShutdownHandler = function (wuser, shuth, arg) {
@@ -327,7 +366,7 @@ var Wcall = /** @class */ (function () {
327
366
  if (shuth) {
328
367
  shuth(wuser, arg);
329
368
  }
330
- }, "vnn");
369
+ }, "vii");
331
370
  this.em_module.ccall("wcall_set_shutdown_handler", "null", ["number", "number", "number"], [wuser, fn_shuth, arg]);
332
371
  };
333
372
  Wcall.prototype.destroy = function (wuser) {
@@ -336,42 +375,15 @@ var Wcall = /** @class */ (function () {
336
375
  Wcall.prototype.setTrace = function (wuser, trace) {
337
376
  this.em_module.ccall("wcall_set_trace", "null", ["number", "number"], [wuser, trace]);
338
377
  };
339
- Wcall.prototype.start = function (wuser, convid, call_type, conv_type, audio_cbr) {
340
- return this.em_module.ccall("wcall_start", "number", ["number", "string", "number", "number", "number"], [wuser, convid, call_type, conv_type, audio_cbr]);
378
+ Wcall.prototype.setBackground = function (wuser, background) {
379
+ return this.em_module.ccall("wcall_set_background", "number", ["number", "number"], [wuser, background]);
341
380
  };
342
- Wcall.prototype.startEx = function (wuser, convid, sft_url, sft_token, call_type, conv_type, audio_cbr, extcodec_arg) {
343
- return this.em_module.ccall("wcall_start_ex", "number", [
344
- "number",
345
- "string",
346
- "string",
347
- "string",
348
- "number",
349
- "number",
350
- "number",
351
- "number"
352
- ], [
353
- wuser,
354
- convid,
355
- sft_url,
356
- sft_token,
357
- call_type,
358
- conv_type,
359
- audio_cbr,
360
- extcodec_arg
361
- ]);
362
- };
363
- Wcall.prototype.confStart = function (wuser, convid, sft_url, sft_token, call_type, audio_cbr) {
364
- return this.em_module.ccall("wcall_conf_start", "number", ["number", "string", "string", "string", "number", "number"], [wuser, convid, sft_url, sft_token, call_type, audio_cbr]);
381
+ Wcall.prototype.start = function (wuser, convid, call_type, conv_type, audio_cbr, meeting) {
382
+ return this.em_module.ccall("wcall_start", "number", ["number", "string", "number", "number", "number", "number"], [wuser, convid, call_type, conv_type, audio_cbr, meeting]);
365
383
  };
366
384
  Wcall.prototype.answer = function (wuser, convid, call_type, audio_cbr) {
367
385
  return this.em_module.ccall("wcall_answer", "number", ["number", "string", "number", "number"], [wuser, convid, call_type, audio_cbr]);
368
386
  };
369
- Wcall.prototype.answerEx = function (wuser, convid, sft_url, sft_token, call_type, audio_cbr, extcodec_arg) {
370
- return this.em_module.ccall("wcall_answer_ex", "number", ["number", "string", "string", "string", "number", "number", "number"], [wuser, convid, sft_url, sft_token, call_type, audio_cbr, extcodec_arg]);
371
- };
372
- Wcall.prototype.confAnswer = function (wuser, convid, sft_url, sft_token, call_type, audio_cbr) {
373
- return this.em_module.ccall("wcall_conf_answer", "number", ["number", "string", "string", "string", "number", "number"], [wuser, convid, sft_url, sft_token, call_type, audio_cbr]);
374
- };
375
387
  Wcall.prototype.resp = function (wuser, status, reason, ctx) {
376
388
  this.em_module.ccall("wcall_resp", "null", ["number", "number", "string", "number"], [wuser, status, reason, ctx]);
377
389
  };
@@ -381,7 +393,7 @@ var Wcall = /** @class */ (function () {
381
393
  Wcall.prototype.sftResp = function (wuser, perr, buf, len, ctx) {
382
394
  this.em_module.ccall("wcall_sft_resp", "null", ["number", "number", "string", "number", "number"], [wuser, perr, buf, len, ctx]);
383
395
  };
384
- Wcall.prototype.recvMsg = function (wuser, buf, len, curr_time, msg_time, convid, userid, clientid) {
396
+ Wcall.prototype.recvMsg = function (wuser, buf, len, curr_time, msg_time, convid, userid, clientid, conv_type, meeting) {
385
397
  return this.em_module.ccall("wcall_recv_msg", "number", [
386
398
  "number",
387
399
  "string",
@@ -390,8 +402,21 @@ var Wcall = /** @class */ (function () {
390
402
  "number",
391
403
  "string",
392
404
  "string",
393
- "string"
394
- ], [wuser, buf, len, curr_time, msg_time, convid, userid, clientid]);
405
+ "string",
406
+ "number",
407
+ "number",
408
+ ], [
409
+ wuser,
410
+ buf,
411
+ len,
412
+ curr_time,
413
+ msg_time,
414
+ convid,
415
+ userid,
416
+ clientid,
417
+ conv_type,
418
+ meeting,
419
+ ]);
395
420
  };
396
421
  Wcall.prototype.end = function (wuser, convid) {
397
422
  this.em_module.ccall("wcall_end", "null", ["number", "string"], [wuser, convid]);
@@ -404,11 +429,11 @@ var Wcall = /** @class */ (function () {
404
429
  };
405
430
  Wcall.prototype.setMediaEstabHandler = function (wuser, mestabh) {
406
431
  var _this = this;
407
- var fn_mestabh = this.em_module.addFunction(function (convid, peer, userid, arg) {
432
+ var fn_mestabh = this.em_module.addFunction(function (convid, peer, userid, clientid, arg) {
408
433
  if (mestabh) {
409
- mestabh(convid == 0 ? null : _this.em_module.UTF8ToString(convid), peer, userid == 0 ? null : _this.em_module.UTF8ToString(userid), arg);
434
+ mestabh(convid == 0 ? null : _this.em_module.UTF8ToString(convid), peer, userid == 0 ? null : _this.em_module.UTF8ToString(userid), clientid == 0 ? null : _this.em_module.UTF8ToString(clientid), arg);
410
435
  }
411
- }, "vsnsn");
436
+ }, "viiiii");
412
437
  this.em_module.ccall("wcall_set_media_estab_handler", "null", ["number", "number"], [wuser, fn_mestabh]);
413
438
  };
414
439
  Wcall.prototype.setMediaStoppedHandler = function (wuser, mstoph) {
@@ -417,33 +442,29 @@ var Wcall = /** @class */ (function () {
417
442
  if (mstoph) {
418
443
  mstoph(convid == 0 ? null : _this.em_module.UTF8ToString(convid), arg);
419
444
  }
420
- }, "vsn");
445
+ }, "vii");
421
446
  this.em_module.ccall("wcall_set_media_stopped_handler", "null", ["number", "number"], [wuser, fn_mstoph]);
422
447
  };
423
448
  Wcall.prototype.setDataChanEstabHandler = function (wuser, dcestabh) {
424
449
  var _this = this;
425
- var fn_dcestabh = this.em_module.addFunction(function (convid, userid, arg) {
450
+ var fn_dcestabh = this.em_module.addFunction(function (convid, userid, clientid, arg) {
426
451
  if (dcestabh) {
427
- dcestabh(convid == 0 ? null : _this.em_module.UTF8ToString(convid), userid == 0 ? null : _this.em_module.UTF8ToString(userid), arg);
452
+ dcestabh(convid == 0 ? null : _this.em_module.UTF8ToString(convid), userid == 0 ? null : _this.em_module.UTF8ToString(userid), clientid == 0 ? null : _this.em_module.UTF8ToString(clientid), arg);
428
453
  }
429
- }, "vssn");
454
+ }, "viiii");
430
455
  this.em_module.ccall("wcall_set_data_chan_estab_handler", "null", ["number", "number"], [wuser, fn_dcestabh]);
431
456
  };
432
- Wcall.prototype.setExtcodecArg = function (wuser, peer, convid, userid, arg) {
433
- if (arg === void 0) { arg = 0; }
434
- this.em_module.ccall("wcall_set_extcodec_arg", "null", ["number", "number", "string", "string", "number"], [wuser, peer, convid, userid, arg]);
435
- };
436
457
  Wcall.prototype.setVideoSendState = function (wuser, convid, state) {
437
458
  this.em_module.ccall("wcall_set_video_send_state", "null", ["number", "string", "number"], [wuser, convid, state]);
438
459
  };
439
460
  Wcall.prototype.setVideoHandlers = function (render_frame_h, size_h, arg) {
440
461
  var _this = this;
441
462
  if (arg === void 0) { arg = 0; }
442
- var fn_size_h = this.em_module.addFunction(function (w, h, userid, arg) {
463
+ var fn_size_h = this.em_module.addFunction(function (w, h, userid, clientid, arg) {
443
464
  if (size_h) {
444
- size_h(w, h, userid == 0 ? null : _this.em_module.UTF8ToString(userid), arg);
465
+ size_h(w, h, userid == 0 ? null : _this.em_module.UTF8ToString(userid), clientid == 0 ? null : _this.em_module.UTF8ToString(clientid), arg);
445
466
  }
446
- }, "vnnsn");
467
+ }, "viiiii");
447
468
  this.em_module.ccall("wcall_set_video_handlers", "null", ["wcall_render_frame_h*", "number", "number"], [render_frame_h, fn_size_h, arg]);
448
469
  };
449
470
  Wcall.prototype.networkChanged = function (wuser) {
@@ -456,7 +477,7 @@ var Wcall = /** @class */ (function () {
456
477
  if (chgh) {
457
478
  chgh(convid == 0 ? null : _this.em_module.UTF8ToString(convid), arg);
458
479
  }
459
- }, "vsn");
480
+ }, "vii");
460
481
  this.em_module.ccall("wcall_set_group_changed_handler", "null", ["number", "number", "number"], [wuser, fn_chgh, arg]);
461
482
  };
462
483
  Wcall.prototype.setParticipantChangedHandler = function (wuser, chgh, arg) {
@@ -466,17 +487,17 @@ var Wcall = /** @class */ (function () {
466
487
  if (chgh) {
467
488
  chgh(convid == 0 ? null : _this.em_module.UTF8ToString(convid), mjson == 0 ? null : _this.em_module.UTF8ToString(mjson), arg);
468
489
  }
469
- }, "vssn");
490
+ }, "viii");
470
491
  this.em_module.ccall("wcall_set_participant_changed_handler", "null", ["number", "number", "number"], [wuser, fn_chgh, arg]);
471
492
  };
472
493
  Wcall.prototype.setNetworkQualityHandler = function (wuser, netqh, interval, arg) {
473
494
  var _this = this;
474
495
  if (arg === void 0) { arg = 0; }
475
- var fn_netqh = this.em_module.addFunction(function (convid, userid, quality, rtt, uploss, downloss, arg) {
496
+ var fn_netqh = this.em_module.addFunction(function (convid, userid, clientid, quality, rtt, uploss, downloss, arg) {
476
497
  if (netqh) {
477
- netqh(convid == 0 ? null : _this.em_module.UTF8ToString(convid), userid == 0 ? null : _this.em_module.UTF8ToString(userid), quality, rtt, uploss, downloss, arg);
498
+ netqh(convid == 0 ? null : _this.em_module.UTF8ToString(convid), userid == 0 ? null : _this.em_module.UTF8ToString(userid), clientid == 0 ? null : _this.em_module.UTF8ToString(clientid), quality, rtt, uploss, downloss, arg);
478
499
  }
479
- }, "vssnnnnn");
500
+ }, "viiiiiiii");
480
501
  return this.em_module.ccall("wcall_set_network_quality_handler", "number", ["number", "number", "number", "number"], [wuser, fn_netqh, interval, arg]);
481
502
  };
482
503
  Wcall.prototype.setLogHandler = function (logh, arg) {
@@ -486,10 +507,22 @@ var Wcall = /** @class */ (function () {
486
507
  if (logh) {
487
508
  logh(level, msg == 0 ? null : _this.em_module.UTF8ToString(msg), arg);
488
509
  }
489
- }, "vnsn");
510
+ }, "viii");
490
511
  logFn = logh;
491
512
  this.em_module.ccall("wcall_set_log_handler", "null", ["number", "number"], [fn_logh, arg]);
492
513
  };
514
+ Wcall.prototype.setEpochInfo = function (wuser, convid, epochid, clients_json, key_base64) {
515
+ return this.em_module.ccall("wcall_set_epoch_info", "number", ["number", "string", "number", "string", "string"], [wuser, convid, epochid, clients_json, key_base64]);
516
+ };
517
+ Wcall.prototype.setReqNewEpochHandler = function (wuser, req_new_epochh) {
518
+ var _this = this;
519
+ var fn_req_new_epochh = this.em_module.addFunction(function (wuser, convid, arg) {
520
+ if (req_new_epochh) {
521
+ req_new_epochh(wuser, convid == 0 ? null : _this.em_module.UTF8ToString(convid), arg);
522
+ }
523
+ }, "viii");
524
+ this.em_module.ccall("wcall_set_req_new_epoch_handler", "null", ["number", "number"], [wuser, fn_req_new_epochh]);
525
+ };
493
526
  Wcall.prototype.getMute = function (wuser) {
494
527
  return this.em_module.ccall("wcall_get_mute", "number", ["number"], [wuser]);
495
528
  };
@@ -502,7 +535,7 @@ var Wcall = /** @class */ (function () {
502
535
  if (muteh) {
503
536
  muteh(muted, arg);
504
537
  }
505
- }, "vnn");
538
+ }, "vii");
506
539
  this.em_module.ccall("wcall_set_mute_handler", "null", ["number", "number", "number"], [wuser, fn_muteh, arg]);
507
540
  };
508
541
  Wcall.prototype.setStateHandler = function (wuser, stateh) {
@@ -511,7 +544,7 @@ var Wcall = /** @class */ (function () {
511
544
  if (stateh) {
512
545
  stateh(convid == 0 ? null : _this.em_module.UTF8ToString(convid), state, arg);
513
546
  }
514
- }, "vsnn");
547
+ }, "viii");
515
548
  this.em_module.ccall("wcall_set_state_handler", "null", ["number", "number"], [wuser, fn_stateh]);
516
549
  };
517
550
  Wcall.prototype.getState = function (wuser, convid) {
@@ -524,7 +557,7 @@ var Wcall = /** @class */ (function () {
524
557
  if (stateh) {
525
558
  stateh(convid == 0 ? null : _this.em_module.UTF8ToString(convid), state, arg);
526
559
  }
527
- }, "vsnn");
560
+ }, "viii");
528
561
  this.em_module.ccall("wcall_iterate_state", "null", ["number", "number", "number"], [wuser, fn_stateh, arg]);
529
562
  };
530
563
  Wcall.prototype.propsyncRequest = function (wuser, convid) {
@@ -533,46 +566,87 @@ var Wcall = /** @class */ (function () {
533
566
  Wcall.prototype.enablePrivacy = function (wuser, enabled) {
534
567
  this.em_module.ccall("wcall_enable_privacy", "null", ["number", "number"], [wuser, enabled]);
535
568
  };
569
+ Wcall.prototype.setProxy = function (host, port) {
570
+ return this.em_module.ccall("wcall_set_proxy", "number", ["string", "number"], [host, port]);
571
+ };
536
572
  Wcall.prototype.setReqClientsHandler = function (wuser, reqch) {
537
573
  var _this = this;
538
- var fn_reqch = this.em_module.addFunction(function (convid, arg) {
574
+ var fn_reqch = this.em_module.addFunction(function (wuser, convid, arg) {
539
575
  if (reqch) {
540
- reqch(convid == 0 ? null : _this.em_module.UTF8ToString(convid), arg);
576
+ reqch(wuser, convid == 0 ? null : _this.em_module.UTF8ToString(convid), arg);
541
577
  }
542
- }, "vsn");
578
+ }, "viii");
543
579
  this.em_module.ccall("wcall_set_req_clients_handler", "null", ["number", "number"], [wuser, fn_reqch]);
544
580
  };
545
- Wcall.prototype.setClientsForConv = function (wuser, convid, carray, clen) {
546
- return this.em_module.ccall("wcall_set_clients_for_conv", "number", ["number", "string", "string", "number"], [wuser, convid, carray, clen]);
581
+ Wcall.prototype.setClientsForConv = function (wuser, convid, json) {
582
+ return this.em_module.ccall("wcall_set_clients_for_conv", "number", ["number", "string", "string"], [wuser, convid, json]);
547
583
  };
548
- Wcall.prototype.setProxy = function (host, port) {
549
- return this.em_module.ccall("wcall_set_proxy", "number", ["string", "number"], [host, port]);
584
+ Wcall.prototype.setActiveSpeakerHandler = function (wuser, activeh) {
585
+ var _this = this;
586
+ var fn_activeh = this.em_module.addFunction(function (wuser, convid, json_levels, arg) {
587
+ if (activeh) {
588
+ activeh(wuser, convid == 0 ? null : _this.em_module.UTF8ToString(convid), json_levels == 0 ? null : _this.em_module.UTF8ToString(json_levels), arg);
589
+ }
590
+ }, "viiii");
591
+ this.em_module.ccall("wcall_set_active_speaker_handler", "null", ["number", "number"], [wuser, fn_activeh]);
592
+ };
593
+ Wcall.prototype.requestVideoStreams = function (wuser, convid, mode, json) {
594
+ return this.em_module.ccall("wcall_request_video_streams", "number", ["number", "string", "number", "string"], [wuser, convid, mode, json]);
595
+ };
596
+ Wcall.prototype.processNotifications = function (wuser, processing) {
597
+ return this.em_module.ccall("wcall_process_notifications", "number", ["number", "number"], [wuser, processing]);
598
+ };
599
+ Wcall.prototype.audioRecord = function (wuser, path) {
600
+ return this.em_module.ccall("wcall_audio_record", "number", ["number", "string"], [wuser, path]);
550
601
  };
551
602
  Wcall.prototype.poll = function () {
552
603
  this.em_module.ccall("wcall_poll", "null", [], []);
553
604
  };
605
+ Wcall.prototype.setupEx = function (flags) {
606
+ return this.em_module.ccall("wcall_setup_ex", "number", ["number"], [flags]);
607
+ };
608
+ Wcall.prototype.setMode = function (mode) {
609
+ this.em_module.ccall("wcall_set_mode", "null", ["number"], [mode]);
610
+ };
611
+ Wcall.prototype.getMode = function () {
612
+ return this.em_module.ccall("wcall_get_mode", "number", [], []);
613
+ };
554
614
  Wcall.prototype.setUserMediaHandler = function (userMediaHandler) {
555
- avs_pc_js_1.default.setUserMediaHandler(userMediaHandler);
615
+ avs_pc_1.default.setUserMediaHandler(userMediaHandler);
616
+ };
617
+ Wcall.prototype.setAudioStreamHandler = function (audioStreamHandler) {
618
+ avs_pc_1.default.setAudioStreamHandler(audioStreamHandler);
556
619
  };
557
- Wcall.prototype.setMediaStreamHandler = function (mediaStreamHandler) {
558
- avs_pc_js_1.default.setMediaStreamHandler(mediaStreamHandler);
620
+ Wcall.prototype.setVideoStreamHandler = function (videoStreamHandler) {
621
+ avs_pc_1.default.setVideoStreamHandler(videoStreamHandler);
622
+ };
623
+ Wcall.prototype.isConferenceCallingSupported = function () {
624
+ return avs_pc_1.default.isConferenceCallingSupported();
559
625
  };
560
626
  Wcall.prototype.replaceTrack = function (convid, newTrack) {
561
- avs_pc_js_1.default.replaceTrack(convid, newTrack);
627
+ avs_pc_1.default.replaceTrack(convid, newTrack);
562
628
  };
563
629
  Wcall.prototype.getStats = function (convid) {
564
- return avs_pc_js_1.default.getStats(convid);
630
+ return avs_pc_1.default.getStats(convid);
631
+ };
632
+ Wcall.supportsConferenceCalls = function () {
633
+ var pt = RTCRtpSender.prototype;
634
+ var insertable_legacy = !!pt.createEncodedVideoStreams;
635
+ var insertable_streams = !!pt.createEncodedStreams;
636
+ return insertable_legacy || insertable_streams;
565
637
  };
566
638
  return Wcall;
567
639
  }());
568
640
  exports.Wcall = Wcall;
569
- exports.getAvsInstance = function () {
641
+ var getAvsInstance = function () {
570
642
  if (instance) {
571
643
  return Promise.resolve(instance);
572
644
  }
573
645
  return new Promise(function (resolve) {
574
- avs_core_js_1.default().then(function (em_module) {
575
- resolve(new Wcall(em_module));
646
+ avs_core().then(function (em_module) {
647
+ instance = new Wcall(em_module);
648
+ resolve(instance);
576
649
  });
577
650
  });
578
651
  };
652
+ exports.getAvsInstance = getAvsInstance;