@opentok/client 2.35.0-alpha.30 → 2.35.0-alpha.32
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 +13 -6
- package/dist/js/opentok.js +35 -17
- 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
|
@@ -624,12 +624,19 @@ declare namespace OT {
|
|
|
624
624
|
callback?: (error?: OTError) => void
|
|
625
625
|
): Promise<void>;
|
|
626
626
|
|
|
627
|
-
subscribe
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
627
|
+
subscribe: {
|
|
628
|
+
(
|
|
629
|
+
stream: Stream,
|
|
630
|
+
targetElement?: HTMLElement | string,
|
|
631
|
+
properties?: SubscriberProperties,
|
|
632
|
+
callback?: (error?: OTError) => void
|
|
633
|
+
): Subscriber;
|
|
634
|
+
promise: (
|
|
635
|
+
stream: Stream,
|
|
636
|
+
targetElement?: HTMLElement | string,
|
|
637
|
+
properties?: SubscriberProperties,
|
|
638
|
+
) => Promise<Subscriber>;
|
|
639
|
+
}
|
|
633
640
|
|
|
634
641
|
unpublish(publisher: Publisher): void;
|
|
635
642
|
unsubscribe(subscriber: Subscriber): 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 2989cd58d
|
|
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: Tue, 26 May 2026 07:31:08 GMT
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
@@ -28912,7 +28912,6 @@ var _exception_codes = _interopRequireDefault(__webpack_require__(90529));
|
|
|
28912
28912
|
var _hasE2eeCapability = _interopRequireDefault(__webpack_require__(37920));
|
|
28913
28913
|
var _hasIceRestartsCapability = _interopRequireDefault(__webpack_require__(39642));
|
|
28914
28914
|
var _hasRenegotiationCapability = _interopRequireDefault(__webpack_require__(63315));
|
|
28915
|
-
var _convertRumorError = _interopRequireDefault(__webpack_require__(59417));
|
|
28916
28915
|
var _Dispatcher = _interopRequireDefault(__webpack_require__(45802));
|
|
28917
28916
|
var _RaptorMessage = _interopRequireDefault(__webpack_require__(75248));
|
|
28918
28917
|
var _OTHelpers = _interopRequireDefault(__webpack_require__(6101));
|
|
@@ -28927,7 +28926,6 @@ function RaptorSocketFactory(deps) {
|
|
|
28927
28926
|
if (deps === void 0) {
|
|
28928
28927
|
deps = {};
|
|
28929
28928
|
}
|
|
28930
|
-
const convertRumorError = deps.convertRumorError || _convertRumorError.default;
|
|
28931
28929
|
const Dispatcher = deps.Dispatcher || _Dispatcher.default;
|
|
28932
28930
|
const ExceptionCodes = deps.ExceptionCodes || _exception_codes.default;
|
|
28933
28931
|
const hasIceRestartsCapability = deps.hasIceRestartsCapability || _hasIceRestartsCapability.default;
|
|
@@ -29009,38 +29007,36 @@ function RaptorSocketFactory(deps) {
|
|
|
29009
29007
|
_dispatcher.onReconnecting();
|
|
29010
29008
|
};
|
|
29011
29009
|
const onReconnected = () => {
|
|
29010
|
+
var _global$navigator, _global$navigator$con;
|
|
29012
29011
|
logAnalyticsEvent({
|
|
29013
29012
|
action: 'Reconnect',
|
|
29014
29013
|
variation: 'Success',
|
|
29015
29014
|
retries: this._rumor.reconnectRetriesCount(),
|
|
29016
29015
|
messageQueueSize: this._rumor.messageQueueSize(),
|
|
29017
|
-
socketId: this.socketId
|
|
29016
|
+
socketId: this.socketId,
|
|
29017
|
+
networkType: (_global$navigator = (typeof window !== undefined ? window : global).navigator) == null ? void 0 : (_global$navigator$con = _global$navigator.connection) == null ? void 0 : _global$navigator$con.type
|
|
29018
29018
|
});
|
|
29019
29019
|
_dispatcher.onReconnected();
|
|
29020
29020
|
};
|
|
29021
29021
|
const onReconnectAttempt = () => {
|
|
29022
|
+
var _global$navigator2, _global$navigator2$co;
|
|
29022
29023
|
logAnalyticsEvent({
|
|
29023
29024
|
action: 'Reconnect',
|
|
29024
29025
|
variation: 'Attempt',
|
|
29025
29026
|
retries: this._rumor.reconnectRetriesCount(),
|
|
29026
29027
|
messageQueueSize: this._rumor.messageQueueSize(),
|
|
29027
|
-
socketId: this.socketId
|
|
29028
|
+
socketId: this.socketId,
|
|
29029
|
+
networkType: (_global$navigator2 = (typeof window !== undefined ? window : global).navigator) == null ? void 0 : (_global$navigator2$co = _global$navigator2.connection) == null ? void 0 : _global$navigator2$co.type
|
|
29028
29030
|
});
|
|
29029
29031
|
};
|
|
29030
|
-
const onReconnectFailure =
|
|
29031
|
-
|
|
29032
|
-
error.code = ExceptionCodes.CONNECTION_LIMIT_EXCEEDED;
|
|
29033
|
-
}
|
|
29034
|
-
error.reason = 'ConnectToSession';
|
|
29035
|
-
const converted = convertRumorError(error);
|
|
29032
|
+
const onReconnectFailure = () => {
|
|
29033
|
+
var _global$navigator3, _global$navigator3$co;
|
|
29036
29034
|
logAnalyticsEvent({
|
|
29037
29035
|
action: 'Reconnect',
|
|
29038
29036
|
variation: 'Failure',
|
|
29039
|
-
failureReason: error.reason,
|
|
29040
|
-
failureCode: converted.code,
|
|
29041
|
-
failureMessage: converted.message,
|
|
29042
29037
|
messageQueueSize: this._rumor.messageQueueSize(),
|
|
29043
|
-
socketId: this.socketId
|
|
29038
|
+
socketId: this.socketId,
|
|
29039
|
+
networkType: (_global$navigator3 = (typeof window !== undefined ? window : global).navigator) == null ? void 0 : (_global$navigator3$co = _global$navigator3.connection) == null ? void 0 : _global$navigator3$co.type
|
|
29044
29040
|
});
|
|
29045
29041
|
};
|
|
29046
29042
|
|
|
@@ -41923,7 +41919,7 @@ function staticConfigFactory(_temp) {
|
|
|
41923
41919
|
_ref$axios = _ref.axios,
|
|
41924
41920
|
axios = _ref$axios === void 0 ? _axios.default : _ref$axios,
|
|
41925
41921
|
_ref$properties = _ref.properties,
|
|
41926
|
-
properties = _ref$properties === void 0 ? {"version":"v2.35.0","buildHash":"
|
|
41922
|
+
properties = _ref$properties === void 0 ? {"version":"v2.35.0","buildHash":"2989cd58d","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;
|
|
41927
41923
|
/** @type builtInConfig */
|
|
41928
41924
|
const builtInConfig = (0, _cloneDeep.default)(properties);
|
|
41929
41925
|
/**
|
|
@@ -71545,6 +71541,28 @@ function SessionFactory(deps) {
|
|
|
71545
71541
|
return subscriber;
|
|
71546
71542
|
};
|
|
71547
71543
|
|
|
71544
|
+
/**
|
|
71545
|
+
* Promisified version of {@link Session#subscribe}.
|
|
71546
|
+
* Instead of passing a completion handler, await the returned Promise, which resolves
|
|
71547
|
+
* with the Subscriber object on success.
|
|
71548
|
+
*
|
|
71549
|
+
* @example
|
|
71550
|
+
* // Subscribe to a stream with a target element and properties:
|
|
71551
|
+
* const subscriber = await session.subscribe.promise(stream, 'subscriberElementId', { insertMode: 'append' });
|
|
71552
|
+
*
|
|
71553
|
+
* // Subscribe with only a stream (optional params can be omitted):
|
|
71554
|
+
* const subscriber = await session.subscribe.promise(stream);
|
|
71555
|
+
*/
|
|
71556
|
+
this.subscribe.promise = (stream, targetElement, properties) => new Promise((resolve, reject) => {
|
|
71557
|
+
this.subscribe(stream, targetElement, properties, (err, sub) => {
|
|
71558
|
+
if (err) {
|
|
71559
|
+
reject(err);
|
|
71560
|
+
} else {
|
|
71561
|
+
resolve(sub);
|
|
71562
|
+
}
|
|
71563
|
+
});
|
|
71564
|
+
});
|
|
71565
|
+
|
|
71548
71566
|
/**
|
|
71549
71567
|
* Stops subscribing to a stream in the session. the display of the audio-video stream is
|
|
71550
71568
|
* removed from the local web page.
|