@opentok/client 2.28.5-alpha.9 → 2.28.5
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 +37 -66
- package/dist/js/opentok.js.map +1 -1
- package/dist/js/opentok.min.js +6 -6
- 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.28.5
|
|
2
|
+
* @license OpenTok.js 2.28.5 383b0af
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) 2010-2024 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: Fri, 29 Nov 2024 16:39:33 GMT
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
@@ -3738,45 +3738,32 @@ function EventsFactory(deps) {
|
|
|
3738
3738
|
};
|
|
3739
3739
|
|
|
3740
3740
|
/**
|
|
3741
|
-
* The Session object dispatches a
|
|
3742
|
-
*
|
|
3743
|
-
*
|
|
3744
|
-
*
|
|
3745
|
-
* This is a <i>beta</i> feature.
|
|
3741
|
+
* The Session object dispatches a cpuPerformanceChanged event when the CPU performance state has been changed
|
|
3742
|
+
* The event will only be dispatched on Chromium browsers (Chrome 125+, Edge 125+, and Opera 111+).
|
|
3743
|
+
* Events will not be dispatched after disconnecting from a Session, but will resume after reconnecting.
|
|
3744
|
+
* This is a <b>beta</b> feature.
|
|
3746
3745
|
*
|
|
3747
|
-
* @property {
|
|
3748
|
-
* be one the following: "nominal", "fair", "serious", or "critical"
|
|
3749
|
-
* (See <a href="https://w3c.github.io/compute-pressure/#pressure-states">this W3C specification</a>.)
|
|
3746
|
+
* @property {cpuPerformanceState} cpuPerformanceState The new cpuPerformanceState. The cpuPerformanceState can
|
|
3747
|
+
* be one the following: "nominal", "fair", "serious", or "critical";
|
|
3750
3748
|
*
|
|
3751
|
-
* @see <a href="Session.html#event:cpuPerformanceChanged">Session cpuPerformanceChanged event</a>
|
|
3752
|
-
* @class CpuPerformanceChangedEvent
|
|
3753
|
-
* @augments Event
|
|
3754
3749
|
*/
|
|
3755
|
-
Events.
|
|
3750
|
+
Events.CpuPerformanceChanged = function CpuPerformanceChanged(cpuPerformanceState) {
|
|
3756
3751
|
return new _Event4.default('cpuPerformanceChanged', false, {
|
|
3757
3752
|
cpuPerformanceState
|
|
3758
3753
|
});
|
|
3759
3754
|
};
|
|
3760
3755
|
|
|
3761
3756
|
/**
|
|
3762
|
-
* The Subscriber object dispatches a
|
|
3763
|
-
*
|
|
3764
|
-
*
|
|
3765
|
-
*
|
|
3766
|
-
* bad, poor, fair, good, and excellent.
|
|
3767
|
-
* This is a <i>beta</i> feature.
|
|
3768
|
-
*
|
|
3769
|
-
* @class QualityScoreChangedEvent
|
|
3770
|
-
* @augments Event
|
|
3771
|
-
* @see <a href="Subscriber.html#event:qualityScoreChanged">Subscriber qualityScoreChanged event</a>
|
|
3757
|
+
* The Subscriber object dispatches a qualityScoreChanged event when either the audio or video quality
|
|
3758
|
+
* score has changed. The scores are a heuristic value representing the expected subscriber experience. The values
|
|
3759
|
+
* range from 5 to 1, with the integer values corresponding to Excellent | Good | Fair | Poor | Bad.
|
|
3760
|
+
* This is a <b>beta</b> feature.
|
|
3772
3761
|
*
|
|
3773
|
-
* @property {
|
|
3774
|
-
*
|
|
3775
|
-
* and <code>videoQualityScore</code>. These properties are undefined if there
|
|
3776
|
-
* is either no audio or no video.
|
|
3762
|
+
* @property {QualityScore} qualityScore most recent quality score. The event contains
|
|
3763
|
+
* a qualityScore object with optional audio and video properties.
|
|
3777
3764
|
*
|
|
3778
3765
|
*/
|
|
3779
|
-
Events.
|
|
3766
|
+
Events.QualityScoreChanged = function qualityScoreChanged(qualityScore) {
|
|
3780
3767
|
return new _Event4.default('qualityScoreChanged', false, {
|
|
3781
3768
|
qualityScore
|
|
3782
3769
|
});
|
|
@@ -3811,7 +3798,7 @@ function EventsFactory(deps) {
|
|
|
3811
3798
|
};
|
|
3812
3799
|
|
|
3813
3800
|
/**
|
|
3814
|
-
* This is a <
|
|
3801
|
+
* This is a <b>beta</b> feature.
|
|
3815
3802
|
* Defines an event object for the <code>mediaStreamAvailable</code> event dispatched by both
|
|
3816
3803
|
* the Publisher and Subscriber objects. The Publisher and Subscriber objects both dispatch a <code>mediaStreamAvailable</code>
|
|
3817
3804
|
* event when the MediaStream is available to be used in custom video elements. The Publisher and Subscriber objects should still be used to
|
|
@@ -3825,10 +3812,9 @@ function EventsFactory(deps) {
|
|
|
3825
3812
|
* event</a>
|
|
3826
3813
|
* @see <a href="Subscriber.html#event:mediaStreamAvailable">Subscriber mediaStreamAvailable
|
|
3827
3814
|
* event</a>
|
|
3828
|
-
* @class MediaStreamAvailableEvent
|
|
3829
3815
|
* @augments Event
|
|
3830
3816
|
*/
|
|
3831
|
-
Events.
|
|
3817
|
+
Events.MediaStreamAvailable = function MediaStreamAvailable(mediaStream) {
|
|
3832
3818
|
return new _Event4.default('mediaStreamAvailable', false, {
|
|
3833
3819
|
mediaStream
|
|
3834
3820
|
});
|
|
@@ -3968,18 +3954,16 @@ function EventsFactory(deps) {
|
|
|
3968
3954
|
};
|
|
3969
3955
|
|
|
3970
3956
|
/**
|
|
3971
|
-
* Dispatched when the audio input device is changed. This is a <
|
|
3957
|
+
* Dispatched when the audio input device is changed. This is a <b>beta</b> feature.
|
|
3972
3958
|
*
|
|
3973
|
-
*
|
|
3974
|
-
* @property {Object} device The audio input device.
|
|
3975
|
-
* This object has a <code>deviceId</code> property and a <code>label</code> property (both strings).
|
|
3959
|
+
* @property {Object} device The audio input device. Contains a deviceId and label.
|
|
3976
3960
|
*
|
|
3977
3961
|
* @see <a href="Publisher.html#event:audioInputDeviceChanged">Publisher audioInputDeviceChanged event</a></p>
|
|
3978
3962
|
* @see <a href="Publisher.html#setAudioSource">Publisher.setAudioSource()</a></p>
|
|
3979
|
-
* @class
|
|
3963
|
+
* @class AudioInputDeviceChanged
|
|
3980
3964
|
* @augments Event
|
|
3981
3965
|
*/
|
|
3982
|
-
Events.
|
|
3966
|
+
Events.AudioInputDeviceChanged = function AudioInputDeviceChanged(device) {
|
|
3983
3967
|
return new _Event4.default(_eventNames.default.AUDIO_INPUT_DEVICE_CHANGED, false, {
|
|
3984
3968
|
device
|
|
3985
3969
|
});
|
|
@@ -8123,7 +8107,7 @@ const logging = (0, _log.default)('StaticConfig');
|
|
|
8123
8107
|
*/
|
|
8124
8108
|
|
|
8125
8109
|
/** @type builtInConfig */
|
|
8126
|
-
const builtInConfig = (0, _cloneDeep.default)({"version":"v2.28.5","buildHash":"
|
|
8110
|
+
const builtInConfig = (0, _cloneDeep.default)({"version":"v2.28.5","buildHash":"383b0af","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"});
|
|
8127
8111
|
const whitelistAllowedRuntimeProperties = (0, _pick.default)(['apiURL', 'assetURL', 'cdnURL', 'sessionInfoOverrides', 'loggingURL']);
|
|
8128
8112
|
const liveConfigMap = {
|
|
8129
8113
|
apiUrl: 'apiURL',
|
|
@@ -18706,7 +18690,7 @@ function PublisherFactory(_ref) {
|
|
|
18706
18690
|
}
|
|
18707
18691
|
});
|
|
18708
18692
|
widgetView.on('videoElementCreated', element => {
|
|
18709
|
-
this.dispatchEvent(new Events.
|
|
18693
|
+
this.dispatchEvent(new Events.MediaStreamAvailable(webRTCStream));
|
|
18710
18694
|
const event = new Events.VideoElementCreatedEvent(element);
|
|
18711
18695
|
this.dispatchEvent(event);
|
|
18712
18696
|
});
|
|
@@ -22506,7 +22490,7 @@ function PublisherFactory(_ref) {
|
|
|
22506
22490
|
*/
|
|
22507
22491
|
|
|
22508
22492
|
/**
|
|
22509
|
-
* This is a <
|
|
22493
|
+
* This is a <b>beta</b> feature.
|
|
22510
22494
|
* Dispatched when the MediaStream is available.
|
|
22511
22495
|
* @see Event
|
|
22512
22496
|
* @name mediaStreamAvailable
|
|
@@ -22530,7 +22514,7 @@ function PublisherFactory(_ref) {
|
|
|
22530
22514
|
* This is a beta feature.
|
|
22531
22515
|
*
|
|
22532
22516
|
* @see Event
|
|
22533
|
-
* @see
|
|
22517
|
+
* @see AudioInputDeviceChanged
|
|
22534
22518
|
* @name audioInputDeviceChanged
|
|
22535
22519
|
* @event
|
|
22536
22520
|
* @memberof Publisher
|
|
@@ -34656,7 +34640,7 @@ function SubscriberFactory(_ref2) {
|
|
|
34656
34640
|
_session2 = _session, sessionInfo = _session2.sessionInfo;
|
|
34657
34641
|
if (!_exposedWebRTCStream) {
|
|
34658
34642
|
_exposedWebRTCStream = new MediaStream(webRTCStream);
|
|
34659
|
-
_this.dispatchEvent(new Events.
|
|
34643
|
+
_this.dispatchEvent(new Events.MediaStreamAvailable(_exposedWebRTCStream));
|
|
34660
34644
|
}
|
|
34661
34645
|
_webRTCStream = webRTCStream;
|
|
34662
34646
|
|
|
@@ -37435,7 +37419,7 @@ function SubscriberFactory(_ref2) {
|
|
|
37435
37419
|
*/
|
|
37436
37420
|
|
|
37437
37421
|
/**
|
|
37438
|
-
* This is a <
|
|
37422
|
+
* This is a <b>beta</b> feature.
|
|
37439
37423
|
* Dispatched when the MediaStream is available.
|
|
37440
37424
|
* @see Event
|
|
37441
37425
|
* @name mediaStreamAvailable
|
|
@@ -37587,11 +37571,11 @@ function SubscriberFactory(_ref2) {
|
|
|
37587
37571
|
* Dispatched when either the audio or video quality
|
|
37588
37572
|
* score has changed. The scores are a heuristic value representing the expected subscriber experience. The values
|
|
37589
37573
|
* range from 5 to 1, with the integer values corresponding to Excellent | Good | Fair | Poor | Bad.
|
|
37590
|
-
* This is a <
|
|
37574
|
+
* This is a <b>beta</b> feature.
|
|
37591
37575
|
* @name qualityScoreChanged
|
|
37592
37576
|
* @event
|
|
37593
37577
|
* @memberof Subscriber
|
|
37594
|
-
* @see
|
|
37578
|
+
* @see qualityScoreChangedEvent
|
|
37595
37579
|
*/
|
|
37596
37580
|
return this;
|
|
37597
37581
|
};
|
|
@@ -64438,7 +64422,7 @@ function SessionFactory(deps) {
|
|
|
64438
64422
|
cpuPressureMonitor.initMonitoring(PressureObserver);
|
|
64439
64423
|
cpuPressureMonitor.startMonitoring();
|
|
64440
64424
|
cpuPressureMonitor.on('pressureMonitorEvent', newState => {
|
|
64441
|
-
this.dispatchEvent(new Events.
|
|
64425
|
+
this.dispatchEvent(new Events.CpuPerformanceChanged(newState));
|
|
64442
64426
|
});
|
|
64443
64427
|
}
|
|
64444
64428
|
|
|
@@ -67279,17 +67263,6 @@ function SessionFactory(deps) {
|
|
|
67279
67263
|
* of streams in a session</a>
|
|
67280
67264
|
*/
|
|
67281
67265
|
|
|
67282
|
-
/**
|
|
67283
|
-
* The CPU performance state has changed. This can be set to
|
|
67284
|
-
* one the following: "nominal", "fair", "serious", or "critical".
|
|
67285
|
-
* This is a <i>beta</i> feature.
|
|
67286
|
-
*
|
|
67287
|
-
* @name cpuPerformanceChanged
|
|
67288
|
-
* @event
|
|
67289
|
-
* @memberof Session
|
|
67290
|
-
* @see CpuPerformanceChangedEvent
|
|
67291
|
-
*/
|
|
67292
|
-
|
|
67293
67266
|
/**
|
|
67294
67267
|
* The client has connected to a Vonage Video API session. This event is dispatched asynchronously
|
|
67295
67268
|
* in response to a successful call to the <code>connect()</code> method of a Session
|
|
@@ -67307,7 +67280,7 @@ function SessionFactory(deps) {
|
|
|
67307
67280
|
/**
|
|
67308
67281
|
* The client has disconnected from the session. This event may be dispatched asynchronously
|
|
67309
67282
|
* in response to a successful call to the <code>disconnect()</code> method of the Session object.
|
|
67310
|
-
* The event may also be dispatched if a session connection is lost
|
|
67283
|
+
* The event may also be dispatched if a session connection is lost inadvertantly, as in the case
|
|
67311
67284
|
* of a lost network connection.
|
|
67312
67285
|
* <p>
|
|
67313
67286
|
* The default behavior is that all Subscriber objects are unsubscribed and removed from the
|
|
@@ -67456,7 +67429,7 @@ function SessionFactory(deps) {
|
|
|
67456
67429
|
* console.log("Signal data: " + event.data);
|
|
67457
67430
|
* });
|
|
67458
67431
|
* </pre>
|
|
67459
|
-
* <p>You can register for signals of a
|
|
67432
|
+
* <p>You can register for signals of a specfied type by adding an event handler for the
|
|
67460
67433
|
* <code>signal:type</code> event (replacing <code>type</code> with the actual type string
|
|
67461
67434
|
* to filter on).
|
|
67462
67435
|
*
|
|
@@ -67480,7 +67453,7 @@ function SessionFactory(deps) {
|
|
|
67480
67453
|
* </li>
|
|
67481
67454
|
* </ul>
|
|
67482
67455
|
* <p>
|
|
67483
|
-
* You can register for signals of a
|
|
67456
|
+
* You can register for signals of a specfied type by adding an event handler for the
|
|
67484
67457
|
* <code>signal:type</code> event (replacing <code>type</code> with the actual type string
|
|
67485
67458
|
* to filter on). For example, the following code adds an event handler for signals of
|
|
67486
67459
|
* type "foo":
|
|
@@ -69741,13 +69714,12 @@ OT.ArchiveEvent = Events.ArchiveEvent;
|
|
|
69741
69714
|
OT.ArchiveUpdatedEvent = Events.ArchiveUpdatedEvent;
|
|
69742
69715
|
OT.AudioLevelTransformer = _audio_level_transformer.default;
|
|
69743
69716
|
OT.AudioLevelUpdatedEvent = Events.AudioLevelUpdatedEvent;
|
|
69744
|
-
OT.
|
|
69717
|
+
OT.AudioInputDeviceChanged = Events.AudioInputDeviceChanged;
|
|
69745
69718
|
OT.Capabilities = _capabilities.default;
|
|
69746
69719
|
OT.Chrome = _chrome.default;
|
|
69747
69720
|
OT.Connection = _connection.default;
|
|
69748
69721
|
OT.ConnectionCapabilities = OT.Connection.Capabilities;
|
|
69749
69722
|
OT.ConnectionEvent = Events.ConnectionEvent;
|
|
69750
|
-
OT.CpuPerformanceChangedEvent = Events.CpuPerformanceChangedEvent;
|
|
69751
69723
|
Object.keys(_logLevels.default).forEach(name => {
|
|
69752
69724
|
OT[name.toUpperCase()] = _logLevels.default[name].priority;
|
|
69753
69725
|
});
|
|
@@ -69785,7 +69757,6 @@ OT.HAS_REQUIREMENTS = 1;
|
|
|
69785
69757
|
OT.IntervalRunner = _interval_runner.default;
|
|
69786
69758
|
OT.IssueReportedEvent = Events.IssueReportedEvent;
|
|
69787
69759
|
OT.MediaStoppedEvent = Events.MediaStoppedEvent;
|
|
69788
|
-
OT.MediaStreamAvailableEvent = Events.MediaStreamAvailableEvent;
|
|
69789
69760
|
OT.Microphone = Microphone;
|
|
69790
69761
|
OT.NOT_HAS_REQUIREMENTS = 0;
|
|
69791
69762
|
OT.PeerConnection = PeerConnection;
|
|
@@ -95445,7 +95416,7 @@ const createMOSScoreHelper = () => ({
|
|
|
95445
95416
|
if (previousVideoScore !== currentVideoScore || previousAudioScore !== currentAudioScore) {
|
|
95446
95417
|
// Don't emit an empty object
|
|
95447
95418
|
if (Object.keys(qualityScore).length > 0) {
|
|
95448
|
-
subscriber.dispatchEvent(new Events.
|
|
95419
|
+
subscriber.dispatchEvent(new Events.QualityScoreChanged(qualityScore));
|
|
95449
95420
|
}
|
|
95450
95421
|
}
|
|
95451
95422
|
previousAudioScore = currentAudioScore;
|
|
@@ -97834,7 +97805,7 @@ var _default = function _default(deps) {
|
|
|
97834
97805
|
_context.next = 9;
|
|
97835
97806
|
return publisher.setAudioSource(device.deviceId);
|
|
97836
97807
|
case 9:
|
|
97837
|
-
publisher.dispatchEvent(Events.
|
|
97808
|
+
publisher.dispatchEvent(Events.AudioInputDeviceChanged(device));
|
|
97838
97809
|
case 10:
|
|
97839
97810
|
case "end":
|
|
97840
97811
|
return _context.stop();
|