@opentok/client 2.35.0-alpha.32 → 2.35.0-alpha.34
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 -14
- 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
|
@@ -151,6 +151,16 @@ declare namespace OT {
|
|
|
151
151
|
|
|
152
152
|
export type AudioFilter = AdvancedNoiseSuppressionFilter;
|
|
153
153
|
|
|
154
|
+
export interface LegacyMediaTrackConstraints {
|
|
155
|
+
mandatory?: Record<string, string | number | boolean>;
|
|
156
|
+
optional?: Array<Record<string, string | number | boolean>>;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export interface LegacyMediaStreamConstraints {
|
|
160
|
+
audio?: boolean | MediaTrackConstraints | LegacyMediaTrackConstraints;
|
|
161
|
+
video?: boolean | MediaTrackConstraints | LegacyMediaTrackConstraints;
|
|
162
|
+
}
|
|
163
|
+
|
|
154
164
|
export type PublisherProperties = WidgetProperties & GetUserMediaProperties & {
|
|
155
165
|
audioBitrate?: number;
|
|
156
166
|
audioFallback?: {
|
|
@@ -174,6 +184,7 @@ declare namespace OT {
|
|
|
174
184
|
audioFilter?: AudioFilter;
|
|
175
185
|
disableAudioInputDeviceManagement?: boolean;
|
|
176
186
|
preferredVideoCodecs?: PreferredVideoCodecs;
|
|
187
|
+
constraints?: MediaStreamConstraints | LegacyMediaStreamConstraints;
|
|
177
188
|
};
|
|
178
189
|
|
|
179
190
|
export type SubscriberStyle = WidgetStyle & {
|
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 0b971face
|
|
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: Tue, 26 May 2026
|
|
8
|
+
* Date: Tue, 26 May 2026 08:44:19 GMT
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
@@ -6643,6 +6643,7 @@ function PublisherPeerConnectionFactory(deps) {
|
|
|
6643
6643
|
(_peerConnection2 = _peerConnection) == null ? void 0 : _peerConnection2.iceRestart(reason, forcedRestart);
|
|
6644
6644
|
};
|
|
6645
6645
|
this.hasRelayCandidates = () => _peerConnection.hasRelayCandidates();
|
|
6646
|
+
this.hasTrack = track => _peerConnection.hasTrack(track);
|
|
6646
6647
|
this.iceConnectionStateIsConnected = function () {
|
|
6647
6648
|
return _peerConnection.iceConnectionStateIsConnected();
|
|
6648
6649
|
};
|
|
@@ -41919,7 +41920,7 @@ function staticConfigFactory(_temp) {
|
|
|
41919
41920
|
_ref$axios = _ref.axios,
|
|
41920
41921
|
axios = _ref$axios === void 0 ? _axios.default : _ref$axios,
|
|
41921
41922
|
_ref$properties = _ref.properties,
|
|
41922
|
-
properties = _ref$properties === void 0 ? {"version":"v2.35.0","buildHash":"
|
|
41923
|
+
properties = _ref$properties === void 0 ? {"version":"v2.35.0","buildHash":"0b971face","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;
|
|
41923
41924
|
/** @type builtInConfig */
|
|
41924
41925
|
const builtInConfig = (0, _cloneDeep.default)(properties);
|
|
41925
41926
|
/**
|
|
@@ -81022,6 +81023,7 @@ let _default = function _default(deps) {
|
|
|
81022
81023
|
}
|
|
81023
81024
|
return _context.abrupt("return");
|
|
81024
81025
|
case 2:
|
|
81026
|
+
_this.amrAudioMuted = true;
|
|
81025
81027
|
// If it is not muted, the ID is not present, or the PC does not have the cloned track,
|
|
81026
81028
|
// we clone the track, disable it, and replace it.
|
|
81027
81029
|
newClonedTrack = newTrack.clone();
|
|
@@ -81030,27 +81032,29 @@ let _default = function _default(deps) {
|
|
|
81030
81032
|
// When a track is cloned, the ID changes but is otherwise identical. Thus,
|
|
81031
81033
|
// we need to find the old cloned track by the (original, pre-cloned) ID,
|
|
81032
81034
|
// since we cannot use strict equality to find it, and replace it with a new cloned track.
|
|
81033
|
-
|
|
81034
|
-
|
|
81035
|
-
|
|
81035
|
+
// Also, if the old track was not muted, we will not find it in the map, and in that case
|
|
81036
|
+
// we will try to replace the original track.
|
|
81037
|
+
oldClonedTrack = _this.mutedMantisAudioTracksInAMR[oldTrack.id] || oldTrack;
|
|
81038
|
+
_context.prev = 6;
|
|
81039
|
+
_context.next = 9;
|
|
81036
81040
|
return peerConnection.findAndReplaceTrack(oldClonedTrack, newClonedTrack);
|
|
81037
|
-
case
|
|
81038
|
-
_context.next =
|
|
81041
|
+
case 9:
|
|
81042
|
+
_context.next = 15;
|
|
81039
81043
|
break;
|
|
81040
|
-
case
|
|
81041
|
-
_context.prev =
|
|
81042
|
-
_context.t0 = _context["catch"](
|
|
81044
|
+
case 11:
|
|
81045
|
+
_context.prev = 11;
|
|
81046
|
+
_context.t0 = _context["catch"](6);
|
|
81043
81047
|
_this.logging.error(`Error swapping AMR audio track: ${_context.t0}`);
|
|
81044
81048
|
return _context.abrupt("return");
|
|
81045
|
-
case
|
|
81049
|
+
case 15:
|
|
81046
81050
|
// Save it, so it can be restored once unmuted.
|
|
81047
81051
|
_this.mutedMantisAudioTracksInAMR[newTrack.id] = newClonedTrack;
|
|
81048
81052
|
delete _this.mutedMantisAudioTracksInAMR[oldTrack.id];
|
|
81049
|
-
case
|
|
81053
|
+
case 17:
|
|
81050
81054
|
case "end":
|
|
81051
81055
|
return _context.stop();
|
|
81052
81056
|
}
|
|
81053
|
-
}, _callee, null, [[
|
|
81057
|
+
}, _callee, null, [[6, 11]]);
|
|
81054
81058
|
}));
|
|
81055
81059
|
return function (_x, _x2, _x3) {
|
|
81056
81060
|
return _ref.apply(this, arguments);
|