@opentok/client 2.30.1-alpha.3 → 2.30.1-alpha.4
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 +2 -0
- package/dist/js/opentok.js +31 -12
- 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
|
@@ -183,6 +183,7 @@ declare namespace OT {
|
|
|
183
183
|
creationTime: number;
|
|
184
184
|
frameRate: number;
|
|
185
185
|
hasAudio: boolean;
|
|
186
|
+
hasCaptions: boolean;
|
|
186
187
|
hasVideo: boolean;
|
|
187
188
|
initials: string;
|
|
188
189
|
name: string;
|
|
@@ -521,6 +522,7 @@ declare namespace OT {
|
|
|
521
522
|
stream: Stream;
|
|
522
523
|
} & (
|
|
523
524
|
{ changedProperty: 'hasAudio'; oldValue: boolean; newValue: boolean; } |
|
|
525
|
+
{ changedProperty: 'hasCaptions'; oldValue: boolean; newValue: boolean; } |
|
|
524
526
|
{ changedProperty: 'hasVideo'; oldValue: boolean; newValue: boolean; } |
|
|
525
527
|
{ changedProperty: 'videoDimensions'; oldValue: Dimensions; newValue: Dimensions; }
|
|
526
528
|
)
|
package/dist/js/opentok.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license OpenTok.js 2.30.1
|
|
2
|
+
* @license OpenTok.js 2.30.1 b842fa8df
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) 2010-2025 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: Wed,
|
|
8
|
+
* Date: Wed, 28 May 2025 22:09:19 GMT
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
@@ -4169,7 +4169,7 @@ function EventsFactory(deps) {
|
|
|
4169
4169
|
*
|
|
4170
4170
|
* @class StreamPropertyChangedEvent
|
|
4171
4171
|
* @property {String} changedProperty The property of the stream that changed. This value
|
|
4172
|
-
* is either <code>"hasAudio"</code>, <code>"hasVideo"</code>, or <code>"videoDimensions"</code>.
|
|
4172
|
+
* is either <code>"hasAudio"</code>, <code>"hasVideo"</code>, <code>"hasCaptions"</code>, or <code>"videoDimensions"</code>.
|
|
4173
4173
|
* @property {Object} newValue The new value of the property (after the change).
|
|
4174
4174
|
* @property {Object} oldValue The old value of the property (before the change).
|
|
4175
4175
|
* @property {Stream} stream The Stream object for which a property has changed.
|
|
@@ -8672,7 +8672,7 @@ const logging = (0, _log.default)('StaticConfig');
|
|
|
8672
8672
|
*/
|
|
8673
8673
|
|
|
8674
8674
|
/** @type builtInConfig */
|
|
8675
|
-
const builtInConfig = (0, _cloneDeep.default)({"version":"v2.30.1","buildHash":"
|
|
8675
|
+
const builtInConfig = (0, _cloneDeep.default)({"version":"v2.30.1","buildHash":"b842fa8df","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"});
|
|
8676
8676
|
const whitelistAllowedRuntimeProperties = (0, _pick.default)(['apiURL', 'assetURL', 'cdnURL', 'sessionInfoOverrides', 'loggingURL']);
|
|
8677
8677
|
const liveConfigMap = {
|
|
8678
8678
|
apiUrl: 'apiURL',
|
|
@@ -19626,6 +19626,8 @@ function PublisherFactory(_ref) {
|
|
|
19626
19626
|
* @see <a href="OT.html#initPublisher">OT.initPublisher()</a>
|
|
19627
19627
|
* @see <a href="Subscriber.html#subscribeToCaptions">subscribeToCaptions()</a>
|
|
19628
19628
|
* @see <a href="Subscriber.html#isSubscribedToCaptions">isSubscribedToCaptions()</a>
|
|
19629
|
+
* @see <a href="Stream.html#hasCaptions">Stream.hasCaptions</a>
|
|
19630
|
+
* @see StreamPropertyChangedEvent
|
|
19629
19631
|
* @method #publishCaptions
|
|
19630
19632
|
* @memberOf Publisher
|
|
19631
19633
|
*/
|
|
@@ -23993,6 +23995,12 @@ const validPropertyNames = ['name', 'archiving'];
|
|
|
23993
23995
|
* the publisher of the stream specifies a frame rate when calling the
|
|
23994
23996
|
* <code>OT.initPublisher()</code> method; otherwise, this property is undefined.
|
|
23995
23997
|
*
|
|
23998
|
+
* @property {Boolean} hasCaptions Whether the stream has captions. This property can change if the
|
|
23999
|
+
* publisher turns on or off captions (by calling
|
|
24000
|
+
* <a href="Publisher.html#publishCaptions">Publisher.publishCaptions()</a>). When this occurs, the
|
|
24001
|
+
* {@link Session} object dispatches a <code>streamPropertyChanged</code> event (see
|
|
24002
|
+
* {@link StreamPropertyChangedEvent}).
|
|
24003
|
+
*
|
|
23996
24004
|
* @property {Boolean} hasAudio Whether the stream has audio. This property can change if the
|
|
23997
24005
|
* publisher turns on or off audio (by calling
|
|
23998
24006
|
* <a href="Publisher.html#publishAudio">Publisher.publishAudio()</a>). When this occurs, the
|
|
@@ -24056,7 +24064,13 @@ function Stream(id, name, creationTime, connection, session, channel, initials)
|
|
|
24056
24064
|
let _key = key;
|
|
24057
24065
|
switch (_key) {
|
|
24058
24066
|
case 'active':
|
|
24059
|
-
|
|
24067
|
+
if (channel.type === 'audio') {
|
|
24068
|
+
_key = 'hasAudio';
|
|
24069
|
+
} else if (channel.type === 'video') {
|
|
24070
|
+
_key = 'hasVideo';
|
|
24071
|
+
} else if (channel.type === 'data' && channel.id === 'caption1') {
|
|
24072
|
+
_key = 'hasCaptions';
|
|
24073
|
+
}
|
|
24060
24074
|
self[_key] = newValue;
|
|
24061
24075
|
break;
|
|
24062
24076
|
case 'disableWarning':
|
|
@@ -24130,11 +24144,13 @@ function Stream(id, name, creationTime, connection, session, channel, initials)
|
|
|
24130
24144
|
|
|
24131
24145
|
const audioChannel = this.getChannelsOfType('audio')[0];
|
|
24132
24146
|
const videoChannel = this.getChannelsOfType('video')[0];
|
|
24147
|
+
const captionChannel = this.getChannelsOfType('data').find(channel => channel.id === 'caption1');
|
|
24133
24148
|
|
|
24134
24149
|
// @todo this should really be: "has at least one video/audio track" instead of
|
|
24135
24150
|
// "the first video/audio track"
|
|
24136
|
-
this.hasAudio = audioChannel != null && audioChannel.active;
|
|
24137
|
-
this.hasVideo = videoChannel != null && videoChannel.active;
|
|
24151
|
+
this.hasAudio = !!(audioChannel != null && audioChannel.active);
|
|
24152
|
+
this.hasVideo = !!(videoChannel != null && videoChannel.active);
|
|
24153
|
+
this.hasCaptions = !!(captionChannel != null && captionChannel.active);
|
|
24138
24154
|
this.videoType = videoChannel && videoChannel.source;
|
|
24139
24155
|
this.defaultFitMode = videoChannel && videoChannel.fitMode;
|
|
24140
24156
|
this.videoDimensions = {};
|
|
@@ -24145,9 +24161,8 @@ function Stream(id, name, creationTime, connection, session, channel, initials)
|
|
|
24145
24161
|
videoChannel.on('update', onChannelUpdate);
|
|
24146
24162
|
this.frameRate = videoChannel.frameRate;
|
|
24147
24163
|
}
|
|
24148
|
-
|
|
24149
|
-
|
|
24150
|
-
}
|
|
24164
|
+
audioChannel == null ? void 0 : audioChannel.on('update', onChannelUpdate);
|
|
24165
|
+
captionChannel == null ? void 0 : captionChannel.on('update', onChannelUpdate);
|
|
24151
24166
|
this.setChannelActiveState = function setChannelActiveState(_ref) {
|
|
24152
24167
|
let channelType = _ref.channelType,
|
|
24153
24168
|
activeState = _ref.activeState,
|
|
@@ -40031,6 +40046,7 @@ function SubscriberFactory(_ref2) {
|
|
|
40031
40046
|
*
|
|
40032
40047
|
* @see <a href="#isSubscribedToCaptions">isSubscribedToCaptions()</a>
|
|
40033
40048
|
* @see <a href="#event:captionReceived">captionReceived</a> event
|
|
40049
|
+
* @see <a href="StreamPropertyChangedEvent.html">StreamPropertyChangedEvent</a>
|
|
40034
40050
|
*
|
|
40035
40051
|
* @method #subscribeToCaptions
|
|
40036
40052
|
* @memberOf Subscriber
|
|
@@ -46205,8 +46221,9 @@ function SessionFactory(deps) {
|
|
|
46205
46221
|
* in the following conditions:
|
|
46206
46222
|
* <p>
|
|
46207
46223
|
* <ul>
|
|
46208
|
-
* <li> A stream has started or stopped publishing audio or video (see
|
|
46209
|
-
* <a href="Publisher.html#publishAudio">Publisher.publishAudio()</a
|
|
46224
|
+
* <li> A stream has started or stopped publishing audio, captions, or video (see
|
|
46225
|
+
* <a href="Publisher.html#publishAudio">Publisher.publishAudio()</a>,
|
|
46226
|
+
* <a href="Publisher.html#publishCaptions">Publisher.publishCaptions()</a> and
|
|
46210
46227
|
* <a href="Publisher.html#publishVideo">Publisher.publishVideo()</a>). Note
|
|
46211
46228
|
* that a subscriber's video can be disabled or enabled for reasons other than
|
|
46212
46229
|
* the publisher disabling or enabling it. A Subscriber object dispatches
|
|
@@ -46227,8 +46244,10 @@ function SessionFactory(deps) {
|
|
|
46227
46244
|
* @memberof Session
|
|
46228
46245
|
* @see StreamPropertyChangedEvent
|
|
46229
46246
|
* @see <a href="Publisher.html#publishAudio">Publisher.publishAudio()</a>
|
|
46247
|
+
* @see <a href="Publisher.html#publishCaptions">Publisher.publishCaptions()</a>
|
|
46230
46248
|
* @see <a href="Publisher.html#publishVideo">Publisher.publishVideo()</a>
|
|
46231
46249
|
* @see <a href="Stream.html#hasAudio">Stream.hasAudio</a>
|
|
46250
|
+
* @see <a href="Stream.html#hasCaptions">Stream.hasCaptions</a>
|
|
46232
46251
|
* @see <a href="Stream.html#hasVideo">Stream.hasVideo</a>
|
|
46233
46252
|
* @see <a href="Stream.html#videoDimensions">Stream.videoDimensions</a>
|
|
46234
46253
|
* @see <a href="Subscriber.html#event:videoDisabled">Subscriber videoDisabled event</a>
|