@wireapp/avs 0.0.3170 → 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-worker.js +441 -0
- package/dist/avs_core.d.ts +2 -0
- package/dist/avs_core.js +2999 -4794
- package/dist/avs_pc.d.ts +9 -4
- package/dist/avs_pc.js +839 -169
- package/dist/avs_wcall.d.ts +117 -67
- package/dist/avs_wcall.js +248 -146
- package/package.json +15 -8
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
|
|
24
|
-
var
|
|
25
|
-
var
|
|
26
|
-
(function (
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
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
|
|
91
|
-
(function (
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
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,
|
|
101
|
-
else
|
|
102
|
-
|
|
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
|
-
|
|
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
|
-
}, "
|
|
124
|
-
var fn_sendh = this.em_module.addFunction(function (ctx, convid, userid_self, clientid_self,
|
|
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),
|
|
129
|
-
|
|
130
|
-
|
|
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
|
-
}, "
|
|
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
|
-
}, "
|
|
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
|
-
}, "
|
|
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
|
-
}, "
|
|
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
|
-
}, "
|
|
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
|
-
}, "
|
|
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
|
-
}, "
|
|
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
|
-
}, "
|
|
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
|
-
}, "
|
|
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
|
-
}, "
|
|
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
|
-
}, "
|
|
222
|
-
var fn_sendh = this.em_module.addFunction(function (ctx, convid, userid_self, clientid_self,
|
|
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),
|
|
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
|
-
}, "
|
|
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
|
-
}, "
|
|
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
|
-
}, "
|
|
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
|
-
}, "
|
|
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
|
-
}, "
|
|
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
|
-
}, "
|
|
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
|
-
}, "
|
|
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
|
-
}, "
|
|
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
|
-
}, "
|
|
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
|
-
}, "
|
|
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
|
-
}, "
|
|
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
|
-
}, "
|
|
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,18 +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.
|
|
340
|
-
return this.em_module.ccall("
|
|
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.
|
|
343
|
-
return this.em_module.ccall("
|
|
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]);
|
|
344
383
|
};
|
|
345
384
|
Wcall.prototype.answer = function (wuser, convid, call_type, audio_cbr) {
|
|
346
385
|
return this.em_module.ccall("wcall_answer", "number", ["number", "string", "number", "number"], [wuser, convid, call_type, audio_cbr]);
|
|
347
386
|
};
|
|
348
|
-
Wcall.prototype.confAnswer = function (wuser, convid, sft_url, sft_token, call_type, audio_cbr) {
|
|
349
|
-
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]);
|
|
350
|
-
};
|
|
351
387
|
Wcall.prototype.resp = function (wuser, status, reason, ctx) {
|
|
352
388
|
this.em_module.ccall("wcall_resp", "null", ["number", "number", "string", "number"], [wuser, status, reason, ctx]);
|
|
353
389
|
};
|
|
@@ -357,7 +393,7 @@ var Wcall = /** @class */ (function () {
|
|
|
357
393
|
Wcall.prototype.sftResp = function (wuser, perr, buf, len, ctx) {
|
|
358
394
|
this.em_module.ccall("wcall_sft_resp", "null", ["number", "number", "string", "number", "number"], [wuser, perr, buf, len, ctx]);
|
|
359
395
|
};
|
|
360
|
-
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) {
|
|
361
397
|
return this.em_module.ccall("wcall_recv_msg", "number", [
|
|
362
398
|
"number",
|
|
363
399
|
"string",
|
|
@@ -366,8 +402,21 @@ var Wcall = /** @class */ (function () {
|
|
|
366
402
|
"number",
|
|
367
403
|
"string",
|
|
368
404
|
"string",
|
|
369
|
-
"string"
|
|
370
|
-
|
|
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
|
+
]);
|
|
371
420
|
};
|
|
372
421
|
Wcall.prototype.end = function (wuser, convid) {
|
|
373
422
|
this.em_module.ccall("wcall_end", "null", ["number", "string"], [wuser, convid]);
|
|
@@ -380,11 +429,11 @@ var Wcall = /** @class */ (function () {
|
|
|
380
429
|
};
|
|
381
430
|
Wcall.prototype.setMediaEstabHandler = function (wuser, mestabh) {
|
|
382
431
|
var _this = this;
|
|
383
|
-
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) {
|
|
384
433
|
if (mestabh) {
|
|
385
|
-
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);
|
|
386
435
|
}
|
|
387
|
-
}, "
|
|
436
|
+
}, "viiiii");
|
|
388
437
|
this.em_module.ccall("wcall_set_media_estab_handler", "null", ["number", "number"], [wuser, fn_mestabh]);
|
|
389
438
|
};
|
|
390
439
|
Wcall.prototype.setMediaStoppedHandler = function (wuser, mstoph) {
|
|
@@ -393,16 +442,16 @@ var Wcall = /** @class */ (function () {
|
|
|
393
442
|
if (mstoph) {
|
|
394
443
|
mstoph(convid == 0 ? null : _this.em_module.UTF8ToString(convid), arg);
|
|
395
444
|
}
|
|
396
|
-
}, "
|
|
445
|
+
}, "vii");
|
|
397
446
|
this.em_module.ccall("wcall_set_media_stopped_handler", "null", ["number", "number"], [wuser, fn_mstoph]);
|
|
398
447
|
};
|
|
399
448
|
Wcall.prototype.setDataChanEstabHandler = function (wuser, dcestabh) {
|
|
400
449
|
var _this = this;
|
|
401
|
-
var fn_dcestabh = this.em_module.addFunction(function (convid, userid, arg) {
|
|
450
|
+
var fn_dcestabh = this.em_module.addFunction(function (convid, userid, clientid, arg) {
|
|
402
451
|
if (dcestabh) {
|
|
403
|
-
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);
|
|
404
453
|
}
|
|
405
|
-
}, "
|
|
454
|
+
}, "viiii");
|
|
406
455
|
this.em_module.ccall("wcall_set_data_chan_estab_handler", "null", ["number", "number"], [wuser, fn_dcestabh]);
|
|
407
456
|
};
|
|
408
457
|
Wcall.prototype.setVideoSendState = function (wuser, convid, state) {
|
|
@@ -411,11 +460,11 @@ var Wcall = /** @class */ (function () {
|
|
|
411
460
|
Wcall.prototype.setVideoHandlers = function (render_frame_h, size_h, arg) {
|
|
412
461
|
var _this = this;
|
|
413
462
|
if (arg === void 0) { arg = 0; }
|
|
414
|
-
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) {
|
|
415
464
|
if (size_h) {
|
|
416
|
-
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);
|
|
417
466
|
}
|
|
418
|
-
}, "
|
|
467
|
+
}, "viiiii");
|
|
419
468
|
this.em_module.ccall("wcall_set_video_handlers", "null", ["wcall_render_frame_h*", "number", "number"], [render_frame_h, fn_size_h, arg]);
|
|
420
469
|
};
|
|
421
470
|
Wcall.prototype.networkChanged = function (wuser) {
|
|
@@ -428,7 +477,7 @@ var Wcall = /** @class */ (function () {
|
|
|
428
477
|
if (chgh) {
|
|
429
478
|
chgh(convid == 0 ? null : _this.em_module.UTF8ToString(convid), arg);
|
|
430
479
|
}
|
|
431
|
-
}, "
|
|
480
|
+
}, "vii");
|
|
432
481
|
this.em_module.ccall("wcall_set_group_changed_handler", "null", ["number", "number", "number"], [wuser, fn_chgh, arg]);
|
|
433
482
|
};
|
|
434
483
|
Wcall.prototype.setParticipantChangedHandler = function (wuser, chgh, arg) {
|
|
@@ -438,17 +487,17 @@ var Wcall = /** @class */ (function () {
|
|
|
438
487
|
if (chgh) {
|
|
439
488
|
chgh(convid == 0 ? null : _this.em_module.UTF8ToString(convid), mjson == 0 ? null : _this.em_module.UTF8ToString(mjson), arg);
|
|
440
489
|
}
|
|
441
|
-
}, "
|
|
490
|
+
}, "viii");
|
|
442
491
|
this.em_module.ccall("wcall_set_participant_changed_handler", "null", ["number", "number", "number"], [wuser, fn_chgh, arg]);
|
|
443
492
|
};
|
|
444
493
|
Wcall.prototype.setNetworkQualityHandler = function (wuser, netqh, interval, arg) {
|
|
445
494
|
var _this = this;
|
|
446
495
|
if (arg === void 0) { arg = 0; }
|
|
447
|
-
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) {
|
|
448
497
|
if (netqh) {
|
|
449
|
-
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);
|
|
450
499
|
}
|
|
451
|
-
}, "
|
|
500
|
+
}, "viiiiiiii");
|
|
452
501
|
return this.em_module.ccall("wcall_set_network_quality_handler", "number", ["number", "number", "number", "number"], [wuser, fn_netqh, interval, arg]);
|
|
453
502
|
};
|
|
454
503
|
Wcall.prototype.setLogHandler = function (logh, arg) {
|
|
@@ -458,10 +507,22 @@ var Wcall = /** @class */ (function () {
|
|
|
458
507
|
if (logh) {
|
|
459
508
|
logh(level, msg == 0 ? null : _this.em_module.UTF8ToString(msg), arg);
|
|
460
509
|
}
|
|
461
|
-
}, "
|
|
510
|
+
}, "viii");
|
|
462
511
|
logFn = logh;
|
|
463
512
|
this.em_module.ccall("wcall_set_log_handler", "null", ["number", "number"], [fn_logh, arg]);
|
|
464
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
|
+
};
|
|
465
526
|
Wcall.prototype.getMute = function (wuser) {
|
|
466
527
|
return this.em_module.ccall("wcall_get_mute", "number", ["number"], [wuser]);
|
|
467
528
|
};
|
|
@@ -474,7 +535,7 @@ var Wcall = /** @class */ (function () {
|
|
|
474
535
|
if (muteh) {
|
|
475
536
|
muteh(muted, arg);
|
|
476
537
|
}
|
|
477
|
-
}, "
|
|
538
|
+
}, "vii");
|
|
478
539
|
this.em_module.ccall("wcall_set_mute_handler", "null", ["number", "number", "number"], [wuser, fn_muteh, arg]);
|
|
479
540
|
};
|
|
480
541
|
Wcall.prototype.setStateHandler = function (wuser, stateh) {
|
|
@@ -483,7 +544,7 @@ var Wcall = /** @class */ (function () {
|
|
|
483
544
|
if (stateh) {
|
|
484
545
|
stateh(convid == 0 ? null : _this.em_module.UTF8ToString(convid), state, arg);
|
|
485
546
|
}
|
|
486
|
-
}, "
|
|
547
|
+
}, "viii");
|
|
487
548
|
this.em_module.ccall("wcall_set_state_handler", "null", ["number", "number"], [wuser, fn_stateh]);
|
|
488
549
|
};
|
|
489
550
|
Wcall.prototype.getState = function (wuser, convid) {
|
|
@@ -496,7 +557,7 @@ var Wcall = /** @class */ (function () {
|
|
|
496
557
|
if (stateh) {
|
|
497
558
|
stateh(convid == 0 ? null : _this.em_module.UTF8ToString(convid), state, arg);
|
|
498
559
|
}
|
|
499
|
-
}, "
|
|
560
|
+
}, "viii");
|
|
500
561
|
this.em_module.ccall("wcall_iterate_state", "null", ["number", "number", "number"], [wuser, fn_stateh, arg]);
|
|
501
562
|
};
|
|
502
563
|
Wcall.prototype.propsyncRequest = function (wuser, convid) {
|
|
@@ -505,46 +566,87 @@ var Wcall = /** @class */ (function () {
|
|
|
505
566
|
Wcall.prototype.enablePrivacy = function (wuser, enabled) {
|
|
506
567
|
this.em_module.ccall("wcall_enable_privacy", "null", ["number", "number"], [wuser, enabled]);
|
|
507
568
|
};
|
|
569
|
+
Wcall.prototype.setProxy = function (host, port) {
|
|
570
|
+
return this.em_module.ccall("wcall_set_proxy", "number", ["string", "number"], [host, port]);
|
|
571
|
+
};
|
|
508
572
|
Wcall.prototype.setReqClientsHandler = function (wuser, reqch) {
|
|
509
573
|
var _this = this;
|
|
510
|
-
var fn_reqch = this.em_module.addFunction(function (convid, arg) {
|
|
574
|
+
var fn_reqch = this.em_module.addFunction(function (wuser, convid, arg) {
|
|
511
575
|
if (reqch) {
|
|
512
|
-
reqch(convid == 0 ? null : _this.em_module.UTF8ToString(convid), arg);
|
|
576
|
+
reqch(wuser, convid == 0 ? null : _this.em_module.UTF8ToString(convid), arg);
|
|
513
577
|
}
|
|
514
|
-
}, "
|
|
578
|
+
}, "viii");
|
|
515
579
|
this.em_module.ccall("wcall_set_req_clients_handler", "null", ["number", "number"], [wuser, fn_reqch]);
|
|
516
580
|
};
|
|
517
|
-
Wcall.prototype.setClientsForConv = function (wuser, convid,
|
|
518
|
-
return this.em_module.ccall("wcall_set_clients_for_conv", "number", ["number", "string", "string"
|
|
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]);
|
|
519
583
|
};
|
|
520
|
-
Wcall.prototype.
|
|
521
|
-
|
|
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]);
|
|
522
601
|
};
|
|
523
602
|
Wcall.prototype.poll = function () {
|
|
524
603
|
this.em_module.ccall("wcall_poll", "null", [], []);
|
|
525
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
|
+
};
|
|
526
614
|
Wcall.prototype.setUserMediaHandler = function (userMediaHandler) {
|
|
527
|
-
|
|
615
|
+
avs_pc_1.default.setUserMediaHandler(userMediaHandler);
|
|
528
616
|
};
|
|
529
|
-
Wcall.prototype.
|
|
530
|
-
|
|
617
|
+
Wcall.prototype.setAudioStreamHandler = function (audioStreamHandler) {
|
|
618
|
+
avs_pc_1.default.setAudioStreamHandler(audioStreamHandler);
|
|
619
|
+
};
|
|
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();
|
|
531
625
|
};
|
|
532
626
|
Wcall.prototype.replaceTrack = function (convid, newTrack) {
|
|
533
|
-
|
|
627
|
+
avs_pc_1.default.replaceTrack(convid, newTrack);
|
|
534
628
|
};
|
|
535
629
|
Wcall.prototype.getStats = function (convid) {
|
|
536
|
-
return
|
|
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;
|
|
537
637
|
};
|
|
538
638
|
return Wcall;
|
|
539
639
|
}());
|
|
540
640
|
exports.Wcall = Wcall;
|
|
541
|
-
|
|
641
|
+
var getAvsInstance = function () {
|
|
542
642
|
if (instance) {
|
|
543
643
|
return Promise.resolve(instance);
|
|
544
644
|
}
|
|
545
645
|
return new Promise(function (resolve) {
|
|
546
|
-
|
|
547
|
-
|
|
646
|
+
avs_core().then(function (em_module) {
|
|
647
|
+
instance = new Wcall(em_module);
|
|
648
|
+
resolve(instance);
|
|
548
649
|
});
|
|
549
650
|
});
|
|
550
651
|
};
|
|
652
|
+
exports.getAvsInstance = getAvsInstance;
|