@opentok/client 2.35.0-alpha.61 → 2.35.0-alpha.62
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/js/opentok.js +29 -26
- package/dist/js/opentok.js.map +1 -1
- package/dist/js/opentok.min.js +3 -3
- package/dist/js/opentok.min.js.map +1 -1
- package/package.json +1 -1
package/dist/js/opentok.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license OpenTok.js 2.35.0
|
|
2
|
+
* @license OpenTok.js 2.35.0 8575265e3
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) 2010-2026 TokBox, Inc.
|
|
5
5
|
* Subject to the applicable Software Development Kit (SDK) License Agreement:
|
|
6
6
|
* https://www.vonage.com/legal/communications-apis/terms-of-use/
|
|
7
7
|
*
|
|
8
|
-
* Date:
|
|
8
|
+
* Date: Mon, 29 Jun 2026 06:01:57 GMT
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
@@ -8139,13 +8139,16 @@ function calcBitRate(bytesNow, bytesBefore, timeNow, timeBefore) {
|
|
|
8139
8139
|
const getStatsHelpers = () => {
|
|
8140
8140
|
const prevRateTrackers = {};
|
|
8141
8141
|
function getFrameRate(stat, startTime) {
|
|
8142
|
+
const frames = getFrames(stat);
|
|
8142
8143
|
let frameRate = getFrameRateFromStats(stat);
|
|
8143
8144
|
if (frameRate) {
|
|
8144
|
-
return
|
|
8145
|
+
return {
|
|
8146
|
+
frameRate,
|
|
8147
|
+
frames
|
|
8148
|
+
};
|
|
8145
8149
|
}
|
|
8146
|
-
|
|
8147
|
-
|
|
8148
|
-
return undefined;
|
|
8150
|
+
if (isNaN(frames)) {
|
|
8151
|
+
return {};
|
|
8149
8152
|
}
|
|
8150
8153
|
const prevStatFrames = prevRateTrackers[stat.id] ? prevRateTrackers[stat.id].frames : 0;
|
|
8151
8154
|
const prevTimestamp = prevRateTrackers[stat.id] ? prevRateTrackers[stat.id].timestamp : startTime;
|
|
@@ -8155,11 +8158,10 @@ const getStatsHelpers = () => {
|
|
|
8155
8158
|
prevStatFrames,
|
|
8156
8159
|
prevTimestamp
|
|
8157
8160
|
});
|
|
8158
|
-
|
|
8159
|
-
|
|
8160
|
-
|
|
8161
|
+
return {
|
|
8162
|
+
frameRate,
|
|
8163
|
+
frames
|
|
8161
8164
|
};
|
|
8162
|
-
return frameRate;
|
|
8163
8165
|
}
|
|
8164
8166
|
function calcVideoRates(stat, startTime, isOutgoing) {
|
|
8165
8167
|
const bytesKey = isOutgoing ? 'bytesSent' : 'bytesReceived';
|
|
@@ -8182,7 +8184,9 @@ const getStatsHelpers = () => {
|
|
|
8182
8184
|
totalBitrate: prevTotalBitrate
|
|
8183
8185
|
};
|
|
8184
8186
|
}
|
|
8185
|
-
const
|
|
8187
|
+
const _getFrameRate = getFrameRate(stat, startTime),
|
|
8188
|
+
frames = _getFrameRate.frames,
|
|
8189
|
+
frameRate = _getFrameRate.frameRate;
|
|
8186
8190
|
const bytes = Math.max(stat[bytesKey], prevBytes);
|
|
8187
8191
|
const headerBytes = Math.max(stat[headerBytesKey], prevHeaderBytes);
|
|
8188
8192
|
const currentBitrate = calcBitRate(bytes, prevBytes, stat.timestamp, prevTimestamp);
|
|
@@ -8201,6 +8205,7 @@ const getStatsHelpers = () => {
|
|
|
8201
8205
|
bytes,
|
|
8202
8206
|
headerBytes,
|
|
8203
8207
|
timestamp: stat.timestamp,
|
|
8208
|
+
frames,
|
|
8204
8209
|
frameRate,
|
|
8205
8210
|
bitrate,
|
|
8206
8211
|
totalBitrate
|
|
@@ -8357,22 +8362,24 @@ const getStatsHelpers = () => {
|
|
|
8357
8362
|
const getCommonStats = inbound ? getInboundStats : getOutboundStats;
|
|
8358
8363
|
if (videos && videos.length > 0) {
|
|
8359
8364
|
const accumulatedVideo = accumulateVideoStats(videos, timestamp, `acc${video.id}`);
|
|
8365
|
+
const _getFrameRate2 = getFrameRate(accumulatedVideo, startTime),
|
|
8366
|
+
frameRate = _getFrameRate2.frameRate;
|
|
8360
8367
|
otStats.video = Object.assign({
|
|
8361
|
-
frameRate
|
|
8368
|
+
frameRate
|
|
8362
8369
|
}, (0, _mapValues.default)(getCommonStats(accumulatedVideo), Number));
|
|
8363
8370
|
if (!inbound) {
|
|
8364
8371
|
const videoCodecs = stats.filter(stat => stat.type === 'codec' && stat.mimeType.includes('video'));
|
|
8365
8372
|
otStats.video.layers = videos.filter(videoStat => !api.isVideoRemoteInboundRtpStat(videoStat)).map(videoStat => {
|
|
8366
8373
|
var _videoCodecs$find2;
|
|
8367
8374
|
const _calcVideoRates = calcVideoRates(videoStat, startTime, true),
|
|
8368
|
-
|
|
8375
|
+
encodedFrameRate = _calcVideoRates.frameRate,
|
|
8369
8376
|
bitrate = _calcVideoRates.bitrate,
|
|
8370
8377
|
totalBitrate = _calcVideoRates.totalBitrate;
|
|
8371
8378
|
const layerStats = {
|
|
8372
8379
|
width: videoStat.frameWidth,
|
|
8373
8380
|
height: videoStat.frameHeight,
|
|
8374
8381
|
codec: (_videoCodecs$find2 = videoCodecs.find(codecStat => codecStat.id === videoStat.codecId)) == null ? void 0 : _videoCodecs$find2.mimeType.split('/')[1],
|
|
8375
|
-
encodedFrameRate
|
|
8382
|
+
encodedFrameRate,
|
|
8376
8383
|
bitrate,
|
|
8377
8384
|
totalBitrate,
|
|
8378
8385
|
scalabilityMode: videoStat.scalabilityMode
|
|
@@ -23014,9 +23021,7 @@ function SubscriberFactory(_ref2) {
|
|
|
23014
23021
|
};
|
|
23015
23022
|
const handleDisconnect = sourceStreamId => {
|
|
23016
23023
|
if (sourceStreamId !== 'P2P') {
|
|
23017
|
-
|
|
23018
|
-
this._.iceRestart('peer connection disconnected');
|
|
23019
|
-
}
|
|
23024
|
+
this._.iceRestart('peer connection disconnected');
|
|
23020
23025
|
}
|
|
23021
23026
|
};
|
|
23022
23027
|
const handleFailMantis = () => {
|
|
@@ -39537,7 +39542,7 @@ function staticConfigFactory(_temp) {
|
|
|
39537
39542
|
_ref$axios = _ref.axios,
|
|
39538
39543
|
axios = _ref$axios === void 0 ? _axios.default : _ref$axios,
|
|
39539
39544
|
_ref$properties = _ref.properties,
|
|
39540
|
-
properties = _ref$properties === void 0 ? {"version":"v2.35.0","buildHash":"
|
|
39545
|
+
properties = _ref$properties === void 0 ? {"version":"v2.35.0","buildHash":"8575265e3","minimumVersion":{"firefox":52,"chrome":49},"debug":false,"websiteURL":"http://www.tokbox.com","configURL":"https://config.opentok.com","ipWhitelistConfigURL":"","cdnURL":"","loggingURL":"https://hlg.tokbox.com/prod","apiURL":"https://anvil.opentok.com","vonageApiURL":""} : _ref$properties;
|
|
39541
39546
|
/** @type builtInConfig */
|
|
39542
39547
|
const builtInConfig = (0, _cloneDeep.default)(properties);
|
|
39543
39548
|
/**
|
|
@@ -41338,7 +41343,6 @@ function PublisherFactory(_ref) {
|
|
|
41338
41343
|
let _videoMediaProcessorConnector;
|
|
41339
41344
|
let _audioMediaProcessorConnector;
|
|
41340
41345
|
const hybridSessionTransitionStartTimes = {};
|
|
41341
|
-
const lastIceConnectionStates = {};
|
|
41342
41346
|
let _streamDestroyTimeout;
|
|
41343
41347
|
const STREAM_DESTROY_DELAY = 5000;
|
|
41344
41348
|
let pendingRumorAudioFallbackMessage = false;
|
|
@@ -42418,23 +42422,22 @@ function PublisherFactory(_ref) {
|
|
|
42418
42422
|
while (1) switch (_context11.prev = _context11.next) {
|
|
42419
42423
|
case 0:
|
|
42420
42424
|
sourceStreamId = peerConnection.getSourceStreamId();
|
|
42421
|
-
lastIceConnectionStates[sourceStreamId] = newState;
|
|
42422
42425
|
if (!(newState === 'connected')) {
|
|
42423
|
-
_context11.next =
|
|
42426
|
+
_context11.next = 6;
|
|
42424
42427
|
break;
|
|
42425
42428
|
}
|
|
42426
|
-
_context11.next =
|
|
42429
|
+
_context11.next = 4;
|
|
42427
42430
|
return handleConnect();
|
|
42428
|
-
case
|
|
42429
|
-
_context11.next =
|
|
42431
|
+
case 4:
|
|
42432
|
+
_context11.next = 7;
|
|
42430
42433
|
break;
|
|
42431
|
-
case
|
|
42434
|
+
case 6:
|
|
42432
42435
|
if (newState === 'disconnected') {
|
|
42433
42436
|
handleDisconnect(peerConnection);
|
|
42434
42437
|
} else if (newState === 'failed') {
|
|
42435
42438
|
handleFail(sourceStreamId);
|
|
42436
42439
|
}
|
|
42437
|
-
case
|
|
42440
|
+
case 7:
|
|
42438
42441
|
case "end":
|
|
42439
42442
|
return _context11.stop();
|
|
42440
42443
|
}
|