@wireapp/avs 10.3.15 → 10.3.19

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.
@@ -29,7 +29,8 @@ export declare enum REASON {
29
29
  NOONE_JOINED = 12,
30
30
  EVERYONE_LEFT = 13,
31
31
  AUTH_FAILED = 14,
32
- AUTH_FAILED_START = 15
32
+ AUTH_FAILED_START = 15,
33
+ DURATION = 16
33
34
  }
34
35
  export declare enum LOG_LEVEL {
35
36
  DEBUG = 0,
@@ -157,6 +158,7 @@ export declare class Wcall {
157
158
  setLogHandler(logh: WcallLogHandler, arg?: number): void;
158
159
  setEpochInfo(wuser: number, convid: string, epochid: number, clients_json: string, key_base64: string): number;
159
160
  setReqNewEpochHandler(wuser: number, req_new_epochh: WcallReqNewEpochHandler): void;
161
+ setDuration(wuser: number, convid: string, duration: number): void;
160
162
  getMute(wuser: number): number;
161
163
  setMute(wuser: number, muted: number): void;
162
164
  setMuteHandler(wuser: number, muteh: WcallMuteHandler, arg?: number): void;
@@ -174,8 +176,13 @@ export declare class Wcall {
174
176
  audioRecord(wuser: number, path: string): number;
175
177
  poll(): void;
176
178
  setupEx(flags: number): number;
179
+ eventCreate(userid: string, clientid: string, incomingh: WcallIncomingHandler, missedh: WcallMissedHandler, closeh: WcallCloseHandler, arg?: number): number;
180
+ eventStart(wuser: number): void;
181
+ eventProcess(wuser: number, buf: string, len: number, curr_time: number, msg_time: number, convid: string, userid: string, clientid: string, conv_type: number): number;
182
+ eventEnd(wuser: number): void;
177
183
  setMode(mode: number): void;
178
184
  getMode(): number;
185
+ setConfigVersion(sft_version: number, turn_version: number): void;
179
186
  setUserMediaHandler(userMediaHandler: UserMediaHandler): void;
180
187
  setAudioStreamHandler(audioStreamHandler: AudioStreamHandler): void;
181
188
  setVideoStreamHandler(videoStreamHandler: VideoStreamHandler): void;
package/dist/avs_wcall.js CHANGED
@@ -57,6 +57,7 @@ var REASON;
57
57
  REASON[REASON["EVERYONE_LEFT"] = 13] = "EVERYONE_LEFT";
58
58
  REASON[REASON["AUTH_FAILED"] = 14] = "AUTH_FAILED";
59
59
  REASON[REASON["AUTH_FAILED_START"] = 15] = "AUTH_FAILED_START";
60
+ REASON[REASON["DURATION"] = 16] = "DURATION";
60
61
  })(REASON = exports.REASON || (exports.REASON = {}));
61
62
  var LOG_LEVEL;
62
63
  (function (LOG_LEVEL) {
@@ -525,6 +526,9 @@ var Wcall = /** @class */ (function () {
525
526
  }, "viii");
526
527
  this.em_module.ccall("wcall_set_req_new_epoch_handler", "null", ["number", "number"], [wuser, fn_req_new_epochh]);
527
528
  };
529
+ Wcall.prototype.setDuration = function (wuser, convid, duration) {
530
+ this.em_module.ccall("wcall_set_duration", "null", ["number", "string", "number"], [wuser, convid, duration]);
531
+ };
528
532
  Wcall.prototype.getMute = function (wuser) {
529
533
  return this.em_module.ccall("wcall_get_mute", "number", ["number"], [wuser]);
530
534
  };
@@ -607,12 +611,64 @@ var Wcall = /** @class */ (function () {
607
611
  Wcall.prototype.setupEx = function (flags) {
608
612
  return this.em_module.ccall("wcall_setup_ex", "number", ["number"], [flags]);
609
613
  };
614
+ Wcall.prototype.eventCreate = function (userid, clientid, incomingh, missedh, closeh, arg) {
615
+ var _this = this;
616
+ if (arg === void 0) { arg = 0; }
617
+ var fn_incomingh = this.em_module.addFunction(function (convid, msg_time, userid, clientid, video_call, should_ring, conv_type, arg) {
618
+ if (incomingh) {
619
+ 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);
620
+ }
621
+ }, "viiiiiiii");
622
+ var fn_missedh = this.em_module.addFunction(function (convid, msg_time, userid, clientid, video_call, arg) {
623
+ if (missedh) {
624
+ 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);
625
+ }
626
+ }, "viiiiii");
627
+ var fn_closeh = this.em_module.addFunction(function (reason, convid, msg_time, userid, clientid, arg) {
628
+ if (closeh) {
629
+ 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);
630
+ }
631
+ }, "viiiiii");
632
+ return this.em_module.ccall("wcall_event_create", "number", ["string", "string", "number", "number", "number", "number"], [userid, clientid, fn_incomingh, fn_missedh, fn_closeh, arg]);
633
+ };
634
+ Wcall.prototype.eventStart = function (wuser) {
635
+ this.em_module.ccall("wcall_event_start", "null", ["number"], [wuser]);
636
+ };
637
+ Wcall.prototype.eventProcess = function (wuser, buf, len, curr_time, msg_time, convid, userid, clientid, conv_type) {
638
+ return this.em_module.ccall("wcall_event_process", "number", [
639
+ "number",
640
+ "string",
641
+ "number",
642
+ "number",
643
+ "number",
644
+ "string",
645
+ "string",
646
+ "string",
647
+ "number",
648
+ ], [
649
+ wuser,
650
+ buf,
651
+ len,
652
+ curr_time,
653
+ msg_time,
654
+ convid,
655
+ userid,
656
+ clientid,
657
+ conv_type,
658
+ ]);
659
+ };
660
+ Wcall.prototype.eventEnd = function (wuser) {
661
+ this.em_module.ccall("wcall_event_end", "null", ["number"], [wuser]);
662
+ };
610
663
  Wcall.prototype.setMode = function (mode) {
611
664
  this.em_module.ccall("wcall_set_mode", "null", ["number"], [mode]);
612
665
  };
613
666
  Wcall.prototype.getMode = function () {
614
667
  return this.em_module.ccall("wcall_get_mode", "number", [], []);
615
668
  };
669
+ Wcall.prototype.setConfigVersion = function (sft_version, turn_version) {
670
+ this.em_module.ccall("wcall_set_config_version", "null", ["number", "number"], [sft_version, turn_version]);
671
+ };
616
672
  Wcall.prototype.setUserMediaHandler = function (userMediaHandler) {
617
673
  avs_pc_1.default.setUserMediaHandler(userMediaHandler);
618
674
  };
package/package.json CHANGED
@@ -27,5 +27,5 @@
27
27
  "prepack": "prettier -w src/avs_wcall.ts && tsc && cp src/*.js src/*.d.ts dist/",
28
28
  "test": "karma start"
29
29
  },
30
- "version": "10.3.15"
30
+ "version": "10.3.19"
31
31
  }