@wireapp/avs 10.3.15 → 10.3.16
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_core.js +3 -3
- package/dist/avs_wcall.d.ts +4 -0
- package/dist/avs_wcall.js +49 -0
- package/package.json +1 -1
package/dist/avs_wcall.d.ts
CHANGED
|
@@ -174,6 +174,10 @@ export declare class Wcall {
|
|
|
174
174
|
audioRecord(wuser: number, path: string): number;
|
|
175
175
|
poll(): void;
|
|
176
176
|
setupEx(flags: number): number;
|
|
177
|
+
eventCreate(userid: string, clientid: string, incomingh: WcallIncomingHandler, missedh: WcallMissedHandler, closeh: WcallCloseHandler, arg?: number): number;
|
|
178
|
+
eventStart(wuser: number): void;
|
|
179
|
+
eventProcess(wuser: number, buf: string, len: number, curr_time: number, msg_time: number, convid: string, userid: string, clientid: string, conv_type: number): number;
|
|
180
|
+
eventEnd(wuser: number): void;
|
|
177
181
|
setMode(mode: number): void;
|
|
178
182
|
getMode(): number;
|
|
179
183
|
setUserMediaHandler(userMediaHandler: UserMediaHandler): void;
|
package/dist/avs_wcall.js
CHANGED
|
@@ -607,6 +607,55 @@ var Wcall = /** @class */ (function () {
|
|
|
607
607
|
Wcall.prototype.setupEx = function (flags) {
|
|
608
608
|
return this.em_module.ccall("wcall_setup_ex", "number", ["number"], [flags]);
|
|
609
609
|
};
|
|
610
|
+
Wcall.prototype.eventCreate = function (userid, clientid, incomingh, missedh, closeh, arg) {
|
|
611
|
+
var _this = this;
|
|
612
|
+
if (arg === void 0) { arg = 0; }
|
|
613
|
+
var fn_incomingh = this.em_module.addFunction(function (convid, msg_time, userid, clientid, video_call, should_ring, conv_type, arg) {
|
|
614
|
+
if (incomingh) {
|
|
615
|
+
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);
|
|
616
|
+
}
|
|
617
|
+
}, "viiiiiiii");
|
|
618
|
+
var fn_missedh = this.em_module.addFunction(function (convid, msg_time, userid, clientid, video_call, arg) {
|
|
619
|
+
if (missedh) {
|
|
620
|
+
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);
|
|
621
|
+
}
|
|
622
|
+
}, "viiiiii");
|
|
623
|
+
var fn_closeh = this.em_module.addFunction(function (reason, convid, msg_time, userid, clientid, arg) {
|
|
624
|
+
if (closeh) {
|
|
625
|
+
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);
|
|
626
|
+
}
|
|
627
|
+
}, "viiiiii");
|
|
628
|
+
return this.em_module.ccall("wcall_event_create", "number", ["string", "string", "number", "number", "number", "number"], [userid, clientid, fn_incomingh, fn_missedh, fn_closeh, arg]);
|
|
629
|
+
};
|
|
630
|
+
Wcall.prototype.eventStart = function (wuser) {
|
|
631
|
+
this.em_module.ccall("wcall_event_start", "null", ["number"], [wuser]);
|
|
632
|
+
};
|
|
633
|
+
Wcall.prototype.eventProcess = function (wuser, buf, len, curr_time, msg_time, convid, userid, clientid, conv_type) {
|
|
634
|
+
return this.em_module.ccall("wcall_event_process", "number", [
|
|
635
|
+
"number",
|
|
636
|
+
"string",
|
|
637
|
+
"number",
|
|
638
|
+
"number",
|
|
639
|
+
"number",
|
|
640
|
+
"string",
|
|
641
|
+
"string",
|
|
642
|
+
"string",
|
|
643
|
+
"number",
|
|
644
|
+
], [
|
|
645
|
+
wuser,
|
|
646
|
+
buf,
|
|
647
|
+
len,
|
|
648
|
+
curr_time,
|
|
649
|
+
msg_time,
|
|
650
|
+
convid,
|
|
651
|
+
userid,
|
|
652
|
+
clientid,
|
|
653
|
+
conv_type,
|
|
654
|
+
]);
|
|
655
|
+
};
|
|
656
|
+
Wcall.prototype.eventEnd = function (wuser) {
|
|
657
|
+
this.em_module.ccall("wcall_event_end", "null", ["number"], [wuser]);
|
|
658
|
+
};
|
|
610
659
|
Wcall.prototype.setMode = function (mode) {
|
|
611
660
|
this.em_module.ccall("wcall_set_mode", "null", ["number"], [mode]);
|
|
612
661
|
};
|
package/package.json
CHANGED