@wireapp/avs 10.6.2 → 10.6.5
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 +7 -4
- package/dist/avs_pc.js +25 -0
- package/dist/avs_wcall.d.ts +1 -0
- package/dist/avs_wcall.js +3 -0
- package/package.json +1 -1
package/dist/avs_pc.js
CHANGED
|
@@ -320,6 +320,11 @@ function update_tracks(pc, stream) {
|
|
|
320
320
|
}
|
|
321
321
|
}
|
|
322
322
|
});
|
|
323
|
+
for (var _b = 0, _c = rtc.getSenders(); _b < _c.length; _b++) {
|
|
324
|
+
var sender = _c[_b];
|
|
325
|
+
if (sender.track && sender.track.kind === 'audio')
|
|
326
|
+
setAudioAdaptivePtime(pc, sender);
|
|
327
|
+
}
|
|
323
328
|
// Either the codecs did not need to be adjusted because we are in a 1:1 call, or we are not sending a video track.
|
|
324
329
|
// In that case, there is no need to wait for the asynchronous process
|
|
325
330
|
if (videoSenderUpdates.length === 0) {
|
|
@@ -330,6 +335,26 @@ function update_tracks(pc, stream) {
|
|
|
330
335
|
pc_log(LOG_LEVEL_ERROR, "update_tracks: error=".concat(e));
|
|
331
336
|
}).then();
|
|
332
337
|
}
|
|
338
|
+
/* Adaptive ptime, as in the native clients: the browser's opus lengthens the
|
|
339
|
+
* frames (up to the SDP maxptime) when the bandwidth is short, and the audio
|
|
340
|
+
* bitrate can go down to 16 kbps. Only Chromium has adaptivePtime; other
|
|
341
|
+
* browsers ignore it, which the read back shows in the log. Set before
|
|
342
|
+
* negotiation, it is applied once the sender has its SSRC.
|
|
343
|
+
*/
|
|
344
|
+
function setAudioAdaptivePtime(pc, sender) {
|
|
345
|
+
var params = sender.getParameters();
|
|
346
|
+
var enc = params.encodings && params.encodings[0];
|
|
347
|
+
if (!enc || enc.adaptivePtime)
|
|
348
|
+
return;
|
|
349
|
+
enc.adaptivePtime = true;
|
|
350
|
+
sender.setParameters(params)
|
|
351
|
+
.then(function () {
|
|
352
|
+
var rb = sender.getParameters().encodings;
|
|
353
|
+
var on = !!(rb && rb[0] && rb[0].adaptivePtime);
|
|
354
|
+
pc_log(LOG_LEVEL_INFO, "setAudioAdaptivePtime: self=".concat(pc.self, " ").concat(on ? 'on' : 'not supported'));
|
|
355
|
+
})
|
|
356
|
+
.catch(function (e) { return pc_log(LOG_LEVEL_WARN, "setAudioAdaptivePtime: self=".concat(pc.self, " failed: ").concat(e)); });
|
|
357
|
+
}
|
|
333
358
|
function getEncodingParameter(sender, isScreenShare) {
|
|
334
359
|
pc_log(LOG_LEVEL_INFO, "update_tracks: adjust");
|
|
335
360
|
var params = sender.getParameters();
|
package/dist/avs_wcall.d.ts
CHANGED
|
@@ -171,6 +171,7 @@ export declare class Wcall {
|
|
|
171
171
|
setProxy(host: string, port: number): number;
|
|
172
172
|
setAudioParams(ptime: number, max_bitrate: number): void;
|
|
173
173
|
setLossParams(red: number, fec_loss_pct: number, max_bitrate: number, jb_min_ms: number): void;
|
|
174
|
+
setStatsLog(enable: number): void;
|
|
174
175
|
setReqClientsHandler(wuser: number, reqch: WcallReqClientsHandler): void;
|
|
175
176
|
setClientsForConv(wuser: number, convid: string, json: string): number;
|
|
176
177
|
setActiveSpeakerHandler(wuser: number, activeh: WcallActiveSpeakerHandler): void;
|
package/dist/avs_wcall.js
CHANGED
|
@@ -581,6 +581,9 @@ var Wcall = /** @class */ (function () {
|
|
|
581
581
|
Wcall.prototype.setLossParams = function (red, fec_loss_pct, max_bitrate, jb_min_ms) {
|
|
582
582
|
this.em_module.ccall("wcall_set_loss_params", "null", ["number", "number", "number", "number"], [red, fec_loss_pct, max_bitrate, jb_min_ms]);
|
|
583
583
|
};
|
|
584
|
+
Wcall.prototype.setStatsLog = function (enable) {
|
|
585
|
+
this.em_module.ccall("wcall_set_stats_log", "null", ["number"], [enable]);
|
|
586
|
+
};
|
|
584
587
|
Wcall.prototype.setReqClientsHandler = function (wuser, reqch) {
|
|
585
588
|
var _this = this;
|
|
586
589
|
var fn_reqch = this.em_module.addFunction(function (wuser, convid, arg) {
|
package/package.json
CHANGED