livekit-client 0.14.2 → 0.15.2
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/.github/workflows/{lint.yaml → test.yaml} +7 -4
- package/.gitmodules +3 -0
- package/README.md +46 -14
- package/dist/api/SignalClient.d.ts +7 -32
- package/dist/api/SignalClient.js +37 -8
- package/dist/api/SignalClient.js.map +1 -1
- package/dist/connect.d.ts +1 -1
- package/dist/connect.js +71 -73
- package/dist/connect.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/dist/logger.d.ts +10 -0
- package/dist/logger.js +15 -0
- package/dist/logger.js.map +1 -1
- package/dist/options.d.ts +83 -19
- package/dist/options.js +0 -10
- package/dist/options.js.map +1 -1
- package/dist/proto/livekit_models.d.ts +42 -1
- package/dist/proto/livekit_models.js +292 -4
- package/dist/proto/livekit_models.js.map +1 -1
- package/dist/proto/livekit_rtc.d.ts +115 -7
- package/dist/proto/livekit_rtc.js +810 -30
- package/dist/proto/livekit_rtc.js.map +1 -1
- package/dist/room/RTCEngine.d.ts +4 -2
- package/dist/room/RTCEngine.js +31 -35
- package/dist/room/RTCEngine.js.map +1 -1
- package/dist/room/Room.d.ts +16 -17
- package/dist/room/Room.js +125 -77
- package/dist/room/Room.js.map +1 -1
- package/dist/room/events.d.ts +115 -6
- package/dist/room/events.js +114 -5
- package/dist/room/events.js.map +1 -1
- package/dist/room/participant/LocalParticipant.d.ts +29 -11
- package/dist/room/participant/LocalParticipant.js +209 -160
- package/dist/room/participant/LocalParticipant.js.map +1 -1
- package/dist/room/participant/Participant.d.ts +2 -0
- package/dist/room/participant/Participant.js +3 -1
- package/dist/room/participant/Participant.js.map +1 -1
- package/dist/room/participant/RemoteParticipant.d.ts +1 -1
- package/dist/room/participant/RemoteParticipant.js +6 -5
- package/dist/room/participant/RemoteParticipant.js.map +1 -1
- package/dist/room/participant/publishUtils.d.ts +11 -0
- package/dist/room/participant/publishUtils.js +148 -0
- package/dist/room/participant/publishUtils.js.map +1 -0
- package/dist/room/participant/publishUtils.test.d.ts +1 -0
- package/dist/room/participant/publishUtils.test.js +79 -0
- package/dist/room/participant/publishUtils.test.js.map +1 -0
- package/dist/room/stats.d.ts +21 -6
- package/dist/room/stats.js +22 -1
- package/dist/room/stats.js.map +1 -1
- package/dist/room/track/LocalAudioTrack.d.ts +8 -3
- package/dist/room/track/LocalAudioTrack.js +49 -3
- package/dist/room/track/LocalAudioTrack.js.map +1 -1
- package/dist/room/track/LocalTrack.d.ts +4 -3
- package/dist/room/track/LocalTrack.js +6 -48
- package/dist/room/track/LocalTrack.js.map +1 -1
- package/dist/room/track/LocalVideoTrack.d.ts +14 -5
- package/dist/room/track/LocalVideoTrack.js +154 -62
- package/dist/room/track/LocalVideoTrack.js.map +1 -1
- package/dist/room/track/LocalVideoTrack.test.d.ts +1 -0
- package/dist/room/track/LocalVideoTrack.test.js +68 -0
- package/dist/room/track/LocalVideoTrack.test.js.map +1 -0
- package/dist/room/track/RemoteAudioTrack.d.ts +7 -0
- package/dist/room/track/RemoteAudioTrack.js +61 -0
- package/dist/room/track/RemoteAudioTrack.js.map +1 -1
- package/dist/room/track/RemoteTrackPublication.d.ts +2 -3
- package/dist/room/track/RemoteTrackPublication.js +12 -10
- package/dist/room/track/RemoteTrackPublication.js.map +1 -1
- package/dist/room/track/RemoteVideoTrack.d.ts +10 -6
- package/dist/room/track/RemoteVideoTrack.js +97 -44
- package/dist/room/track/RemoteVideoTrack.js.map +1 -1
- package/dist/room/track/Track.d.ts +10 -2
- package/dist/room/track/Track.js +29 -2
- package/dist/room/track/Track.js.map +1 -1
- package/dist/room/track/TrackPublication.d.ts +2 -0
- package/dist/room/track/TrackPublication.js +1 -0
- package/dist/room/track/TrackPublication.js.map +1 -1
- package/dist/room/track/create.d.ts +4 -6
- package/dist/room/track/create.js +10 -57
- package/dist/room/track/create.js.map +1 -1
- package/dist/room/track/defaults.d.ts +4 -0
- package/dist/room/track/defaults.js +21 -0
- package/dist/room/track/defaults.js.map +1 -0
- package/dist/room/track/options.d.ts +15 -65
- package/dist/room/track/options.js +14 -13
- package/dist/room/track/options.js.map +1 -1
- package/dist/room/track/utils.d.ts +3 -0
- package/dist/room/track/utils.js +68 -0
- package/dist/room/track/utils.js.map +1 -0
- package/dist/room/track/utils.test.d.ts +1 -0
- package/dist/room/track/utils.test.js +85 -0
- package/dist/room/track/utils.test.js.map +1 -0
- package/dist/room/utils.d.ts +7 -1
- package/dist/room/utils.js +29 -6
- package/dist/room/utils.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/example/index.html +194 -178
- package/example/sample.ts +454 -325
- package/example/styles.css +144 -0
- package/example/webpack.config.js +1 -1
- package/jest.config.js +6 -0
- package/package.json +9 -6
- package/tsconfig.eslint.json +8 -1
- package/dist/room/defaults.d.ts +0 -5
- package/dist/room/defaults.js +0 -32
- package/dist/room/defaults.js.map +0 -1
package/dist/options.d.ts
CHANGED
@@ -1,4 +1,59 @@
|
|
1
|
-
import {
|
1
|
+
import { LogLevel, LogLevelDesc } from './logger';
|
2
|
+
import { AudioCaptureOptions, CreateLocalTracksOptions, TrackPublishDefaults, VideoCaptureOptions } from './room/track/options';
|
3
|
+
/**
|
4
|
+
* Options for when creating a new room
|
5
|
+
*/
|
6
|
+
export interface RoomOptions {
|
7
|
+
/**
|
8
|
+
* AdaptiveStream lets LiveKit automatically manage quality of subscribed
|
9
|
+
* video tracks to optimize for bandwidth and CPU.
|
10
|
+
* When attached video elements are visible, it'll choose an appropriate
|
11
|
+
* resolution based on the size of largest video element it's attached to.
|
12
|
+
*
|
13
|
+
* When none of the video elements are visible, it'll temporarily pause
|
14
|
+
* the data flow until they are visible again.
|
15
|
+
*/
|
16
|
+
adaptiveStream?: boolean;
|
17
|
+
/**
|
18
|
+
* enable Dynacast, off by default. With Dynacast dynamically pauses
|
19
|
+
* video layers that are not being consumed by any subscribers, significantly
|
20
|
+
* reducing publishing CPU and bandwidth usage.
|
21
|
+
*/
|
22
|
+
dynacast?: boolean;
|
23
|
+
/**
|
24
|
+
* default options to use when capturing user's audio
|
25
|
+
*/
|
26
|
+
audioCaptureDefaults?: AudioCaptureOptions;
|
27
|
+
/**
|
28
|
+
* default options to use when capturing user's video
|
29
|
+
*/
|
30
|
+
videoCaptureDefaults?: VideoCaptureOptions;
|
31
|
+
/**
|
32
|
+
* default options to use when publishing tracks
|
33
|
+
*/
|
34
|
+
publishDefaults?: TrackPublishDefaults;
|
35
|
+
/**
|
36
|
+
* should local tracks be stopped when they are unpublished. defaults to true
|
37
|
+
* set this to false if you would prefer to clean up unpublished local tracks manually.
|
38
|
+
*/
|
39
|
+
stopLocalTrackOnUnpublish?: boolean;
|
40
|
+
/**
|
41
|
+
* @internal
|
42
|
+
* experimental flag, disable client managed layer pause when publishing capability is limited
|
43
|
+
*/
|
44
|
+
expDisableLayerPause?: boolean;
|
45
|
+
}
|
46
|
+
/**
|
47
|
+
* Options for Room.connect()
|
48
|
+
*/
|
49
|
+
export interface RoomConnectOptions {
|
50
|
+
/** autosubscribe to room tracks after joining, defaults to true */
|
51
|
+
autoSubscribe?: boolean;
|
52
|
+
/**
|
53
|
+
* use to override any RTCConfiguration options.
|
54
|
+
*/
|
55
|
+
rtcConfig?: RTCConfiguration;
|
56
|
+
}
|
2
57
|
/**
|
3
58
|
* if video or audio tracks are created as part of [[connect]], it'll automatically
|
4
59
|
* publish those tracks to the room.
|
@@ -7,17 +62,20 @@ export interface ConnectOptions extends CreateLocalTracksOptions {
|
|
7
62
|
/** autosubscribe to room tracks upon connect, defaults to true */
|
8
63
|
autoSubscribe?: boolean;
|
9
64
|
/**
|
10
|
-
*
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
*
|
15
|
-
*
|
16
|
-
*
|
65
|
+
* see [[RoomOptions.adaptiveStream]]
|
66
|
+
*/
|
67
|
+
adaptiveStream?: boolean;
|
68
|
+
/**
|
69
|
+
* alias for adaptiveStream
|
70
|
+
* @deprecated
|
17
71
|
*/
|
18
72
|
autoManageVideo?: boolean;
|
73
|
+
/**
|
74
|
+
* see [[RoomOptions.dynacast]]
|
75
|
+
*/
|
76
|
+
dynacast?: boolean;
|
19
77
|
/** configures LiveKit internal log level */
|
20
|
-
logLevel?: LogLevel;
|
78
|
+
logLevel?: LogLevel | LogLevelDesc;
|
21
79
|
/**
|
22
80
|
* set ICE servers. When deployed correctly, LiveKit automatically uses the built-in TURN servers
|
23
81
|
*/
|
@@ -39,19 +97,25 @@ export interface ConnectOptions extends CreateLocalTracksOptions {
|
|
39
97
|
*/
|
40
98
|
video?: boolean;
|
41
99
|
/**
|
42
|
-
* default options to use when capturing user
|
100
|
+
* default options to use when capturing user's audio
|
101
|
+
*/
|
102
|
+
audioCaptureDefaults?: AudioCaptureOptions;
|
103
|
+
/**
|
104
|
+
* default options to use when capturing user's video
|
43
105
|
*/
|
44
|
-
|
106
|
+
videoCaptureDefaults?: VideoCaptureOptions;
|
45
107
|
/**
|
46
108
|
* default options to use when publishing tracks
|
47
109
|
*/
|
48
110
|
publishDefaults?: TrackPublishDefaults;
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
111
|
+
/**
|
112
|
+
* should local tracks be stopped when they are unpublished. defaults to true
|
113
|
+
* set this to false if you would prefer to clean up unpublished local tracks manually.
|
114
|
+
*/
|
115
|
+
stopLocalTrackOnUnpublish?: boolean;
|
116
|
+
/**
|
117
|
+
* @internal
|
118
|
+
* experimental flag, disable client managed layer pause when publishing capability is limited
|
119
|
+
*/
|
120
|
+
expDisableLayerPause?: boolean;
|
57
121
|
}
|
package/dist/options.js
CHANGED
@@ -1,13 +1,3 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.LogLevel = void 0;
|
4
|
-
var LogLevel;
|
5
|
-
(function (LogLevel) {
|
6
|
-
LogLevel["trace"] = "trace";
|
7
|
-
LogLevel["debug"] = "debug";
|
8
|
-
LogLevel["info"] = "info";
|
9
|
-
LogLevel["warn"] = "warn";
|
10
|
-
LogLevel["error"] = "error";
|
11
|
-
LogLevel["silent"] = "silent";
|
12
|
-
})(LogLevel = exports.LogLevel || (exports.LogLevel = {}));
|
13
3
|
//# sourceMappingURL=options.js.map
|
package/dist/options.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"options.js","sourceRoot":"","sources":["../src/options.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"options.js","sourceRoot":"","sources":["../src/options.ts"],"names":[],"mappings":""}
|
@@ -18,6 +18,14 @@ export declare enum TrackSource {
|
|
18
18
|
}
|
19
19
|
export declare function trackSourceFromJSON(object: any): TrackSource;
|
20
20
|
export declare function trackSourceToJSON(object: TrackSource): string;
|
21
|
+
export declare enum VideoQuality {
|
22
|
+
LOW = 0,
|
23
|
+
MEDIUM = 1,
|
24
|
+
HIGH = 2,
|
25
|
+
UNRECOGNIZED = -1
|
26
|
+
}
|
27
|
+
export declare function videoQualityFromJSON(object: any): VideoQuality;
|
28
|
+
export declare function videoQualityToJSON(object: VideoQuality): string;
|
21
29
|
export declare enum ConnectionQuality {
|
22
30
|
POOR = 0,
|
23
31
|
GOOD = 1,
|
@@ -36,6 +44,7 @@ export interface Room {
|
|
36
44
|
enabledCodecs: Codec[];
|
37
45
|
metadata: string;
|
38
46
|
numParticipants: number;
|
47
|
+
activeRecording: boolean;
|
39
48
|
}
|
40
49
|
export interface Codec {
|
41
50
|
mime: string;
|
@@ -49,8 +58,9 @@ export interface ParticipantInfo {
|
|
49
58
|
metadata: string;
|
50
59
|
/** timestamp when participant joined room, in seconds */
|
51
60
|
joinedAt: number;
|
52
|
-
/** hidden participant (used for recording) */
|
53
61
|
hidden: boolean;
|
62
|
+
recorder: boolean;
|
63
|
+
name: string;
|
54
64
|
}
|
55
65
|
export declare enum ParticipantInfo_State {
|
56
66
|
/** JOINING - websocket' connected, but not offered yet */
|
@@ -83,6 +93,18 @@ export interface TrackInfo {
|
|
83
93
|
disableDtx: boolean;
|
84
94
|
/** source of media */
|
85
95
|
source: TrackSource;
|
96
|
+
layers: VideoLayer[];
|
97
|
+
/** mime type of codec */
|
98
|
+
mimeType: string;
|
99
|
+
}
|
100
|
+
/** provide information about available spatial layers */
|
101
|
+
export interface VideoLayer {
|
102
|
+
/** for tracks with a single layer, this should be HIGH */
|
103
|
+
quality: VideoQuality;
|
104
|
+
width: number;
|
105
|
+
height: number;
|
106
|
+
/** target bitrate, server will measure actual */
|
107
|
+
bitrate: number;
|
86
108
|
}
|
87
109
|
/** new DataPacket API */
|
88
110
|
export interface DataPacket {
|
@@ -115,6 +137,11 @@ export interface UserPacket {
|
|
115
137
|
/** the ID of the participants who will receive the message (the message will be sent to all the people in the room if this variable is empty) */
|
116
138
|
destinationSids: string[];
|
117
139
|
}
|
140
|
+
export interface ParticipantTracks {
|
141
|
+
/** participant ID of participant to whom the tracks belong */
|
142
|
+
participantSid: string;
|
143
|
+
trackSids: string[];
|
144
|
+
}
|
118
145
|
export declare const Room: {
|
119
146
|
encode(message: Room, writer?: _m0.Writer): _m0.Writer;
|
120
147
|
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): Room;
|
@@ -143,6 +170,13 @@ export declare const TrackInfo: {
|
|
143
170
|
toJSON(message: TrackInfo): unknown;
|
144
171
|
fromPartial(object: DeepPartial<TrackInfo>): TrackInfo;
|
145
172
|
};
|
173
|
+
export declare const VideoLayer: {
|
174
|
+
encode(message: VideoLayer, writer?: _m0.Writer): _m0.Writer;
|
175
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): VideoLayer;
|
176
|
+
fromJSON(object: any): VideoLayer;
|
177
|
+
toJSON(message: VideoLayer): unknown;
|
178
|
+
fromPartial(object: DeepPartial<VideoLayer>): VideoLayer;
|
179
|
+
};
|
146
180
|
export declare const DataPacket: {
|
147
181
|
encode(message: DataPacket, writer?: _m0.Writer): _m0.Writer;
|
148
182
|
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): DataPacket;
|
@@ -171,6 +205,13 @@ export declare const UserPacket: {
|
|
171
205
|
toJSON(message: UserPacket): unknown;
|
172
206
|
fromPartial(object: DeepPartial<UserPacket>): UserPacket;
|
173
207
|
};
|
208
|
+
export declare const ParticipantTracks: {
|
209
|
+
encode(message: ParticipantTracks, writer?: _m0.Writer): _m0.Writer;
|
210
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): ParticipantTracks;
|
211
|
+
fromJSON(object: any): ParticipantTracks;
|
212
|
+
toJSON(message: ParticipantTracks): unknown;
|
213
|
+
fromPartial(object: DeepPartial<ParticipantTracks>): ParticipantTracks;
|
214
|
+
};
|
174
215
|
declare type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
175
216
|
export declare type DeepPartial<T> = T extends Builtin ? T : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
|
176
217
|
[K in keyof T]?: DeepPartial<T[K]>;
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
4
|
};
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
exports.UserPacket = exports.SpeakerInfo = exports.ActiveSpeakerUpdate = exports.DataPacket = exports.TrackInfo = exports.ParticipantInfo = exports.Codec = exports.Room = exports.dataPacket_KindToJSON = exports.dataPacket_KindFromJSON = exports.DataPacket_Kind = exports.participantInfo_StateToJSON = exports.participantInfo_StateFromJSON = exports.ParticipantInfo_State = exports.connectionQualityToJSON = exports.connectionQualityFromJSON = exports.ConnectionQuality = exports.trackSourceToJSON = exports.trackSourceFromJSON = exports.TrackSource = exports.trackTypeToJSON = exports.trackTypeFromJSON = exports.TrackType = exports.protobufPackage = void 0;
|
6
|
+
exports.ParticipantTracks = exports.UserPacket = exports.SpeakerInfo = exports.ActiveSpeakerUpdate = exports.DataPacket = exports.VideoLayer = exports.TrackInfo = exports.ParticipantInfo = exports.Codec = exports.Room = exports.dataPacket_KindToJSON = exports.dataPacket_KindFromJSON = exports.DataPacket_Kind = exports.participantInfo_StateToJSON = exports.participantInfo_StateFromJSON = exports.ParticipantInfo_State = exports.connectionQualityToJSON = exports.connectionQualityFromJSON = exports.ConnectionQuality = exports.videoQualityToJSON = exports.videoQualityFromJSON = exports.VideoQuality = exports.trackSourceToJSON = exports.trackSourceFromJSON = exports.TrackSource = exports.trackTypeToJSON = exports.trackTypeFromJSON = exports.TrackType = exports.protobufPackage = void 0;
|
7
7
|
/* eslint-disable */
|
8
8
|
const long_1 = __importDefault(require("long"));
|
9
9
|
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
@@ -96,6 +96,44 @@ function trackSourceToJSON(object) {
|
|
96
96
|
}
|
97
97
|
}
|
98
98
|
exports.trackSourceToJSON = trackSourceToJSON;
|
99
|
+
var VideoQuality;
|
100
|
+
(function (VideoQuality) {
|
101
|
+
VideoQuality[VideoQuality["LOW"] = 0] = "LOW";
|
102
|
+
VideoQuality[VideoQuality["MEDIUM"] = 1] = "MEDIUM";
|
103
|
+
VideoQuality[VideoQuality["HIGH"] = 2] = "HIGH";
|
104
|
+
VideoQuality[VideoQuality["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
105
|
+
})(VideoQuality = exports.VideoQuality || (exports.VideoQuality = {}));
|
106
|
+
function videoQualityFromJSON(object) {
|
107
|
+
switch (object) {
|
108
|
+
case 0:
|
109
|
+
case "LOW":
|
110
|
+
return VideoQuality.LOW;
|
111
|
+
case 1:
|
112
|
+
case "MEDIUM":
|
113
|
+
return VideoQuality.MEDIUM;
|
114
|
+
case 2:
|
115
|
+
case "HIGH":
|
116
|
+
return VideoQuality.HIGH;
|
117
|
+
case -1:
|
118
|
+
case "UNRECOGNIZED":
|
119
|
+
default:
|
120
|
+
return VideoQuality.UNRECOGNIZED;
|
121
|
+
}
|
122
|
+
}
|
123
|
+
exports.videoQualityFromJSON = videoQualityFromJSON;
|
124
|
+
function videoQualityToJSON(object) {
|
125
|
+
switch (object) {
|
126
|
+
case VideoQuality.LOW:
|
127
|
+
return "LOW";
|
128
|
+
case VideoQuality.MEDIUM:
|
129
|
+
return "MEDIUM";
|
130
|
+
case VideoQuality.HIGH:
|
131
|
+
return "HIGH";
|
132
|
+
default:
|
133
|
+
return "UNKNOWN";
|
134
|
+
}
|
135
|
+
}
|
136
|
+
exports.videoQualityToJSON = videoQualityToJSON;
|
99
137
|
var ConnectionQuality;
|
100
138
|
(function (ConnectionQuality) {
|
101
139
|
ConnectionQuality[ConnectionQuality["POOR"] = 0] = "POOR";
|
@@ -223,6 +261,7 @@ const baseRoom = {
|
|
223
261
|
turnPassword: "",
|
224
262
|
metadata: "",
|
225
263
|
numParticipants: 0,
|
264
|
+
activeRecording: false,
|
226
265
|
};
|
227
266
|
exports.Room = {
|
228
267
|
encode(message, writer = minimal_1.default.Writer.create()) {
|
@@ -253,6 +292,9 @@ exports.Room = {
|
|
253
292
|
if (message.numParticipants !== 0) {
|
254
293
|
writer.uint32(72).uint32(message.numParticipants);
|
255
294
|
}
|
295
|
+
if (message.activeRecording === true) {
|
296
|
+
writer.uint32(80).bool(message.activeRecording);
|
297
|
+
}
|
256
298
|
return writer;
|
257
299
|
},
|
258
300
|
decode(input, length) {
|
@@ -290,6 +332,9 @@ exports.Room = {
|
|
290
332
|
case 9:
|
291
333
|
message.numParticipants = reader.uint32();
|
292
334
|
break;
|
335
|
+
case 10:
|
336
|
+
message.activeRecording = reader.bool();
|
337
|
+
break;
|
293
338
|
default:
|
294
339
|
reader.skipType(tag & 7);
|
295
340
|
break;
|
@@ -355,6 +400,13 @@ exports.Room = {
|
|
355
400
|
else {
|
356
401
|
message.numParticipants = 0;
|
357
402
|
}
|
403
|
+
if (object.activeRecording !== undefined &&
|
404
|
+
object.activeRecording !== null) {
|
405
|
+
message.activeRecording = Boolean(object.activeRecording);
|
406
|
+
}
|
407
|
+
else {
|
408
|
+
message.activeRecording = false;
|
409
|
+
}
|
358
410
|
return message;
|
359
411
|
},
|
360
412
|
toJSON(message) {
|
@@ -378,10 +430,12 @@ exports.Room = {
|
|
378
430
|
message.metadata !== undefined && (obj.metadata = message.metadata);
|
379
431
|
message.numParticipants !== undefined &&
|
380
432
|
(obj.numParticipants = message.numParticipants);
|
433
|
+
message.activeRecording !== undefined &&
|
434
|
+
(obj.activeRecording = message.activeRecording);
|
381
435
|
return obj;
|
382
436
|
},
|
383
437
|
fromPartial(object) {
|
384
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
438
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
385
439
|
const message = Object.assign({}, baseRoom);
|
386
440
|
message.sid = (_a = object.sid) !== null && _a !== void 0 ? _a : "";
|
387
441
|
message.name = (_b = object.name) !== null && _b !== void 0 ? _b : "";
|
@@ -397,6 +451,7 @@ exports.Room = {
|
|
397
451
|
}
|
398
452
|
message.metadata = (_g = object.metadata) !== null && _g !== void 0 ? _g : "";
|
399
453
|
message.numParticipants = (_h = object.numParticipants) !== null && _h !== void 0 ? _h : 0;
|
454
|
+
message.activeRecording = (_j = object.activeRecording) !== null && _j !== void 0 ? _j : false;
|
400
455
|
return message;
|
401
456
|
},
|
402
457
|
};
|
@@ -468,6 +523,8 @@ const baseParticipantInfo = {
|
|
468
523
|
metadata: "",
|
469
524
|
joinedAt: 0,
|
470
525
|
hidden: false,
|
526
|
+
recorder: false,
|
527
|
+
name: "",
|
471
528
|
};
|
472
529
|
exports.ParticipantInfo = {
|
473
530
|
encode(message, writer = minimal_1.default.Writer.create()) {
|
@@ -492,6 +549,12 @@ exports.ParticipantInfo = {
|
|
492
549
|
if (message.hidden === true) {
|
493
550
|
writer.uint32(56).bool(message.hidden);
|
494
551
|
}
|
552
|
+
if (message.recorder === true) {
|
553
|
+
writer.uint32(64).bool(message.recorder);
|
554
|
+
}
|
555
|
+
if (message.name !== "") {
|
556
|
+
writer.uint32(74).string(message.name);
|
557
|
+
}
|
495
558
|
return writer;
|
496
559
|
},
|
497
560
|
decode(input, length) {
|
@@ -523,6 +586,12 @@ exports.ParticipantInfo = {
|
|
523
586
|
case 7:
|
524
587
|
message.hidden = reader.bool();
|
525
588
|
break;
|
589
|
+
case 8:
|
590
|
+
message.recorder = reader.bool();
|
591
|
+
break;
|
592
|
+
case 9:
|
593
|
+
message.name = reader.string();
|
594
|
+
break;
|
526
595
|
default:
|
527
596
|
reader.skipType(tag & 7);
|
528
597
|
break;
|
@@ -574,6 +643,18 @@ exports.ParticipantInfo = {
|
|
574
643
|
else {
|
575
644
|
message.hidden = false;
|
576
645
|
}
|
646
|
+
if (object.recorder !== undefined && object.recorder !== null) {
|
647
|
+
message.recorder = Boolean(object.recorder);
|
648
|
+
}
|
649
|
+
else {
|
650
|
+
message.recorder = false;
|
651
|
+
}
|
652
|
+
if (object.name !== undefined && object.name !== null) {
|
653
|
+
message.name = String(object.name);
|
654
|
+
}
|
655
|
+
else {
|
656
|
+
message.name = "";
|
657
|
+
}
|
577
658
|
return message;
|
578
659
|
},
|
579
660
|
toJSON(message) {
|
@@ -591,10 +672,12 @@ exports.ParticipantInfo = {
|
|
591
672
|
message.metadata !== undefined && (obj.metadata = message.metadata);
|
592
673
|
message.joinedAt !== undefined && (obj.joinedAt = message.joinedAt);
|
593
674
|
message.hidden !== undefined && (obj.hidden = message.hidden);
|
675
|
+
message.recorder !== undefined && (obj.recorder = message.recorder);
|
676
|
+
message.name !== undefined && (obj.name = message.name);
|
594
677
|
return obj;
|
595
678
|
},
|
596
679
|
fromPartial(object) {
|
597
|
-
var _a, _b, _c, _d, _e, _f;
|
680
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
598
681
|
const message = Object.assign({}, baseParticipantInfo);
|
599
682
|
message.sid = (_a = object.sid) !== null && _a !== void 0 ? _a : "";
|
600
683
|
message.identity = (_b = object.identity) !== null && _b !== void 0 ? _b : "";
|
@@ -608,6 +691,8 @@ exports.ParticipantInfo = {
|
|
608
691
|
message.metadata = (_d = object.metadata) !== null && _d !== void 0 ? _d : "";
|
609
692
|
message.joinedAt = (_e = object.joinedAt) !== null && _e !== void 0 ? _e : 0;
|
610
693
|
message.hidden = (_f = object.hidden) !== null && _f !== void 0 ? _f : false;
|
694
|
+
message.recorder = (_g = object.recorder) !== null && _g !== void 0 ? _g : false;
|
695
|
+
message.name = (_h = object.name) !== null && _h !== void 0 ? _h : "";
|
611
696
|
return message;
|
612
697
|
},
|
613
698
|
};
|
@@ -621,6 +706,7 @@ const baseTrackInfo = {
|
|
621
706
|
simulcast: false,
|
622
707
|
disableDtx: false,
|
623
708
|
source: 0,
|
709
|
+
mimeType: "",
|
624
710
|
};
|
625
711
|
exports.TrackInfo = {
|
626
712
|
encode(message, writer = minimal_1.default.Writer.create()) {
|
@@ -651,12 +737,19 @@ exports.TrackInfo = {
|
|
651
737
|
if (message.source !== 0) {
|
652
738
|
writer.uint32(72).int32(message.source);
|
653
739
|
}
|
740
|
+
for (const v of message.layers) {
|
741
|
+
exports.VideoLayer.encode(v, writer.uint32(82).fork()).ldelim();
|
742
|
+
}
|
743
|
+
if (message.mimeType !== "") {
|
744
|
+
writer.uint32(90).string(message.mimeType);
|
745
|
+
}
|
654
746
|
return writer;
|
655
747
|
},
|
656
748
|
decode(input, length) {
|
657
749
|
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
658
750
|
let end = length === undefined ? reader.len : reader.pos + length;
|
659
751
|
const message = Object.assign({}, baseTrackInfo);
|
752
|
+
message.layers = [];
|
660
753
|
while (reader.pos < end) {
|
661
754
|
const tag = reader.uint32();
|
662
755
|
switch (tag >>> 3) {
|
@@ -687,6 +780,12 @@ exports.TrackInfo = {
|
|
687
780
|
case 9:
|
688
781
|
message.source = reader.int32();
|
689
782
|
break;
|
783
|
+
case 10:
|
784
|
+
message.layers.push(exports.VideoLayer.decode(reader, reader.uint32()));
|
785
|
+
break;
|
786
|
+
case 11:
|
787
|
+
message.mimeType = reader.string();
|
788
|
+
break;
|
690
789
|
default:
|
691
790
|
reader.skipType(tag & 7);
|
692
791
|
break;
|
@@ -696,6 +795,7 @@ exports.TrackInfo = {
|
|
696
795
|
},
|
697
796
|
fromJSON(object) {
|
698
797
|
const message = Object.assign({}, baseTrackInfo);
|
798
|
+
message.layers = [];
|
699
799
|
if (object.sid !== undefined && object.sid !== null) {
|
700
800
|
message.sid = String(object.sid);
|
701
801
|
}
|
@@ -750,6 +850,17 @@ exports.TrackInfo = {
|
|
750
850
|
else {
|
751
851
|
message.source = 0;
|
752
852
|
}
|
853
|
+
if (object.layers !== undefined && object.layers !== null) {
|
854
|
+
for (const e of object.layers) {
|
855
|
+
message.layers.push(exports.VideoLayer.fromJSON(e));
|
856
|
+
}
|
857
|
+
}
|
858
|
+
if (object.mimeType !== undefined && object.mimeType !== null) {
|
859
|
+
message.mimeType = String(object.mimeType);
|
860
|
+
}
|
861
|
+
else {
|
862
|
+
message.mimeType = "";
|
863
|
+
}
|
753
864
|
return message;
|
754
865
|
},
|
755
866
|
toJSON(message) {
|
@@ -764,10 +875,17 @@ exports.TrackInfo = {
|
|
764
875
|
message.disableDtx !== undefined && (obj.disableDtx = message.disableDtx);
|
765
876
|
message.source !== undefined &&
|
766
877
|
(obj.source = trackSourceToJSON(message.source));
|
878
|
+
if (message.layers) {
|
879
|
+
obj.layers = message.layers.map((e) => e ? exports.VideoLayer.toJSON(e) : undefined);
|
880
|
+
}
|
881
|
+
else {
|
882
|
+
obj.layers = [];
|
883
|
+
}
|
884
|
+
message.mimeType !== undefined && (obj.mimeType = message.mimeType);
|
767
885
|
return obj;
|
768
886
|
},
|
769
887
|
fromPartial(object) {
|
770
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
888
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
771
889
|
const message = Object.assign({}, baseTrackInfo);
|
772
890
|
message.sid = (_a = object.sid) !== null && _a !== void 0 ? _a : "";
|
773
891
|
message.type = (_b = object.type) !== null && _b !== void 0 ? _b : 0;
|
@@ -778,6 +896,103 @@ exports.TrackInfo = {
|
|
778
896
|
message.simulcast = (_g = object.simulcast) !== null && _g !== void 0 ? _g : false;
|
779
897
|
message.disableDtx = (_h = object.disableDtx) !== null && _h !== void 0 ? _h : false;
|
780
898
|
message.source = (_j = object.source) !== null && _j !== void 0 ? _j : 0;
|
899
|
+
message.layers = [];
|
900
|
+
if (object.layers !== undefined && object.layers !== null) {
|
901
|
+
for (const e of object.layers) {
|
902
|
+
message.layers.push(exports.VideoLayer.fromPartial(e));
|
903
|
+
}
|
904
|
+
}
|
905
|
+
message.mimeType = (_k = object.mimeType) !== null && _k !== void 0 ? _k : "";
|
906
|
+
return message;
|
907
|
+
},
|
908
|
+
};
|
909
|
+
const baseVideoLayer = { quality: 0, width: 0, height: 0, bitrate: 0 };
|
910
|
+
exports.VideoLayer = {
|
911
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
912
|
+
if (message.quality !== 0) {
|
913
|
+
writer.uint32(8).int32(message.quality);
|
914
|
+
}
|
915
|
+
if (message.width !== 0) {
|
916
|
+
writer.uint32(16).uint32(message.width);
|
917
|
+
}
|
918
|
+
if (message.height !== 0) {
|
919
|
+
writer.uint32(24).uint32(message.height);
|
920
|
+
}
|
921
|
+
if (message.bitrate !== 0) {
|
922
|
+
writer.uint32(32).uint32(message.bitrate);
|
923
|
+
}
|
924
|
+
return writer;
|
925
|
+
},
|
926
|
+
decode(input, length) {
|
927
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
928
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
929
|
+
const message = Object.assign({}, baseVideoLayer);
|
930
|
+
while (reader.pos < end) {
|
931
|
+
const tag = reader.uint32();
|
932
|
+
switch (tag >>> 3) {
|
933
|
+
case 1:
|
934
|
+
message.quality = reader.int32();
|
935
|
+
break;
|
936
|
+
case 2:
|
937
|
+
message.width = reader.uint32();
|
938
|
+
break;
|
939
|
+
case 3:
|
940
|
+
message.height = reader.uint32();
|
941
|
+
break;
|
942
|
+
case 4:
|
943
|
+
message.bitrate = reader.uint32();
|
944
|
+
break;
|
945
|
+
default:
|
946
|
+
reader.skipType(tag & 7);
|
947
|
+
break;
|
948
|
+
}
|
949
|
+
}
|
950
|
+
return message;
|
951
|
+
},
|
952
|
+
fromJSON(object) {
|
953
|
+
const message = Object.assign({}, baseVideoLayer);
|
954
|
+
if (object.quality !== undefined && object.quality !== null) {
|
955
|
+
message.quality = videoQualityFromJSON(object.quality);
|
956
|
+
}
|
957
|
+
else {
|
958
|
+
message.quality = 0;
|
959
|
+
}
|
960
|
+
if (object.width !== undefined && object.width !== null) {
|
961
|
+
message.width = Number(object.width);
|
962
|
+
}
|
963
|
+
else {
|
964
|
+
message.width = 0;
|
965
|
+
}
|
966
|
+
if (object.height !== undefined && object.height !== null) {
|
967
|
+
message.height = Number(object.height);
|
968
|
+
}
|
969
|
+
else {
|
970
|
+
message.height = 0;
|
971
|
+
}
|
972
|
+
if (object.bitrate !== undefined && object.bitrate !== null) {
|
973
|
+
message.bitrate = Number(object.bitrate);
|
974
|
+
}
|
975
|
+
else {
|
976
|
+
message.bitrate = 0;
|
977
|
+
}
|
978
|
+
return message;
|
979
|
+
},
|
980
|
+
toJSON(message) {
|
981
|
+
const obj = {};
|
982
|
+
message.quality !== undefined &&
|
983
|
+
(obj.quality = videoQualityToJSON(message.quality));
|
984
|
+
message.width !== undefined && (obj.width = message.width);
|
985
|
+
message.height !== undefined && (obj.height = message.height);
|
986
|
+
message.bitrate !== undefined && (obj.bitrate = message.bitrate);
|
987
|
+
return obj;
|
988
|
+
},
|
989
|
+
fromPartial(object) {
|
990
|
+
var _a, _b, _c, _d;
|
991
|
+
const message = Object.assign({}, baseVideoLayer);
|
992
|
+
message.quality = (_a = object.quality) !== null && _a !== void 0 ? _a : 0;
|
993
|
+
message.width = (_b = object.width) !== null && _b !== void 0 ? _b : 0;
|
994
|
+
message.height = (_c = object.height) !== null && _c !== void 0 ? _c : 0;
|
995
|
+
message.bitrate = (_d = object.bitrate) !== null && _d !== void 0 ? _d : 0;
|
781
996
|
return message;
|
782
997
|
},
|
783
998
|
};
|
@@ -1092,6 +1307,79 @@ exports.UserPacket = {
|
|
1092
1307
|
return message;
|
1093
1308
|
},
|
1094
1309
|
};
|
1310
|
+
const baseParticipantTracks = { participantSid: "", trackSids: "" };
|
1311
|
+
exports.ParticipantTracks = {
|
1312
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
1313
|
+
if (message.participantSid !== "") {
|
1314
|
+
writer.uint32(10).string(message.participantSid);
|
1315
|
+
}
|
1316
|
+
for (const v of message.trackSids) {
|
1317
|
+
writer.uint32(18).string(v);
|
1318
|
+
}
|
1319
|
+
return writer;
|
1320
|
+
},
|
1321
|
+
decode(input, length) {
|
1322
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
1323
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
1324
|
+
const message = Object.assign({}, baseParticipantTracks);
|
1325
|
+
message.trackSids = [];
|
1326
|
+
while (reader.pos < end) {
|
1327
|
+
const tag = reader.uint32();
|
1328
|
+
switch (tag >>> 3) {
|
1329
|
+
case 1:
|
1330
|
+
message.participantSid = reader.string();
|
1331
|
+
break;
|
1332
|
+
case 2:
|
1333
|
+
message.trackSids.push(reader.string());
|
1334
|
+
break;
|
1335
|
+
default:
|
1336
|
+
reader.skipType(tag & 7);
|
1337
|
+
break;
|
1338
|
+
}
|
1339
|
+
}
|
1340
|
+
return message;
|
1341
|
+
},
|
1342
|
+
fromJSON(object) {
|
1343
|
+
const message = Object.assign({}, baseParticipantTracks);
|
1344
|
+
message.trackSids = [];
|
1345
|
+
if (object.participantSid !== undefined && object.participantSid !== null) {
|
1346
|
+
message.participantSid = String(object.participantSid);
|
1347
|
+
}
|
1348
|
+
else {
|
1349
|
+
message.participantSid = "";
|
1350
|
+
}
|
1351
|
+
if (object.trackSids !== undefined && object.trackSids !== null) {
|
1352
|
+
for (const e of object.trackSids) {
|
1353
|
+
message.trackSids.push(String(e));
|
1354
|
+
}
|
1355
|
+
}
|
1356
|
+
return message;
|
1357
|
+
},
|
1358
|
+
toJSON(message) {
|
1359
|
+
const obj = {};
|
1360
|
+
message.participantSid !== undefined &&
|
1361
|
+
(obj.participantSid = message.participantSid);
|
1362
|
+
if (message.trackSids) {
|
1363
|
+
obj.trackSids = message.trackSids.map((e) => e);
|
1364
|
+
}
|
1365
|
+
else {
|
1366
|
+
obj.trackSids = [];
|
1367
|
+
}
|
1368
|
+
return obj;
|
1369
|
+
},
|
1370
|
+
fromPartial(object) {
|
1371
|
+
var _a;
|
1372
|
+
const message = Object.assign({}, baseParticipantTracks);
|
1373
|
+
message.participantSid = (_a = object.participantSid) !== null && _a !== void 0 ? _a : "";
|
1374
|
+
message.trackSids = [];
|
1375
|
+
if (object.trackSids !== undefined && object.trackSids !== null) {
|
1376
|
+
for (const e of object.trackSids) {
|
1377
|
+
message.trackSids.push(e);
|
1378
|
+
}
|
1379
|
+
}
|
1380
|
+
return message;
|
1381
|
+
},
|
1382
|
+
};
|
1095
1383
|
var globalThis = (() => {
|
1096
1384
|
if (typeof globalThis !== "undefined")
|
1097
1385
|
return globalThis;
|