livekit-server-sdk 0.5.3 → 0.5.7
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/publish.yaml +1 -3
- package/dist/RecordingServiceClient.d.ts +13 -13
- package/dist/RecordingServiceClient.js +40 -11
- package/dist/RecordingServiceClient.js.map +1 -1
- package/dist/RoomServiceClient.d.ts +6 -0
- package/dist/RoomServiceClient.js +11 -0
- package/dist/RoomServiceClient.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/dist/proto/google/protobuf/empty.d.ts +27 -0
- package/dist/proto/google/protobuf/empty.js +47 -0
- package/dist/proto/google/protobuf/empty.js.map +1 -0
- package/dist/proto/livekit_models.d.ts +26 -1
- package/dist/proto/livekit_models.js +218 -3
- package/dist/proto/livekit_models.js.map +1 -1
- package/dist/proto/livekit_recording.d.ts +114 -55
- package/dist/proto/livekit_recording.js +709 -343
- package/dist/proto/livekit_recording.js.map +1 -1
- package/dist/proto/livekit_room.d.ts +14 -0
- package/dist/proto/livekit_room.js +73 -3
- package/dist/proto/livekit_room.js.map +1 -1
- package/dist/proto/livekit_webhook.d.ts +4 -1
- package/dist/proto/livekit_webhook.js +23 -0
- package/dist/proto/livekit_webhook.js.map +1 -1
- package/package.json +1 -1
|
@@ -50,9 +50,7 @@ jobs:
|
|
|
50
50
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
51
51
|
|
|
52
52
|
- name: S3 Upload
|
|
53
|
-
|
|
54
|
-
with:
|
|
55
|
-
args: s3 cp docs/ s3://livekit-docs/server-sdk-js --recursive
|
|
53
|
+
run: aws s3 cp docs/ s3://livekit-docs/server-sdk-js --recursive
|
|
56
54
|
env:
|
|
57
55
|
AWS_ACCESS_KEY_ID: ${{ secrets.DOCS_DEPLOY_AWS_ACCESS_KEY }}
|
|
58
56
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.DOCS_DEPLOY_AWS_API_SECRET }}
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { RecordingTemplate, RtmpOutput, RecordingOptions } from './proto/livekit_recording';
|
|
2
2
|
/**
|
|
3
3
|
* Client to access Recording APIs
|
|
4
4
|
*/
|
|
5
|
-
|
|
5
|
+
export default class RecordingServiceClient {
|
|
6
6
|
private readonly rpc;
|
|
7
7
|
private readonly apiKey?;
|
|
8
8
|
private readonly secret?;
|
|
9
9
|
/**
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
*/
|
|
10
|
+
* @param host hostname including protocol. i.e. 'https://cluster.livekit.io'
|
|
11
|
+
* @param apiKey API Key, can be set in env var LIVEKIT_API_KEY
|
|
12
|
+
* @param secret API Secret, can be set in env var LIVEKIT_API_SECRET
|
|
13
|
+
*/
|
|
15
14
|
constructor(host: string, apiKey?: string, secret?: string);
|
|
16
15
|
/**
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
startRecording(input:
|
|
16
|
+
* @param input input url or recording template
|
|
17
|
+
* @param output output filepath or RtmpOutput
|
|
18
|
+
* @param options recording options
|
|
19
|
+
*/
|
|
20
|
+
startRecording(input: string | RecordingTemplate, output: string | RtmpOutput, options?: RecordingOptions): Promise<string>;
|
|
21
|
+
addOutput(recordingId: string, rtmpUrl: string): Promise<void>;
|
|
22
|
+
removeOutput(recordingId: string, rtmpUrl: string): Promise<void>;
|
|
22
23
|
endRecording(recordingId: string): Promise<void>;
|
|
23
24
|
private authHeader;
|
|
24
25
|
}
|
|
25
|
-
export default RecordingServiceClient;
|
|
@@ -18,26 +18,55 @@ const svc = 'RecordingService';
|
|
|
18
18
|
*/
|
|
19
19
|
class RecordingServiceClient {
|
|
20
20
|
/**
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
*/
|
|
21
|
+
* @param host hostname including protocol. i.e. 'https://cluster.livekit.io'
|
|
22
|
+
* @param apiKey API Key, can be set in env var LIVEKIT_API_KEY
|
|
23
|
+
* @param secret API Secret, can be set in env var LIVEKIT_API_SECRET
|
|
24
|
+
*/
|
|
26
25
|
constructor(host, apiKey, secret) {
|
|
27
26
|
this.rpc = new TwirpRPC_1.TwirpRpc(host, TwirpRPC_1.livekitPackage);
|
|
28
27
|
this.apiKey = apiKey;
|
|
29
28
|
this.secret = secret;
|
|
30
29
|
}
|
|
31
30
|
/**
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
31
|
+
* @param input input url or recording template
|
|
32
|
+
* @param output output filepath or RtmpOutput
|
|
33
|
+
* @param options recording options
|
|
34
|
+
*/
|
|
36
35
|
startRecording(input, output, options) {
|
|
37
36
|
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
-
|
|
37
|
+
let url;
|
|
38
|
+
let template;
|
|
39
|
+
if (typeof input === 'string') {
|
|
40
|
+
url = input;
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
template = input;
|
|
44
|
+
}
|
|
45
|
+
let rtmp;
|
|
46
|
+
let filepath;
|
|
47
|
+
if (typeof output === 'string') {
|
|
48
|
+
filepath = output;
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
rtmp = output;
|
|
52
|
+
}
|
|
53
|
+
const req = livekit_recording_1.StartRecordingRequest.toJSON({
|
|
54
|
+
url, template, rtmp, filepath, options,
|
|
55
|
+
});
|
|
39
56
|
const data = yield this.rpc.request(svc, 'StartRecording', req, this.authHeader({ roomRecord: true }));
|
|
40
|
-
return livekit_recording_1.
|
|
57
|
+
return livekit_recording_1.StartRecordingResponse.fromJSON(data).recordingId;
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
addOutput(recordingId, rtmpUrl) {
|
|
61
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
62
|
+
const req = livekit_recording_1.AddOutputRequest.toJSON({ recordingId, rtmpUrl });
|
|
63
|
+
yield this.rpc.request(svc, 'AddOutput', req, this.authHeader({ roomRecord: true }));
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
removeOutput(recordingId, rtmpUrl) {
|
|
67
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
68
|
+
const req = livekit_recording_1.RemoveOutputRequest.toJSON({ recordingId, rtmpUrl });
|
|
69
|
+
yield this.rpc.request(svc, 'RemoveOutput', req, this.authHeader({ roomRecord: true }));
|
|
41
70
|
});
|
|
42
71
|
}
|
|
43
72
|
endRecording(recordingId) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RecordingServiceClient.js","sourceRoot":"","sources":["../src/RecordingServiceClient.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+CAA4C;AAE5C,
|
|
1
|
+
{"version":3,"file":"RecordingServiceClient.js","sourceRoot":"","sources":["../src/RecordingServiceClient.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+CAA4C;AAE5C,iEAImC;AACnC,yCAA2D;AAE3D,MAAM,GAAG,GAAG,kBAAkB,CAAC;AAE/B;;GAEG;AACH,MAAqB,sBAAsB;IAOzC;;;;OAIG;IACH,YAAY,IAAY,EAAE,MAAe,EAAE,MAAe;QACxD,IAAI,CAAC,GAAG,GAAG,IAAI,mBAAQ,CAAC,IAAI,EAAE,yBAAc,CAAC,CAAC;QAC9C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACG,cAAc,CAClB,KAAiC,EACjC,MAA2B,EAC3B,OAA0B;;YAE1B,IAAI,GAAuB,CAAC;YAC5B,IAAI,QAAuC,CAAC;YAC5C,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;gBAC7B,GAAG,GAAG,KAAK,CAAC;aACb;iBAAM;gBACL,QAAQ,GAAG,KAAK,CAAC;aAClB;YAED,IAAI,IAA4B,CAAC;YACjC,IAAI,QAA4B,CAAC;YACjC,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AM,IAAI,CAAC,GAAG,CAAC,OAAO,CACpB,GAAG,EACH,cAAc,EACd,GAAG,EACH,IAAI,CAAC,UAAU,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CACtC,CAAC;QACJ,CAAC;KAAA;IAEO,UAAU,CAAC,KAAiB;QAClC,MAAM,EAAE,GAAG,IAAI,yBAAW,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC,CAAC;QACrE,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QACnB,OAAO;YACL,aAAa,EAAE,UAAU,EAAE,CAAC,KAAK,EAAE,EAAE;SACtC,CAAC;IACJ,CAAC;CACF;AA7FD,yCA6FC"}
|
|
@@ -44,6 +44,12 @@ export declare class RoomServiceClient {
|
|
|
44
44
|
createRoom(options: CreateOptions): Promise<Room>;
|
|
45
45
|
listRooms(): Promise<Room[]>;
|
|
46
46
|
deleteRoom(room: string): Promise<void>;
|
|
47
|
+
/**
|
|
48
|
+
* Update metadata of a room
|
|
49
|
+
* @param room name of the room
|
|
50
|
+
* @param metadata the new metadata for the room
|
|
51
|
+
*/
|
|
52
|
+
updateRoomMetadata(room: string, metadata: string): Promise<Room>;
|
|
47
53
|
/**
|
|
48
54
|
* List participants in a room
|
|
49
55
|
* @param room name of the room
|
|
@@ -54,6 +54,17 @@ class RoomServiceClient {
|
|
|
54
54
|
yield this.rpc.request(svc, 'DeleteRoom', livekit_room_1.DeleteRoomRequest.toJSON({ room }), this.authHeader({ roomCreate: true }));
|
|
55
55
|
});
|
|
56
56
|
}
|
|
57
|
+
/**
|
|
58
|
+
* Update metadata of a room
|
|
59
|
+
* @param room name of the room
|
|
60
|
+
* @param metadata the new metadata for the room
|
|
61
|
+
*/
|
|
62
|
+
updateRoomMetadata(room, metadata) {
|
|
63
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
64
|
+
const data = yield this.rpc.request(svc, 'UpdateRoomMetadata', livekit_room_1.UpdateRoomMetadataRequest.toJSON({ room, metadata }), this.authHeader({ roomAdmin: true, room }));
|
|
65
|
+
return livekit_models_1.Room.fromJSON(data);
|
|
66
|
+
});
|
|
67
|
+
}
|
|
57
68
|
/**
|
|
58
69
|
* List participants in a room
|
|
59
70
|
* @param room name of the room
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RoomServiceClient.js","sourceRoot":"","sources":["../src/RoomServiceClient.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAA4C;AAE5C,2DAEgC;AAChC,
|
|
1
|
+
{"version":3,"file":"RoomServiceClient.js","sourceRoot":"","sources":["../src/RoomServiceClient.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAA4C;AAE5C,2DAEgC;AAChC,uDAe8B;AAC9B,yCAA2D;AA2B3D,MAAM,GAAG,GAAG,aAAa,CAAC;AAE1B;;GAEG;AACH,MAAa,iBAAiB;IAO5B;;;;;OAKG;IACH,YAAY,IAAY,EAAE,MAAe,EAAE,MAAe;QACxD,IAAI,CAAC,GAAG,GAAG,IAAI,mBAAQ,CAAC,IAAI,EAAE,yBAAc,CAAC,CAAC;QAC9C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACG,UAAU,CAAC,OAAsB;;YACrC,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,OAAO,CACjC,GAAG,EACH,YAAY,EACZ,gCAAiB,CAAC,MAAM,CAAC,gCAAiB,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,EAChE,IAAI,CAAC,UAAU,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CACtC,CAAC;YACF,OAAO,qBAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QAC7B,CAAC;KAAA;IAEK,SAAS;;YACb,MAAM,IAAI,GAAG,MAAM,IAAI,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,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAC3C,CAAC;QACJ,CAAC;KAAA;IAEO,UAAU,CAAC,KAAiB;QAClC,MAAM,EAAE,GAAG,IAAI,yBAAW,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC,CAAC;QACrE,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QACnB,OAAO;YACL,aAAa,EAAE,UAAU,EAAE,CAAC,KAAK,EAAE,EAAE;SACtC,CAAC;IACJ,CAAC;CACF;AA/OD,8CA+OC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * from './AccessToken';
|
|
2
2
|
export * from './grants';
|
|
3
3
|
export { DataPacket_Kind, ParticipantInfo, ParticipantInfo_State, Room, TrackInfo, TrackType, } from './proto/livekit_models';
|
|
4
|
-
export
|
|
4
|
+
export { default } from './RecordingServiceClient';
|
|
5
5
|
export * from './RoomServiceClient';
|
|
6
6
|
export * from './WebhookReceiver';
|
package/dist/index.js
CHANGED
|
@@ -9,8 +9,11 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
|
|
|
9
9
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
10
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
11
|
};
|
|
12
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
13
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
14
|
+
};
|
|
12
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.TrackType = exports.TrackInfo = exports.Room = exports.ParticipantInfo_State = exports.ParticipantInfo = exports.DataPacket_Kind = void 0;
|
|
16
|
+
exports.default = exports.TrackType = exports.TrackInfo = exports.Room = exports.ParticipantInfo_State = exports.ParticipantInfo = exports.DataPacket_Kind = void 0;
|
|
14
17
|
__exportStar(require("./AccessToken"), exports);
|
|
15
18
|
__exportStar(require("./grants"), exports);
|
|
16
19
|
var livekit_models_1 = require("./proto/livekit_models");
|
|
@@ -20,7 +23,8 @@ Object.defineProperty(exports, "ParticipantInfo_State", { enumerable: true, get:
|
|
|
20
23
|
Object.defineProperty(exports, "Room", { enumerable: true, get: function () { return livekit_models_1.Room; } });
|
|
21
24
|
Object.defineProperty(exports, "TrackInfo", { enumerable: true, get: function () { return livekit_models_1.TrackInfo; } });
|
|
22
25
|
Object.defineProperty(exports, "TrackType", { enumerable: true, get: function () { return livekit_models_1.TrackType; } });
|
|
23
|
-
|
|
26
|
+
var RecordingServiceClient_1 = require("./RecordingServiceClient");
|
|
27
|
+
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(RecordingServiceClient_1).default; } });
|
|
24
28
|
__exportStar(require("./RoomServiceClient"), exports);
|
|
25
29
|
__exportStar(require("./WebhookReceiver"), exports);
|
|
26
30
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B;AAC9B,2CAAyB;AACzB,yDAOgC;AAN9B,iHAAA,eAAe,OAAA;AACf,iHAAA,eAAe,OAAA;AACf,uHAAA,qBAAqB,OAAA;AACrB,sGAAA,IAAI,OAAA;AACJ,2GAAA,SAAS,OAAA;AACT,2GAAA,SAAS,OAAA;AAEX,mEAAmD;AAA1C,kIAAA,OAAO,OAAA;AAChB,sDAAoC;AACpC,oDAAkC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import _m0 from "protobufjs/minimal";
|
|
2
|
+
export declare const protobufPackage = "google.protobuf";
|
|
3
|
+
/**
|
|
4
|
+
* A generic empty message that you can re-use to avoid defining duplicated
|
|
5
|
+
* empty messages in your APIs. A typical example is to use it as the request
|
|
6
|
+
* or the response type of an API method. For instance:
|
|
7
|
+
*
|
|
8
|
+
* service Foo {
|
|
9
|
+
* rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
|
|
10
|
+
* }
|
|
11
|
+
*
|
|
12
|
+
* The JSON representation for `Empty` is empty JSON object `{}`.
|
|
13
|
+
*/
|
|
14
|
+
export interface Empty {
|
|
15
|
+
}
|
|
16
|
+
export declare const Empty: {
|
|
17
|
+
encode(_: Empty, writer?: _m0.Writer): _m0.Writer;
|
|
18
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): Empty;
|
|
19
|
+
fromJSON(_: any): Empty;
|
|
20
|
+
toJSON(_: Empty): unknown;
|
|
21
|
+
fromPartial(_: DeepPartial<Empty>): Empty;
|
|
22
|
+
};
|
|
23
|
+
declare type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
24
|
+
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 {} ? {
|
|
25
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
26
|
+
} : Partial<T>;
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.Empty = exports.protobufPackage = void 0;
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
const long_1 = __importDefault(require("long"));
|
|
9
|
+
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
10
|
+
exports.protobufPackage = "google.protobuf";
|
|
11
|
+
const baseEmpty = {};
|
|
12
|
+
exports.Empty = {
|
|
13
|
+
encode(_, writer = minimal_1.default.Writer.create()) {
|
|
14
|
+
return writer;
|
|
15
|
+
},
|
|
16
|
+
decode(input, length) {
|
|
17
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
18
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
19
|
+
const message = Object.assign({}, baseEmpty);
|
|
20
|
+
while (reader.pos < end) {
|
|
21
|
+
const tag = reader.uint32();
|
|
22
|
+
switch (tag >>> 3) {
|
|
23
|
+
default:
|
|
24
|
+
reader.skipType(tag & 7);
|
|
25
|
+
break;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return message;
|
|
29
|
+
},
|
|
30
|
+
fromJSON(_) {
|
|
31
|
+
const message = Object.assign({}, baseEmpty);
|
|
32
|
+
return message;
|
|
33
|
+
},
|
|
34
|
+
toJSON(_) {
|
|
35
|
+
const obj = {};
|
|
36
|
+
return obj;
|
|
37
|
+
},
|
|
38
|
+
fromPartial(_) {
|
|
39
|
+
const message = Object.assign({}, baseEmpty);
|
|
40
|
+
return message;
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
if (minimal_1.default.util.Long !== long_1.default) {
|
|
44
|
+
minimal_1.default.util.Long = long_1.default;
|
|
45
|
+
minimal_1.default.configure();
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=empty.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"empty.js","sourceRoot":"","sources":["../../../../src/proto/google/protobuf/empty.ts"],"names":[],"mappings":";;;;;;AAAA,oBAAoB;AACpB,gDAAwB;AACxB,iEAAqC;AAExB,QAAA,eAAe,GAAG,iBAAiB,CAAC;AAejD,MAAM,SAAS,GAAW,EAAE,CAAC;AAEhB,QAAA,KAAK,GAAG;IACnB,MAAM,CAAC,CAAQ,EAAE,SAAqB,iBAAG,CAAC,MAAM,CAAC,MAAM,EAAE;QACvD,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,MA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function trackTypeToJSON(object: TrackType): string;
|
|
11
|
+
export declare enum TrackSource {
|
|
12
|
+
UNKNOWN = 0,
|
|
13
|
+
CAMERA = 1,
|
|
14
|
+
MICROPHONE = 2,
|
|
15
|
+
SCREEN_SHARE = 3,
|
|
16
|
+
SCREEN_SHARE_AUDIO = 4,
|
|
17
|
+
UNRECOGNIZED = -1
|
|
18
|
+
}
|
|
19
|
+
export declare function trackSourceFromJSON(object: any): TrackSource;
|
|
20
|
+
export declare function trackSourceToJSON(object: TrackSource): string;
|
|
21
|
+
export declare enum ConnectionQuality {
|
|
22
|
+
POOR = 0,
|
|
23
|
+
GOOD = 1,
|
|
24
|
+
EXCELLENT = 2,
|
|
25
|
+
UNRECOGNIZED = -1
|
|
26
|
+
}
|
|
27
|
+
export declare function connectionQualityFromJSON(object: any): ConnectionQuality;
|
|
28
|
+
export declare function connectionQualityToJSON(object: ConnectionQuality): string;
|
|
11
29
|
export interface Room {
|
|
12
30
|
sid: string;
|
|
13
31
|
name: string;
|
|
@@ -16,6 +34,9 @@ export interface Room {
|
|
|
16
34
|
creationTime: number;
|
|
17
35
|
turnPassword: string;
|
|
18
36
|
enabledCodecs: Codec[];
|
|
37
|
+
metadata: string;
|
|
38
|
+
numParticipants: number;
|
|
39
|
+
activeRecording: boolean;
|
|
19
40
|
}
|
|
20
41
|
export interface Codec {
|
|
21
42
|
mime: string;
|
|
@@ -29,8 +50,8 @@ export interface ParticipantInfo {
|
|
|
29
50
|
metadata: string;
|
|
30
51
|
/** timestamp when participant joined room, in seconds */
|
|
31
52
|
joinedAt: number;
|
|
32
|
-
/** hidden participant (used for recording) */
|
|
33
53
|
hidden: boolean;
|
|
54
|
+
recorder: boolean;
|
|
34
55
|
}
|
|
35
56
|
export declare enum ParticipantInfo_State {
|
|
36
57
|
/** JOINING - websocket' connected, but not offered yet */
|
|
@@ -59,6 +80,10 @@ export interface TrackInfo {
|
|
|
59
80
|
height: number;
|
|
60
81
|
/** true if track is simulcasted */
|
|
61
82
|
simulcast: boolean;
|
|
83
|
+
/** true if DTX (Discontinuous Transmission) is disabled for audio */
|
|
84
|
+
disableDtx: boolean;
|
|
85
|
+
/** source of media */
|
|
86
|
+
source: TrackSource;
|
|
62
87
|
}
|
|
63
88
|
/** new DataPacket API */
|
|
64
89
|
export interface DataPacket {
|