@opentok/client 2.35.0-alpha.27 → 2.35.0-alpha.28
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 +115 -44
- package/dist/js/opentok.js.map +1 -1
- package/dist/js/opentok.min.js +3 -3
- 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.35.0
|
|
2
|
+
* @license OpenTok.js 2.35.0 6d82efef1
|
|
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: Sat, 23 May 2026 07:05:36 GMT
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
@@ -26176,7 +26176,9 @@ function SubscriberFactory(_ref2) {
|
|
|
26176
26176
|
* <li>Total audio and video packets lost</li>
|
|
26177
26177
|
* <li>Total audio and video packets received</li>
|
|
26178
26178
|
* <li>Total audio and video bytes received</li>
|
|
26179
|
-
* <li>
|
|
26179
|
+
* <li>Actual received video resolution (via <a href="#videoWidth">videoWidth()</a> and
|
|
26180
|
+
* <a href="#videoHeight">videoHeight()</a>)</li>
|
|
26181
|
+
* <li>Actual decoded video frame rate (via <code>video.decodedFrameRate</code>)</li>
|
|
26180
26182
|
*
|
|
26181
26183
|
* </ul>
|
|
26182
26184
|
*
|
|
@@ -26860,11 +26862,20 @@ function SubscriberFactory(_ref2) {
|
|
|
26860
26862
|
};
|
|
26861
26863
|
|
|
26862
26864
|
/**
|
|
26863
|
-
* Returns the width, in pixels, of the Subscriber video.
|
|
26865
|
+
* Returns the actual received width, in pixels, of the Subscriber video. This reflects
|
|
26866
|
+
* the decoded resolution of the incoming video stream, which may differ from the
|
|
26867
|
+
* publisher's capture resolution due to network/CPU adaptation or scalable video layer
|
|
26868
|
+
* selection. Use this method to observe the real resolution being rendered for this
|
|
26869
|
+
* subscriber.
|
|
26870
|
+
* <p>
|
|
26871
|
+
* For more information on monitoring stream quality, see the
|
|
26872
|
+
* <a href="https://tokbox.com/developer/guides/client-observability/">Client Observability</a>
|
|
26873
|
+
* developer guide.
|
|
26864
26874
|
*
|
|
26875
|
+
* @see <a href="#getStats">Subscriber.getStats()</a>
|
|
26865
26876
|
* @method #videoWidth
|
|
26866
26877
|
* @memberOf Subscriber
|
|
26867
|
-
* @return {Number}
|
|
26878
|
+
* @return {Number} The actual received width, in pixels, of the Subscriber video.
|
|
26868
26879
|
*/
|
|
26869
26880
|
this.videoWidth = () => {
|
|
26870
26881
|
const video = _widgetView && _widgetView.video();
|
|
@@ -26872,11 +26883,20 @@ function SubscriberFactory(_ref2) {
|
|
|
26872
26883
|
};
|
|
26873
26884
|
|
|
26874
26885
|
/**
|
|
26875
|
-
* Returns the height, in pixels, of the Subscriber video.
|
|
26886
|
+
* Returns the actual received height, in pixels, of the Subscriber video. This reflects
|
|
26887
|
+
* the decoded resolution of the incoming video stream, which may differ from the
|
|
26888
|
+
* publisher's capture resolution due to network or cpu adaptation or scalable video layer
|
|
26889
|
+
* selection. Use this method to observe the real resolution being rendered for this
|
|
26890
|
+
* subscriber.
|
|
26891
|
+
* <p>
|
|
26892
|
+
* For more information on monitoring stream quality, see the
|
|
26893
|
+
* <a href="https://tokbox.com/developer/guides/client-observability/">Client Observability</a>
|
|
26894
|
+
* developer guide.
|
|
26876
26895
|
*
|
|
26896
|
+
* @see <a href="#getStats">Subscriber.getStats()</a>
|
|
26877
26897
|
* @method #videoHeight
|
|
26878
26898
|
* @memberOf Subscriber
|
|
26879
|
-
* @return {Number}
|
|
26899
|
+
* @return {Number} The actual received height, in pixels, of the Subscriber video.
|
|
26880
26900
|
*/
|
|
26881
26901
|
this.videoHeight = () => {
|
|
26882
26902
|
const video = _widgetView && _widgetView.video();
|
|
@@ -28326,14 +28346,26 @@ function SubscriberFactory(_ref2) {
|
|
|
28326
28346
|
*/
|
|
28327
28347
|
|
|
28328
28348
|
/**
|
|
28329
|
-
* Dispatched when the
|
|
28330
|
-
*
|
|
28331
|
-
*
|
|
28332
|
-
*
|
|
28333
|
-
*
|
|
28334
|
-
*
|
|
28335
|
-
*
|
|
28336
|
-
*
|
|
28349
|
+
* Dispatched when the <code>stream.videoDimensions</code> property is updated by the
|
|
28350
|
+
* publisher. This occurs when the publisher's local video element detects a dimension change
|
|
28351
|
+
* and signals the update to all session participants. Examples of what can cause this:
|
|
28352
|
+
* <ul>
|
|
28353
|
+
* <li>When <code>stream.videoType</code> is set to <code>"screen"</code> (screen-sharing)
|
|
28354
|
+
* and the user resizes the captured window.</li>
|
|
28355
|
+
* <li>When the video is being published by a mobile device and the user rotates the device,
|
|
28356
|
+
* causing the camera orientation to change.</li>
|
|
28357
|
+
* <li>When the publisher calls {@link Publisher#setPreferredResolution}, changing the
|
|
28358
|
+
* target capture resolution.</li>
|
|
28359
|
+
* </ul>
|
|
28360
|
+
* This event object has a <code>newValue</code> property and an <code>oldValue</code> property,
|
|
28361
|
+
* representing the new and old dimensions of the video. Each of these has a <code>height</code>
|
|
28362
|
+
* property and a <code>width</code> property, representing the height and width, in pixels.
|
|
28363
|
+
* <p>
|
|
28364
|
+
* Note: these dimensions reflect the publisher's <em>capture</em> resolution (what the
|
|
28365
|
+
* publisher is encoding and sending), not the resolution actually decoded by this subscriber.
|
|
28366
|
+
* The decoded resolution may differ due to network adaptation or scalable video coding.
|
|
28367
|
+
* Use {@link Subscriber#videoWidth} and {@link Subscriber#videoHeight} for the actual
|
|
28368
|
+
* received resolution.
|
|
28337
28369
|
* @name videoDimensionsChanged
|
|
28338
28370
|
* @event
|
|
28339
28371
|
* @memberof Subscriber
|
|
@@ -41891,7 +41923,7 @@ function staticConfigFactory(_temp) {
|
|
|
41891
41923
|
_ref$axios = _ref.axios,
|
|
41892
41924
|
axios = _ref$axios === void 0 ? _axios.default : _ref$axios,
|
|
41893
41925
|
_ref$properties = _ref.properties,
|
|
41894
|
-
properties = _ref$properties === void 0 ? {"version":"v2.35.0","buildHash":"
|
|
41926
|
+
properties = _ref$properties === void 0 ? {"version":"v2.35.0","buildHash":"6d82efef1","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;
|
|
41895
41927
|
/** @type builtInConfig */
|
|
41896
41928
|
const builtInConfig = (0, _cloneDeep.default)(properties);
|
|
41897
41929
|
/**
|
|
@@ -48509,26 +48541,24 @@ function PublisherFactory(_ref) {
|
|
|
48509
48541
|
};
|
|
48510
48542
|
|
|
48511
48543
|
/**
|
|
48512
|
-
* Returns the width, in pixels, of the
|
|
48513
|
-
* <code
|
|
48514
|
-
*
|
|
48515
|
-
* does not support the requested resolution.
|
|
48544
|
+
* Returns the width, in pixels, of the publisher's local video, read from the
|
|
48545
|
+
* local <code><video></code> element. This is the same value as
|
|
48546
|
+
* <code>stream.videoDimensions.width</code>
|
|
48516
48547
|
*
|
|
48517
48548
|
* @method #videoWidth
|
|
48518
48549
|
* @memberOf Publisher
|
|
48519
|
-
* @return {Number}
|
|
48550
|
+
* @return {Number} The width, in pixels, of the publisher's local video.
|
|
48520
48551
|
*/
|
|
48521
48552
|
this.videoWidth = () => getVideoDimensions().width;
|
|
48522
48553
|
|
|
48523
48554
|
/**
|
|
48524
|
-
* Returns the height, in pixels, of the
|
|
48525
|
-
* <code
|
|
48526
|
-
*
|
|
48527
|
-
* does not support the requested resolution.
|
|
48555
|
+
* Returns the height, in pixels, of the publisher's local video, read from the
|
|
48556
|
+
* local <code><video></code> element. This is the same value as
|
|
48557
|
+
* <code>stream.videoDimensions.height</code>.
|
|
48528
48558
|
*
|
|
48529
48559
|
* @method #videoHeight
|
|
48530
48560
|
* @memberOf Publisher
|
|
48531
|
-
* @return {Number}
|
|
48561
|
+
* @return {Number} The height, in pixels, of the publisher's local video.
|
|
48532
48562
|
*/
|
|
48533
48563
|
this.videoHeight = () => getVideoDimensions().height;
|
|
48534
48564
|
|
|
@@ -50347,12 +50377,21 @@ function PublisherFactory(_ref) {
|
|
|
50347
50377
|
*/
|
|
50348
50378
|
|
|
50349
50379
|
/**
|
|
50350
|
-
* Dispatched when the
|
|
50351
|
-
*
|
|
50352
|
-
*
|
|
50353
|
-
*
|
|
50354
|
-
*
|
|
50355
|
-
* <code>
|
|
50380
|
+
* Dispatched when the publisher's local <code><video></code> element detects a dimension
|
|
50381
|
+
* change. When the publisher is actively publishing, this also updates the
|
|
50382
|
+
* <code>stream.videoDimensions</code> property. Examples of what can cause the local video
|
|
50383
|
+
* element to resize:
|
|
50384
|
+
* <ul>
|
|
50385
|
+
* <li>When <code>stream.videoType</code> is set to <code>"screen"</code> (screen-sharing)
|
|
50386
|
+
* and the user resizes the captured window.</li>
|
|
50387
|
+
* <li>When the video is being published by a mobile device and the user rotates the device,
|
|
50388
|
+
* causing the camera orientation to change.</li>
|
|
50389
|
+
* <li>When the publisher calls {@link Publisher#setPreferredResolution}, changing the
|
|
50390
|
+
* target capture resolution.</li>
|
|
50391
|
+
* </ul>
|
|
50392
|
+
* This event object has a <code>newValue</code> property and an <code>oldValue</code> property,
|
|
50393
|
+
* representing the new and old dimensions of the video. Each of these has a <code>height</code>
|
|
50394
|
+
* property and a <code>width</code> property, representing the height and width, in pixels.
|
|
50356
50395
|
* @name videoDimensionsChanged
|
|
50357
50396
|
* @event
|
|
50358
50397
|
* @memberof Publisher
|
|
@@ -80049,8 +80088,17 @@ function EventsFactory(deps) {
|
|
|
80049
80088
|
};
|
|
80050
80089
|
|
|
80051
80090
|
/**
|
|
80052
|
-
* Dispatched when the video dimensions of
|
|
80053
|
-
*
|
|
80091
|
+
* Dispatched when the video dimensions of a published stream change.
|
|
80092
|
+
* <p>
|
|
80093
|
+
* On the <strong>Publisher</strong>, this event fires when the publisher's local
|
|
80094
|
+
* <code><video></code> element detects a dimension change. When the publisher is
|
|
80095
|
+
* actively publishing, this also updates the <code>stream.videoDimensions</code> property.
|
|
80096
|
+
* Examples of what can cause the local video element to resize: resizing a captured
|
|
80097
|
+
* screen-sharing window, rotating a mobile device (changing camera orientation), or calling
|
|
80098
|
+
* <code>Publisher.setPreferredResolution()</code>.
|
|
80099
|
+
* <p>
|
|
80100
|
+
* On the <strong>Subscriber</strong>, this event fires when the <code>stream.videoDimensions</code>
|
|
80101
|
+
* property is updated by the publisher.
|
|
80054
80102
|
*
|
|
80055
80103
|
* @class VideoDimensionsChangedEvent
|
|
80056
80104
|
* @property {Object} newValue The new video dimensions (after the change). This object has two
|
|
@@ -107462,9 +107510,19 @@ const validPropertyNames = ['name', 'archiving'];
|
|
|
107462
107510
|
* Date object by calling <code>new Date(creationTime)</code>, where <code>creationTime</code> is
|
|
107463
107511
|
* the <code>creationTime</code> property of the Stream object.
|
|
107464
107512
|
*
|
|
107465
|
-
* @property {Number} frameRate The
|
|
107466
|
-
*
|
|
107467
|
-
* <
|
|
107513
|
+
* @property {Number} frameRate The publisher's capture target frame rate.
|
|
107514
|
+
* Initially derived from the <code>frameRate</code> property passed to
|
|
107515
|
+
* <a href="OT.html#initPublisher">OT.initPublisher()</a>. This property is only set if the
|
|
107516
|
+
* publisher explicitly specifies a frame rate; otherwise, it is undefined. This value is
|
|
107517
|
+
* updated when the publisher calls
|
|
107518
|
+
* <a href="Publisher.html#setPreferredFrameRate">Publisher.setPreferredFrameRate()</a>.
|
|
107519
|
+
* <p>
|
|
107520
|
+
* <b>Note:</b> This value represents the publisher's current target capture frame rate, not
|
|
107521
|
+
* the frame rate actually encoded or received by a subscriber. The encoded frame rate may
|
|
107522
|
+
* still be lower due to bandwidth or CPU constraints, and the received frame rate can vary
|
|
107523
|
+
* further based on network conditions. To get the real decoded frame rate for a subscriber,
|
|
107524
|
+
* use the <code>video.decodedFrameRate</code> property returned by
|
|
107525
|
+
* <a href="Subscriber.html#getStats">Subscriber.getStats()</a>.
|
|
107468
107526
|
*
|
|
107469
107527
|
* @property {Boolean} hasCaptions Whether the stream has captions. This property can change if the
|
|
107470
107528
|
* publisher turns captions on or off (by calling the
|
|
@@ -107496,13 +107554,26 @@ const validPropertyNames = ['name', 'archiving'];
|
|
|
107496
107554
|
* @property {String} streamId The unique ID of the stream.
|
|
107497
107555
|
*
|
|
107498
107556
|
* @property {Object} videoDimensions This object has two properties: <code>width</code> and
|
|
107499
|
-
* <code>height</code
|
|
107500
|
-
*
|
|
107501
|
-
*
|
|
107502
|
-
*
|
|
107503
|
-
*
|
|
107504
|
-
*
|
|
107505
|
-
* (
|
|
107557
|
+
* <code>height</code> (both numbers). These represent the publisher's capture target resolution
|
|
107558
|
+
* last signaled to the session. The value is broadcast to all participants via the
|
|
107559
|
+
* signaling layer and is readable on both the publishing and subscribing clients.
|
|
107560
|
+
* <p>
|
|
107561
|
+
* The value is set initially from the <code>resolution</code> property passed to
|
|
107562
|
+
* <a href="OT.html#initPublisher">OT.initPublisher()</a>. It is updated at runtime when the
|
|
107563
|
+
* publisher's local <code><video></code> element detects a dimension change (for example,
|
|
107564
|
+
* after a call to
|
|
107565
|
+
* <a href="Publisher.html#setPreferredResolution">Publisher.setPreferredResolution()</a>,
|
|
107566
|
+
* a screen-sharing window resize, or a mobile device rotation).
|
|
107567
|
+
* <p>
|
|
107568
|
+
* <b>Note:</b> These values represent the publisher's capture target resolution, not the resolution
|
|
107569
|
+
* actually encoded or received by a subscriber. The publisher may encode at a lower resolution
|
|
107570
|
+
* due to bandwidth or CPU constraints, and subscribers using scalable video may receive an even
|
|
107571
|
+
* lower resolution layer. To get the actual decoded resolution on the subscribing client, use
|
|
107572
|
+
* <a href="Subscriber.html#videoWidth">Subscriber.videoWidth()</a> and
|
|
107573
|
+
* <a href="Subscriber.html#videoHeight">Subscriber.videoHeight()</a>.
|
|
107574
|
+
* <p>
|
|
107575
|
+
* When this property changes, the {@link Session} object dispatches a
|
|
107576
|
+
* <code>streamPropertyChanged</code> event (see {@link StreamPropertyChangedEvent}).
|
|
107506
107577
|
*
|
|
107507
107578
|
* @property {String} videoType The type of video — either <code>"camera"</code>,
|
|
107508
107579
|
* <code>"screen"</code>, or <code>"custom"</code>.
|