@twilio/video-node-sdk 1.0.0-rc.3 → 1.0.0-rc.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/CHANGELOG.md +99 -13
- package/FRAME_CONTRACT.md +20 -12
- package/LICENSE.md +226 -2
- package/LIFECYCLE.md +1 -1
- package/README.md +71 -530
- package/SECURITY-PRIVACY.md +1 -1
- package/THIRD_PARTY_NOTICES +2667 -0
- package/dist/index.cjs +212 -41
- package/dist/index.d.cts +151 -29
- package/dist/index.d.mts +151 -29
- package/dist/index.mjs +210 -42
- package/package.json +16 -6
- package/prebuilds/{darwin-x64/twilio_video_sdk_node-darwin-x64.node → darwin-arm64/twilio_video_sdk_node-darwin-arm64.node} +0 -0
- package/prebuilds/linux-x64/twilio_video_sdk_node-linux-x64.node +0 -0
package/dist/index.d.cts
CHANGED
|
@@ -28,8 +28,8 @@ interface I420Plane {
|
|
|
28
28
|
* received frame can be re-published without reshaping it.
|
|
29
29
|
*
|
|
30
30
|
* Each plane's `data` must be at least `stride * height` bytes (`ceil(height / 2)`
|
|
31
|
-
* for the 2x-subsampled `u`/`v` planes). `width` and `height` must be positive
|
|
32
|
-
* and
|
|
31
|
+
* for the 2x-subsampled `u`/`v` planes). `width` and `height` must be positive,
|
|
32
|
+
* even and at most 16383; other dimensions are rejected with a `RangeError`.
|
|
33
33
|
*
|
|
34
34
|
* Buffers are copied synchronously during `write()`, so the caller may reuse or
|
|
35
35
|
* free them as soon as it returns.
|
|
@@ -37,9 +37,9 @@ interface I420Plane {
|
|
|
37
37
|
interface VideoFrameInput {
|
|
38
38
|
/** Always `'I420'`. Optional; rejected if present and not `'I420'`. */
|
|
39
39
|
format?: 'I420';
|
|
40
|
-
/** Frame width in pixels. Must be positive and
|
|
40
|
+
/** Frame width in pixels. Must be positive, even and at most 16383. */
|
|
41
41
|
width: number;
|
|
42
|
-
/** Frame height in pixels. Must be positive and
|
|
42
|
+
/** Frame height in pixels. Must be positive, even and at most 16383. */
|
|
43
43
|
height: number;
|
|
44
44
|
/** Luminance plane. */
|
|
45
45
|
y: I420Plane;
|
|
@@ -200,9 +200,9 @@ interface RawVideoSourceOptions {
|
|
|
200
200
|
type: 'raw';
|
|
201
201
|
/** Always `'I420'`. */
|
|
202
202
|
format: 'I420';
|
|
203
|
-
/** Encoder width hint, in pixels. */
|
|
203
|
+
/** Encoder width hint, in pixels. Must be positive, even and at most 16383. */
|
|
204
204
|
width: number;
|
|
205
|
-
/** Encoder height hint, in pixels. */
|
|
205
|
+
/** Encoder height hint, in pixels. Must be positive, even and at most 16383. */
|
|
206
206
|
height: number;
|
|
207
207
|
/** Encoder frame-rate hint. */
|
|
208
208
|
fps?: number;
|
|
@@ -291,8 +291,11 @@ interface EncodingParameters {
|
|
|
291
291
|
}
|
|
292
292
|
/** Audio codecs that may be negotiated, in preference order. */
|
|
293
293
|
type AudioCodec = 'opus' | 'PCMU';
|
|
294
|
-
/**
|
|
295
|
-
|
|
294
|
+
/**
|
|
295
|
+
* Video codec that may be negotiated. `H264` requires {@link enableH264} to be
|
|
296
|
+
* called first.
|
|
297
|
+
*/
|
|
298
|
+
type VideoCodec = 'VP8' | 'H264';
|
|
296
299
|
/** Video encoding strategy. Currently only `auto` (server-driven) is supported. */
|
|
297
300
|
type VideoEncodingMode = 'auto';
|
|
298
301
|
/** Bandwidth-profile layout hint describing how remote video is arranged on screen. */
|
|
@@ -360,7 +363,10 @@ interface ConnectOptions {
|
|
|
360
363
|
networkQuality?: boolean | NetworkQualityConfiguration;
|
|
361
364
|
/** Preferred audio codecs in descending priority. */
|
|
362
365
|
preferredAudioCodecs?: AudioCodec[];
|
|
363
|
-
/**
|
|
366
|
+
/**
|
|
367
|
+
* Preferred video codecs in descending priority. Preferring `H264` without
|
|
368
|
+
* calling {@link enableH264} first makes {@link connect} reject with `TypeError`.
|
|
369
|
+
*/
|
|
364
370
|
preferredVideoCodecs?: VideoCodec[];
|
|
365
371
|
/** How outgoing video encodings are selected. */
|
|
366
372
|
videoEncodingMode?: VideoEncodingMode;
|
|
@@ -489,7 +495,11 @@ interface LocalDataTrack {
|
|
|
489
495
|
*
|
|
490
496
|
* The returned promise **always resolves** - never rejects - so a
|
|
491
497
|
* fire-and-forget `send()` cannot produce an unhandled rejection. Await it
|
|
492
|
-
* only when the outcome matters.
|
|
498
|
+
* only when the outcome matters. It resolves with `ok: false` at once when
|
|
499
|
+
* the track is not published to a Room, or its last Room has disconnected. A
|
|
500
|
+
* send still pending when the track's last Room disconnects or is disposed,
|
|
501
|
+
* or when its publication fails (`trackPublicationFailed`), resolves with
|
|
502
|
+
* `ok: false` then.
|
|
493
503
|
*
|
|
494
504
|
* @throws {RangeError} Synchronously, if the message exceeds 64 KB
|
|
495
505
|
* (`kMaxMessageSize`). Oversize messages are never transmitted.
|
|
@@ -500,7 +510,7 @@ interface LocalDataTrack {
|
|
|
500
510
|
/**
|
|
501
511
|
* Outcome of a {@link LocalDataTrack.send}. `ok` is `false` when the message
|
|
502
512
|
* could not be sent or queued - most often because the send buffer had no room
|
|
503
|
-
* for it.
|
|
513
|
+
* for it - or when the track is not published to a Room.
|
|
504
514
|
*/
|
|
505
515
|
interface DataTrackSendResult {
|
|
506
516
|
/** Whether the message was sent or queued for sending. */
|
|
@@ -522,6 +532,44 @@ interface VideoContentPreferences {
|
|
|
522
532
|
/** Dimensions the application intends to render this track at. */
|
|
523
533
|
renderDimensions?: VideoRenderDimensions;
|
|
524
534
|
}
|
|
535
|
+
/**
|
|
536
|
+
* Raw native shape of a remote video track. The exported `RemoteVideoTrack`
|
|
537
|
+
* class wraps this and owns the `frames()` iterator and its policy queue.
|
|
538
|
+
*/
|
|
539
|
+
interface NativeRemoteVideoTrack {
|
|
540
|
+
/** Track name, as set by the publishing participant. */
|
|
541
|
+
readonly name: string;
|
|
542
|
+
/** Always `'video'`. */
|
|
543
|
+
readonly kind: 'video';
|
|
544
|
+
/** The track's SID (`MT...`), assigned by the server when published. */
|
|
545
|
+
readonly sid: Track.SID;
|
|
546
|
+
/** Whether the publisher currently has this track enabled. */
|
|
547
|
+
readonly enabled: boolean;
|
|
548
|
+
/** Whether the SDK has switched this track off (no frames delivered) under bandwidth pressure. Tracks the `videoTrackSwitchedOff`/`videoTrackSwitchedOn` events. */
|
|
549
|
+
readonly isSwitchedOff: boolean;
|
|
550
|
+
/**
|
|
551
|
+
* Tell the server what dimensions this track will be rendered at, so it can
|
|
552
|
+
* pick a matching encoding. Takes effect only when the Room was joined with
|
|
553
|
+
* a bandwidth profile whose `contentPreferencesMode` is `'manual'`.
|
|
554
|
+
*
|
|
555
|
+
* @param preferences - The desired render dimensions.
|
|
556
|
+
*/
|
|
557
|
+
setContentPreferences(preferences: VideoContentPreferences): void;
|
|
558
|
+
}
|
|
559
|
+
/**
|
|
560
|
+
* Raw native shape of a remote audio track. The exported `RemoteAudioTrack`
|
|
561
|
+
* class wraps this.
|
|
562
|
+
*/
|
|
563
|
+
interface NativeRemoteAudioTrack {
|
|
564
|
+
/** Track name, as set by the publishing participant. */
|
|
565
|
+
readonly name: string;
|
|
566
|
+
/** Always `'audio'`. */
|
|
567
|
+
readonly kind: 'audio';
|
|
568
|
+
/** The track's SID (`MT...`), assigned by the server when published. */
|
|
569
|
+
readonly sid: Track.SID;
|
|
570
|
+
/** Whether the publisher currently has this track enabled. */
|
|
571
|
+
readonly enabled: boolean;
|
|
572
|
+
}
|
|
525
573
|
/** Width/height in pixels reported in track stats. */
|
|
526
574
|
interface StatsVideoDimensions {
|
|
527
575
|
/** Frame width in pixels. */
|
|
@@ -609,6 +657,19 @@ interface StatsReport {
|
|
|
609
657
|
type RoomState = 'connecting' | 'connected' | 'reconnecting' | 'disconnected';
|
|
610
658
|
/** Native SDK log verbosity, from `off` (silent) to `all` (most verbose). Set via {@link setLogLevel}. */
|
|
611
659
|
type LogLevel = 'off' | 'fatal' | 'error' | 'warning' | 'info' | 'debug' | 'trace' | 'all';
|
|
660
|
+
/** Options for {@link enableH264}. */
|
|
661
|
+
interface EnableH264Options {
|
|
662
|
+
/**
|
|
663
|
+
* Path to an OpenH264 2.7.x shared library. A path without a `/` is read
|
|
664
|
+
* relative to the working directory, never through the library search path.
|
|
665
|
+
*/
|
|
666
|
+
openh264Path: string;
|
|
667
|
+
/**
|
|
668
|
+
* Must be `true`. Confirms that you have obtained all patent licenses that
|
|
669
|
+
* using H.264 requires; the SDK does not provide them.
|
|
670
|
+
*/
|
|
671
|
+
confirmPatentLicensingCompliance: true;
|
|
672
|
+
}
|
|
612
673
|
/** A participant's connection state within a {@link Room}. */
|
|
613
674
|
type ParticipantState = 'connected' | 'reconnecting' | 'disconnected';
|
|
614
675
|
//#endregion
|
|
@@ -720,7 +781,11 @@ declare const MediaNoSupportedCodecError_base: TwilioErrorClass;
|
|
|
720
781
|
/**
|
|
721
782
|
* No codec the peers both support could be negotiated. Surfaced through
|
|
722
783
|
* `trackSubscriptionFailed` when a remote track cannot be decoded - notably an
|
|
723
|
-
* H.264-only track
|
|
784
|
+
* H.264-only track before {@link enableH264} has been called. Also surfaced
|
|
785
|
+
* through the local participant's `trackPublicationFailed` when a video track,
|
|
786
|
+
* from `publishTrack` or passed to `connect()`, is published to a Room whose
|
|
787
|
+
* video codecs exclude every codec this SDK can encode: VP8, plus H.264 once
|
|
788
|
+
* enabled. Code `53404`.
|
|
724
789
|
*/
|
|
725
790
|
declare class MediaNoSupportedCodecError extends MediaNoSupportedCodecError_base {}
|
|
726
791
|
declare const MediaConnectionError_base: TwilioErrorClass;
|
|
@@ -729,8 +794,8 @@ declare class MediaConnectionError extends MediaConnectionError_base {}
|
|
|
729
794
|
/**
|
|
730
795
|
* The native addon could not be loaded for this platform.
|
|
731
796
|
*
|
|
732
|
-
* Hand-written rather than generated,
|
|
733
|
-
* `cause`. The static `code` is declared so it satisfies the same
|
|
797
|
+
* Hand-written rather than generated, like {@link H264LibraryLoadError}, because
|
|
798
|
+
* it takes a `cause`. The static `code` is declared so it satisfies the same
|
|
734
799
|
* {@link TwilioErrorClass} contract as every generated subclass.
|
|
735
800
|
*/
|
|
736
801
|
declare class NativeBindingLoadError extends TwilioError {
|
|
@@ -740,8 +805,23 @@ declare class NativeBindingLoadError extends TwilioError {
|
|
|
740
805
|
cause?: unknown;
|
|
741
806
|
});
|
|
742
807
|
}
|
|
808
|
+
/**
|
|
809
|
+
* {@link enableH264} could not load the OpenH264 library: the file is missing
|
|
810
|
+
* or can't be loaded, or it isn't OpenH264 2.7.x. The message carries the
|
|
811
|
+
* dynamic loader's text, and `cause` the underlying error.
|
|
812
|
+
*/
|
|
813
|
+
declare class H264LibraryLoadError extends TwilioError {
|
|
814
|
+
/** The code every instance carries: {@link SDK_LOCAL_CODE}. */
|
|
815
|
+
static readonly code = 0;
|
|
816
|
+
constructor(message?: string, options?: {
|
|
817
|
+
cause?: unknown;
|
|
818
|
+
});
|
|
819
|
+
}
|
|
743
820
|
declare const UnsupportedPlatformError_base: TwilioErrorClass;
|
|
744
|
-
/**
|
|
821
|
+
/**
|
|
822
|
+
* The current platform, architecture, or Node version is not supported, or the
|
|
823
|
+
* SDK was imported in a `worker_thread`.
|
|
824
|
+
*/
|
|
745
825
|
declare class UnsupportedPlatformError extends UnsupportedPlatformError_base {}
|
|
746
826
|
declare const RoomConnectTimeoutError_base: TwilioErrorClass;
|
|
747
827
|
/** {@link connect} did not settle within `connectionTimeout`. */
|
|
@@ -826,7 +906,7 @@ type RemoteMediaTrackEvents = {
|
|
|
826
906
|
frameDropped: (count: number, sinceLastUs: number) => void;
|
|
827
907
|
};
|
|
828
908
|
/** Shared frames()/getStats() plumbing for the two media track kinds. */
|
|
829
|
-
declare abstract class RemoteMediaTrack<N extends NativeRemoteVideoTrack
|
|
909
|
+
declare abstract class RemoteMediaTrack<N extends NativeRemoteVideoTrack | NativeRemoteAudioTrack, F extends {
|
|
830
910
|
timestamp: number;
|
|
831
911
|
}> extends TypedEventEmitter<RemoteMediaTrackEvents> {
|
|
832
912
|
private stream;
|
|
@@ -862,7 +942,7 @@ declare abstract class RemoteMediaTrack<N extends NativeRemoteVideoTrack$1 | Nat
|
|
|
862
942
|
getStats(): DeliveryStats;
|
|
863
943
|
}
|
|
864
944
|
/** A remote participant's video track. Read frames with {@link RemoteVideoTrack.frames}. */
|
|
865
|
-
declare class RemoteVideoTrack extends RemoteMediaTrack<NativeRemoteVideoTrack
|
|
945
|
+
declare class RemoteVideoTrack extends RemoteMediaTrack<NativeRemoteVideoTrack, VideoFrame> {
|
|
866
946
|
/** Discriminant for narrowing a {@link RemoteTrack} union. */
|
|
867
947
|
readonly kind: "video";
|
|
868
948
|
protected readonly frameKind: "video";
|
|
@@ -876,7 +956,7 @@ declare class RemoteVideoTrack extends RemoteMediaTrack<NativeRemoteVideoTrack$1
|
|
|
876
956
|
setContentPreferences(preferences: VideoContentPreferences): void;
|
|
877
957
|
}
|
|
878
958
|
/** A remote participant's audio track. Read frames with {@link RemoteAudioTrack.frames}. */
|
|
879
|
-
declare class RemoteAudioTrack extends RemoteMediaTrack<NativeRemoteAudioTrack
|
|
959
|
+
declare class RemoteAudioTrack extends RemoteMediaTrack<NativeRemoteAudioTrack, AudioFrame> {
|
|
880
960
|
/** Discriminant for narrowing a {@link RemoteTrack} union. */
|
|
881
961
|
readonly kind: "audio";
|
|
882
962
|
protected readonly frameKind: "audio";
|
|
@@ -1064,6 +1144,11 @@ type LocalParticipantEvents = {
|
|
|
1064
1144
|
* Publishing a local track failed. The track is not published, and remote
|
|
1065
1145
|
* participants never see it.
|
|
1066
1146
|
*
|
|
1147
|
+
* Also emitted, just after `connect()` resolves, for a track passed to
|
|
1148
|
+
* {@link connect} that the Room rejected. Attach the listener right after
|
|
1149
|
+
* `await connect()`, before awaiting anything else, to receive it; it is not
|
|
1150
|
+
* replayed. The track's name is then free to reuse.
|
|
1151
|
+
*
|
|
1067
1152
|
* @param error - Why publishing failed.
|
|
1068
1153
|
* @param localTrack - The track that failed to publish, or `undefined` if the
|
|
1069
1154
|
* failure could not be attributed to a track this participant still holds.
|
|
@@ -1086,6 +1171,7 @@ type LocalParticipantEvents = {
|
|
|
1086
1171
|
*/
|
|
1087
1172
|
declare class LocalParticipant extends TypedEventEmitter<LocalParticipantEvents> {
|
|
1088
1173
|
private _publishedTracks;
|
|
1174
|
+
private _dataTracks;
|
|
1089
1175
|
private _unpublishFn;
|
|
1090
1176
|
/** This participant's identity, taken from the `identity` grant in the access token. */
|
|
1091
1177
|
get identity(): Participant.Identity;
|
|
@@ -1173,10 +1259,12 @@ type RemoteParticipantEvents = {
|
|
|
1173
1259
|
* One of this participant's tracks was subscribed to and is now delivering
|
|
1174
1260
|
* media or messages.
|
|
1175
1261
|
*
|
|
1176
|
-
*
|
|
1177
|
-
*
|
|
1178
|
-
*
|
|
1179
|
-
*
|
|
1262
|
+
* Subscription can complete before the caller attaches a listener: for a
|
|
1263
|
+
* participant already publishing when the caller joined, often before
|
|
1264
|
+
* {@link connect} resolves. Subscriptions that completed before the listener
|
|
1265
|
+
* was attached are not replayed; they appear in
|
|
1266
|
+
* {@link RemoteParticipant.tracks} with `isSubscribed` set to `true`, so read
|
|
1267
|
+
* that state as well as listening for this event.
|
|
1180
1268
|
*
|
|
1181
1269
|
* @param track - The subscribed track.
|
|
1182
1270
|
* @param publication - The publication the track was subscribed from.
|
|
@@ -1364,10 +1452,11 @@ type RoomEvents = {
|
|
|
1364
1452
|
/**
|
|
1365
1453
|
* A remote track was subscribed to and is now delivering media or messages.
|
|
1366
1454
|
*
|
|
1367
|
-
*
|
|
1368
|
-
*
|
|
1369
|
-
*
|
|
1370
|
-
* `
|
|
1455
|
+
* For a participant who was already publishing, subscription can complete
|
|
1456
|
+
* before {@link connect} resolves or before the caller attaches a listener.
|
|
1457
|
+
* Subscriptions that completed before the listener was attached are not
|
|
1458
|
+
* replayed; they appear in `participant.tracks` with `isSubscribed` set to
|
|
1459
|
+
* `true`, so read that state as well as listening for this event.
|
|
1371
1460
|
*
|
|
1372
1461
|
* @param track - The subscribed track.
|
|
1373
1462
|
* @param publication - The publication the track was subscribed from.
|
|
@@ -1449,6 +1538,7 @@ declare class Room extends TypedEventEmitter<RoomEvents> {
|
|
|
1449
1538
|
private _localParticipant;
|
|
1450
1539
|
private _remoteParticipantCache;
|
|
1451
1540
|
private _seededTracks;
|
|
1541
|
+
private _dataTracks;
|
|
1452
1542
|
/** The name passed to {@link connect}, or the Room SID if no name was given. */
|
|
1453
1543
|
get name(): string;
|
|
1454
1544
|
/** This Room's SID (`RM...`), unique per room instance. */
|
|
@@ -1465,7 +1555,7 @@ declare class Room extends TypedEventEmitter<RoomEvents> {
|
|
|
1465
1555
|
* detection enabled. Updated by the `dominantSpeakerChanged` event.
|
|
1466
1556
|
*/
|
|
1467
1557
|
get dominantSpeaker(): RemoteParticipant | null;
|
|
1468
|
-
/** The {@link LocalParticipant} representing this client.
|
|
1558
|
+
/** The {@link LocalParticipant} representing this client. Created when the Room connects, or on first access if sooner, and cached. */
|
|
1469
1559
|
get localParticipant(): LocalParticipant;
|
|
1470
1560
|
/**
|
|
1471
1561
|
* The remote participants currently connected, keyed by Participant SID
|
|
@@ -1492,6 +1582,13 @@ declare class Room extends TypedEventEmitter<RoomEvents> {
|
|
|
1492
1582
|
* participant wrappers, and event listeners. The Room is unusable afterward.
|
|
1493
1583
|
*/
|
|
1494
1584
|
dispose(): void;
|
|
1585
|
+
/**
|
|
1586
|
+
* Detaches this Room's data tracks, stops counting any published later, and
|
|
1587
|
+
* settles the sends of any now in no Room. The engine reports sends only
|
|
1588
|
+
* through a Room, so they would otherwise never settle and would hold the
|
|
1589
|
+
* process open.
|
|
1590
|
+
*/
|
|
1591
|
+
private _releaseDataTracks;
|
|
1495
1592
|
/**
|
|
1496
1593
|
* Wraps every participant already in the Room, so their track events are
|
|
1497
1594
|
* observable from the moment the Room connects.
|
|
@@ -1528,6 +1625,8 @@ declare const MAX_QUEUE_CEILING = 1024;
|
|
|
1528
1625
|
* @param options - Room name, tracks to publish on join, and feature toggles.
|
|
1529
1626
|
* @returns A promise resolving to the connected {@link Room}.
|
|
1530
1627
|
* @throws {TypeError} (as a rejection) If `token` is not a non-empty string, or `options` is not an object.
|
|
1628
|
+
* @throws {TypeError} (as a rejection) If `options.preferredVideoCodecs` includes `H264` and
|
|
1629
|
+
* {@link enableH264} hasn't succeeded.
|
|
1531
1630
|
* @throws {RangeError} (as a rejection) If `options.networkQuality` verbosities are out of range.
|
|
1532
1631
|
*
|
|
1533
1632
|
* @example
|
|
@@ -1658,7 +1757,7 @@ declare const ErrorCode: Readonly<{
|
|
|
1658
1757
|
readonly MEDIA_NO_SUPPORTED_CODEC: 53404; /** The media connection failed, or media activity ceased. */
|
|
1659
1758
|
readonly MEDIA_CONNECTION_ERROR: 53405;
|
|
1660
1759
|
}>;
|
|
1661
|
-
/** The version of
|
|
1760
|
+
/** The version of this package, such as `1.0.0`. */
|
|
1662
1761
|
declare function getVersion(): string;
|
|
1663
1762
|
/**
|
|
1664
1763
|
* Set the verbosity of the native SDK's logging. Process-global and effective
|
|
@@ -1667,5 +1766,28 @@ declare function getVersion(): string;
|
|
|
1667
1766
|
* @param level - A {@link LogLevel} name or its equivalent native numeric level.
|
|
1668
1767
|
*/
|
|
1669
1768
|
declare function setLogLevel(level: LogLevel | number): void;
|
|
1769
|
+
/**
|
|
1770
|
+
* Load an OpenH264 2.7.x library so Rooms can negotiate H.264. Process-wide.
|
|
1771
|
+
*
|
|
1772
|
+
* Call it before the first {@link connect} or `createLocal*Track()` call: the
|
|
1773
|
+
* media factory those create reads the library once, so a later call throws.
|
|
1774
|
+
* Once enabled, H.264 is offered after VP8, and `preferredVideoCodecs` may
|
|
1775
|
+
* name `H264`. It stays enabled for the life of the process. Calling it again
|
|
1776
|
+
* before the first connect or track loads the given library instead.
|
|
1777
|
+
*
|
|
1778
|
+
* A frame larger than 1280x720 (3600 macroblocks) is scaled down to fit H.264
|
|
1779
|
+
* level 3.1, keeping its aspect ratio.
|
|
1780
|
+
*
|
|
1781
|
+
* Every successful call writes a patent-licensing notice with `console.warn`.
|
|
1782
|
+
*
|
|
1783
|
+
* @param options - The library path, and the required licensing confirmation.
|
|
1784
|
+
* @throws {TypeError} If `confirmPatentLicensingCompliance` isn't `true`, or
|
|
1785
|
+
* `openh264Path` isn't a non-empty string without NUL characters. Nothing is loaded.
|
|
1786
|
+
* @throws {Error} If called after the first connect() or createLocal*Track().
|
|
1787
|
+
* @throws {H264LibraryLoadError} If the library can't be loaded or isn't OpenH264 2.7.x.
|
|
1788
|
+
*/
|
|
1789
|
+
declare function enableH264(options: EnableH264Options): void;
|
|
1790
|
+
/** Whether an {@link enableH264} call has succeeded in this process. */
|
|
1791
|
+
declare function isH264Enabled(): boolean;
|
|
1670
1792
|
//#endregion
|
|
1671
|
-
export { AccessTokenExpiredError, AccessTokenGrantsInvalidError, AccessTokenHeaderInvalidError, AccessTokenInvalidError, AccessTokenIssuerInvalidError, AccessTokenNotYetValidError, AccessTokenSignatureInvalidError, type AudioCodec, type AudioFrame, type AudioFrameInput, type AudioTrackOptions, type BackpressureMode, type BandwidthProfileMode, type BandwidthProfileOptions, type ClientTrackSwitchOffControl, type ConnectOptions, type CreateLocalAudioTrackOptions, type CreateLocalTracksOptions, type CreateLocalVideoTrackOptions, DataTrackSendError, type DataTrackSendResult, type DeliveryStats, type EncodingParameters, ErrorCode, type FrameDeliveryOptions, type I420Plane, type IceOptions, type IceServer, type LocalAudioTrack, LocalAudioTrackPublication, type LocalAudioTrackStats, type LocalDataTrack, type LocalDataTrackOptions, LocalDataTrackPublication, LocalParticipant, type LocalParticipantEvents, type LocalTrack, LocalTrackPublication, type LocalTrackStats, type LocalVideoTrack, LocalVideoTrackPublication, type LocalVideoTrackStats, type LogLevel, MAX_QUEUE_CEILING, MediaClientLocalDescFailedError, MediaClientRemoteDescFailedError, MediaConnectionError, MediaNoSupportedCodecError, MediaServerLocalDescFailedError, MediaServerRemoteDescFailedError, NativeBindingLoadError, type NetworkQualityConfiguration, type NetworkQualityVerbosity, type Participant, ParticipantDuplicateIdentityError, ParticipantMaxTracksExceededError, type ParticipantState, type RawAudioSourceOptions, type RawVideoSourceOptions, RemoteAudioTrack, RemoteAudioTrackPublication, type RemoteAudioTrackStats, RemoteDataTrack, type RemoteDataTrackEvents, RemoteDataTrackPublication, type RemoteMediaTrackEvents, RemoteParticipant, type RemoteParticipantEvents, type RemoteTrack, RemoteTrackPublication, type RemoteTrackStats, RemoteVideoTrack, RemoteVideoTrackPublication, type RemoteVideoTrackStats, Room, RoomCompletedError, RoomConnectFailedError, RoomConnectTimeoutError, type RoomEvents, RoomMaxParticipantsExceededError, RoomNotFoundError, type RoomState, SDK_LOCAL_CODE, SignalingConnectionDisconnectedError, SignalingConnectionError, SignalingConnectionTimeoutError, type StatsReport, type StatsVideoDimensions, type Track, TrackInvalidError, type TrackKind, TrackNameCharsInvalidError, TrackNameInvalidError, TrackNameTooLongError, TrackPublication, type TrackStats, type TrackSwitchOffMode, TwilioError, type TwilioErrorClass, TypedEventEmitter, UnsupportedPlatformError, type VideoBandwidthProfileOptions, type VideoCodec, type VideoContentPreferences, type VideoContentPreferencesMode, type VideoEncodingMode, type VideoFrame, type VideoFrameInput, type VideoRenderDimensions, type VideoTrackOptions, type WriteStats, connect, createLocalAudioTrack, createLocalDataTrack, createLocalTracks, createLocalVideoTrack, getVersion, setLogLevel, twilioErrorFromCode };
|
|
1793
|
+
export { AccessTokenExpiredError, AccessTokenGrantsInvalidError, AccessTokenHeaderInvalidError, AccessTokenInvalidError, AccessTokenIssuerInvalidError, AccessTokenNotYetValidError, AccessTokenSignatureInvalidError, type AudioCodec, type AudioFrame, type AudioFrameInput, type AudioTrackOptions, type BackpressureMode, type BandwidthProfileMode, type BandwidthProfileOptions, type ClientTrackSwitchOffControl, type ConnectOptions, type CreateLocalAudioTrackOptions, type CreateLocalTracksOptions, type CreateLocalVideoTrackOptions, DataTrackSendError, type DataTrackSendResult, type DeliveryStats, type EnableH264Options, type EncodingParameters, ErrorCode, type FrameDeliveryOptions, H264LibraryLoadError, type I420Plane, type IceOptions, type IceServer, type LocalAudioTrack, LocalAudioTrackPublication, type LocalAudioTrackStats, type LocalDataTrack, type LocalDataTrackOptions, LocalDataTrackPublication, LocalParticipant, type LocalParticipantEvents, type LocalTrack, LocalTrackPublication, type LocalTrackStats, type LocalVideoTrack, LocalVideoTrackPublication, type LocalVideoTrackStats, type LogLevel, MAX_QUEUE_CEILING, MediaClientLocalDescFailedError, MediaClientRemoteDescFailedError, MediaConnectionError, MediaNoSupportedCodecError, MediaServerLocalDescFailedError, MediaServerRemoteDescFailedError, NativeBindingLoadError, type NetworkQualityConfiguration, type NetworkQualityVerbosity, type Participant, ParticipantDuplicateIdentityError, ParticipantMaxTracksExceededError, type ParticipantState, type RawAudioSourceOptions, type RawVideoSourceOptions, RemoteAudioTrack, RemoteAudioTrackPublication, type RemoteAudioTrackStats, RemoteDataTrack, type RemoteDataTrackEvents, RemoteDataTrackPublication, type RemoteMediaTrackEvents, RemoteParticipant, type RemoteParticipantEvents, type RemoteTrack, RemoteTrackPublication, type RemoteTrackStats, RemoteVideoTrack, RemoteVideoTrackPublication, type RemoteVideoTrackStats, Room, RoomCompletedError, RoomConnectFailedError, RoomConnectTimeoutError, type RoomEvents, RoomMaxParticipantsExceededError, RoomNotFoundError, type RoomState, SDK_LOCAL_CODE, SignalingConnectionDisconnectedError, SignalingConnectionError, SignalingConnectionTimeoutError, type StatsReport, type StatsVideoDimensions, type Track, TrackInvalidError, type TrackKind, TrackNameCharsInvalidError, TrackNameInvalidError, TrackNameTooLongError, TrackPublication, type TrackStats, type TrackSwitchOffMode, TwilioError, type TwilioErrorClass, TypedEventEmitter, UnsupportedPlatformError, type VideoBandwidthProfileOptions, type VideoCodec, type VideoContentPreferences, type VideoContentPreferencesMode, type VideoEncodingMode, type VideoFrame, type VideoFrameInput, type VideoRenderDimensions, type VideoTrackOptions, type WriteStats, connect, createLocalAudioTrack, createLocalDataTrack, createLocalTracks, createLocalVideoTrack, enableH264, getVersion, isH264Enabled, setLogLevel, twilioErrorFromCode };
|