@opentok/client 2.35.0-alpha.61 → 2.35.0-alpha.63
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.d.ts +2 -2
- package/dist/js/opentok.js +44 -27
- package/dist/js/opentok.js.map +1 -1
- package/dist/js/opentok.min.js +4 -4
- package/dist/js/opentok.min.js.map +1 -1
- package/package.json +1 -1
package/dist/js/opentok.d.ts
CHANGED
|
@@ -476,11 +476,11 @@ declare namespace OT {
|
|
|
476
476
|
clearAudioFilter(): Promise<void>;
|
|
477
477
|
getAudioFilter(): AudioFilter | null;
|
|
478
478
|
publishAudio: {
|
|
479
|
-
(value: boolean):
|
|
479
|
+
(value: boolean): Publisher;
|
|
480
480
|
promise: (value: boolean) => Promise<void>;
|
|
481
481
|
}
|
|
482
482
|
publishVideo: {
|
|
483
|
-
(value: boolean, callback?: (error?: OTError) => void):
|
|
483
|
+
(value: boolean, callback?: (error?: OTError) => void): Publisher;
|
|
484
484
|
promise: (value: boolean) => Promise<void>;
|
|
485
485
|
}
|
|
486
486
|
publishCaptions(value: boolean): Promise<void>;
|
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 bc2a346b4
|
|
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 13:06:23 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 = () => {
|
|
@@ -23612,6 +23617,10 @@ function SubscriberFactory(_ref2) {
|
|
|
23612
23617
|
_videoQualityWatcher.destroy();
|
|
23613
23618
|
amrState.destroy();
|
|
23614
23619
|
logSetAudioVolumeLimitedRunner.destroy();
|
|
23620
|
+
if (_audioLevelBehaviour) {
|
|
23621
|
+
_audioLevelBehaviour.destroy();
|
|
23622
|
+
_audioLevelBehaviour = undefined;
|
|
23623
|
+
}
|
|
23615
23624
|
_preDisconnectStats = {
|
|
23616
23625
|
sessionId: _session.sessionId,
|
|
23617
23626
|
connectionId: (_session10 = _session) != null && _session10.isConnected() ? (_session11 = _session) == null ? void 0 : (_session11$connection = _session11.connection) == null ? void 0 : _session11$connection.connectionId : null,
|
|
@@ -37988,7 +37997,12 @@ let WebAudioAudioLevelSampler = /*#__PURE__*/function () {
|
|
|
37988
37997
|
};
|
|
37989
37998
|
_proto.destroy = function destroy() {
|
|
37990
37999
|
if (this._sourceNode) {
|
|
37991
|
-
this._sourceNode.disconnect(
|
|
38000
|
+
this._sourceNode.disconnect();
|
|
38001
|
+
this._sourceNode = null;
|
|
38002
|
+
}
|
|
38003
|
+
if (this._analyser) {
|
|
38004
|
+
this._analyser.disconnect();
|
|
38005
|
+
this._analyser = null;
|
|
37992
38006
|
}
|
|
37993
38007
|
this._timeDomainData = null;
|
|
37994
38008
|
};
|
|
@@ -39537,7 +39551,7 @@ function staticConfigFactory(_temp) {
|
|
|
39537
39551
|
_ref$axios = _ref.axios,
|
|
39538
39552
|
axios = _ref$axios === void 0 ? _axios.default : _ref$axios,
|
|
39539
39553
|
_ref$properties = _ref.properties,
|
|
39540
|
-
properties = _ref$properties === void 0 ? {"version":"v2.35.0","buildHash":"
|
|
39554
|
+
properties = _ref$properties === void 0 ? {"version":"v2.35.0","buildHash":"bc2a346b4","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
39555
|
/** @type builtInConfig */
|
|
39542
39556
|
const builtInConfig = (0, _cloneDeep.default)(properties);
|
|
39543
39557
|
/**
|
|
@@ -41338,7 +41352,6 @@ function PublisherFactory(_ref) {
|
|
|
41338
41352
|
let _videoMediaProcessorConnector;
|
|
41339
41353
|
let _audioMediaProcessorConnector;
|
|
41340
41354
|
const hybridSessionTransitionStartTimes = {};
|
|
41341
|
-
const lastIceConnectionStates = {};
|
|
41342
41355
|
let _streamDestroyTimeout;
|
|
41343
41356
|
const STREAM_DESTROY_DELAY = 5000;
|
|
41344
41357
|
let pendingRumorAudioFallbackMessage = false;
|
|
@@ -42418,23 +42431,22 @@ function PublisherFactory(_ref) {
|
|
|
42418
42431
|
while (1) switch (_context11.prev = _context11.next) {
|
|
42419
42432
|
case 0:
|
|
42420
42433
|
sourceStreamId = peerConnection.getSourceStreamId();
|
|
42421
|
-
lastIceConnectionStates[sourceStreamId] = newState;
|
|
42422
42434
|
if (!(newState === 'connected')) {
|
|
42423
|
-
_context11.next =
|
|
42435
|
+
_context11.next = 6;
|
|
42424
42436
|
break;
|
|
42425
42437
|
}
|
|
42426
|
-
_context11.next =
|
|
42438
|
+
_context11.next = 4;
|
|
42427
42439
|
return handleConnect();
|
|
42428
|
-
case
|
|
42429
|
-
_context11.next =
|
|
42440
|
+
case 4:
|
|
42441
|
+
_context11.next = 7;
|
|
42430
42442
|
break;
|
|
42431
|
-
case
|
|
42443
|
+
case 6:
|
|
42432
42444
|
if (newState === 'disconnected') {
|
|
42433
42445
|
handleDisconnect(peerConnection);
|
|
42434
42446
|
} else if (newState === 'failed') {
|
|
42435
42447
|
handleFail(sourceStreamId);
|
|
42436
42448
|
}
|
|
42437
|
-
case
|
|
42449
|
+
case 7:
|
|
42438
42450
|
case "end":
|
|
42439
42451
|
return _context11.stop();
|
|
42440
42452
|
}
|
|
@@ -43713,6 +43725,7 @@ function PublisherFactory(_ref) {
|
|
|
43713
43725
|
* @see <a href="Stream.html#hasAudio">Stream.hasAudio</a>
|
|
43714
43726
|
* @see StreamPropertyChangedEvent
|
|
43715
43727
|
* @method #publishAudio
|
|
43728
|
+
* @return {Publisher}
|
|
43716
43729
|
* @memberOf Publisher
|
|
43717
43730
|
*/
|
|
43718
43731
|
this.publishAudio = value => {
|
|
@@ -44267,6 +44280,7 @@ function PublisherFactory(_ref) {
|
|
|
44267
44280
|
* @see <a href="Stream.html#hasVideo">Stream.hasVideo</a>
|
|
44268
44281
|
* @see StreamPropertyChangedEvent
|
|
44269
44282
|
* @method #publishVideo
|
|
44283
|
+
* @return {Publisher}
|
|
44270
44284
|
* @memberOf Publisher
|
|
44271
44285
|
*/
|
|
44272
44286
|
this.publishVideo = (value, completionHandler) => {
|
|
@@ -60574,6 +60588,9 @@ function NativeVideoElementWrapperFactory(deps) {
|
|
|
60574
60588
|
};
|
|
60575
60589
|
_proto._removeAudioLevelSampler = function _removeAudioLevelSampler() {
|
|
60576
60590
|
if (this._audioContext) {
|
|
60591
|
+
if (this._audioLevelSampler) {
|
|
60592
|
+
this._audioLevelSampler.destroy();
|
|
60593
|
+
}
|
|
60577
60594
|
delete this._audioContext;
|
|
60578
60595
|
delete this._audioLevelSampler;
|
|
60579
60596
|
}
|