@opentok/client 2.34.1-alpha.1 → 2.34.2-alpha.1
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 +11 -0
- package/dist/js/opentok.js +18 -18
- package/dist/js/opentok.js.map +1 -1
- package/dist/js/opentok.min.js +5 -5
- package/dist/js/opentok.min.js.map +1 -1
- package/package.json +1 -1
package/dist/js/opentok.d.ts
CHANGED
|
@@ -141,6 +141,16 @@ declare namespace OT {
|
|
|
141
141
|
|
|
142
142
|
export type AudioFilter = AdvancedNoiseSuppressionFilter;
|
|
143
143
|
|
|
144
|
+
export interface LegacyMediaTrackConstraints {
|
|
145
|
+
mandatory?: Record<string, string | number | boolean>;
|
|
146
|
+
optional?: Array<Record<string, string | number | boolean>>;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
export interface LegacyMediaStreamConstraints {
|
|
150
|
+
audio?: boolean | MediaTrackConstraints | LegacyMediaTrackConstraints;
|
|
151
|
+
video?: boolean | MediaTrackConstraints | LegacyMediaTrackConstraints;
|
|
152
|
+
}
|
|
153
|
+
|
|
144
154
|
export type PublisherProperties = WidgetProperties & GetUserMediaProperties & {
|
|
145
155
|
audioBitrate?: number;
|
|
146
156
|
audioFallback?: {
|
|
@@ -164,6 +174,7 @@ declare namespace OT {
|
|
|
164
174
|
audioFilter?: AudioFilter;
|
|
165
175
|
disableAudioInputDeviceManagement?: boolean;
|
|
166
176
|
preferredVideoCodecs?: PreferredVideoCodecs;
|
|
177
|
+
constraints?: MediaStreamConstraints | LegacyMediaStreamConstraints;
|
|
167
178
|
};
|
|
168
179
|
|
|
169
180
|
export type SubscriberStyle = WidgetStyle & {
|
package/dist/js/opentok.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license OpenTok.js 2.34.
|
|
2
|
+
* @license OpenTok.js 2.34.2 f71fc9162
|
|
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, 02 Jun 2026 10:04:23 GMT
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
@@ -10229,7 +10229,7 @@ function staticConfigFactory(_temp) {
|
|
|
10229
10229
|
_ref$axios = _ref.axios,
|
|
10230
10230
|
axios = _ref$axios === void 0 ? _axios.default : _ref$axios,
|
|
10231
10231
|
_ref$properties = _ref.properties,
|
|
10232
|
-
properties = _ref$properties === void 0 ? {"version":"v2.34.
|
|
10232
|
+
properties = _ref$properties === void 0 ? {"version":"v2.34.2","buildHash":"f71fc9162","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;
|
|
10233
10233
|
/** @type builtInConfig */
|
|
10234
10234
|
const builtInConfig = (0, _cloneDeep.default)(properties);
|
|
10235
10235
|
/**
|
|
@@ -48549,6 +48549,7 @@ function PublisherPeerConnectionFactory(deps) {
|
|
|
48549
48549
|
}
|
|
48550
48550
|
};
|
|
48551
48551
|
this.hasRelayCandidates = () => _peerConnection.hasRelayCandidates();
|
|
48552
|
+
this.hasTrack = track => _peerConnection.hasTrack(track);
|
|
48552
48553
|
this.iceConnectionStateIsConnected = function () {
|
|
48553
48554
|
return _peerConnection.iceConnectionStateIsConnected();
|
|
48554
48555
|
};
|
|
@@ -83710,10 +83711,6 @@ function getUserMediaFactory(deps) {
|
|
|
83710
83711
|
return customGetUserMedia(...arguments);
|
|
83711
83712
|
}
|
|
83712
83713
|
if (navigator.mediaDevices) {
|
|
83713
|
-
if (env.isAndroidWebView) {
|
|
83714
|
-
// eslint-disable-next-line no-undef
|
|
83715
|
-
return parent.navigator.mediaDevices.getUserMedia(...arguments);
|
|
83716
|
-
}
|
|
83717
83714
|
return navigator.mediaDevices.getUserMedia(...arguments);
|
|
83718
83715
|
}
|
|
83719
83716
|
return Promise.reject(new Error('Cannot find getUserMedia'));
|
|
@@ -93968,6 +93965,7 @@ let _default = function _default(deps) {
|
|
|
93968
93965
|
}
|
|
93969
93966
|
return _context.abrupt("return");
|
|
93970
93967
|
case 2:
|
|
93968
|
+
_this.amrAudioMuted = true;
|
|
93971
93969
|
// If it is not muted, the ID is not present, or the PC does not have the cloned track,
|
|
93972
93970
|
// we clone the track, disable it, and replace it.
|
|
93973
93971
|
newClonedTrack = newTrack.clone();
|
|
@@ -93976,27 +93974,29 @@ let _default = function _default(deps) {
|
|
|
93976
93974
|
// When a track is cloned, the ID changes but is otherwise identical. Thus,
|
|
93977
93975
|
// we need to find the old cloned track by the (original, pre-cloned) ID,
|
|
93978
93976
|
// since we cannot use strict equality to find it, and replace it with a new cloned track.
|
|
93979
|
-
|
|
93980
|
-
|
|
93981
|
-
|
|
93977
|
+
// Also, if the old track was not muted, we will not find it in the map, and in that case
|
|
93978
|
+
// we will try to replace the original track.
|
|
93979
|
+
oldClonedTrack = _this.mutedMantisAudioTracksInAMR[oldTrack.id] || oldTrack;
|
|
93980
|
+
_context.prev = 6;
|
|
93981
|
+
_context.next = 9;
|
|
93982
93982
|
return peerConnection.findAndReplaceTrack(oldClonedTrack, newClonedTrack);
|
|
93983
|
-
case
|
|
93984
|
-
_context.next =
|
|
93983
|
+
case 9:
|
|
93984
|
+
_context.next = 15;
|
|
93985
93985
|
break;
|
|
93986
|
-
case
|
|
93987
|
-
_context.prev =
|
|
93988
|
-
_context.t0 = _context["catch"](
|
|
93986
|
+
case 11:
|
|
93987
|
+
_context.prev = 11;
|
|
93988
|
+
_context.t0 = _context["catch"](6);
|
|
93989
93989
|
_this.logging.error(`Error swapping AMR audio track: ${_context.t0}`);
|
|
93990
93990
|
return _context.abrupt("return");
|
|
93991
|
-
case
|
|
93991
|
+
case 15:
|
|
93992
93992
|
// Save it, so it can be restored once unmuted.
|
|
93993
93993
|
_this.mutedMantisAudioTracksInAMR[newTrack.id] = newClonedTrack;
|
|
93994
93994
|
delete _this.mutedMantisAudioTracksInAMR[oldTrack.id];
|
|
93995
|
-
case
|
|
93995
|
+
case 17:
|
|
93996
93996
|
case "end":
|
|
93997
93997
|
return _context.stop();
|
|
93998
93998
|
}
|
|
93999
|
-
}, _callee, null, [[
|
|
93999
|
+
}, _callee, null, [[6, 11]]);
|
|
94000
94000
|
}));
|
|
94001
94001
|
return function (_x, _x2, _x3) {
|
|
94002
94002
|
return _ref.apply(this, arguments);
|