livekit-server-sdk 1.0.1 → 1.0.3
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/.eslintrc.js +1 -1
- package/README.md +2 -0
- package/dist/EgressClient.d.ts +50 -12
- package/dist/EgressClient.js +39 -22
- package/dist/EgressClient.js.map +1 -1
- package/dist/RoomServiceClient.d.ts +8 -2
- package/dist/RoomServiceClient.js +3 -1
- package/dist/RoomServiceClient.js.map +1 -1
- package/dist/index.d.ts +2 -3
- package/dist/index.js +6 -8
- package/dist/index.js.map +1 -1
- package/dist/proto/livekit_egress.d.ts +250 -7
- package/dist/proto/livekit_egress.js +251 -18
- package/dist/proto/livekit_egress.js.map +1 -1
- package/dist/proto/livekit_ingress.d.ts +1803 -0
- package/dist/proto/livekit_ingress.js +1095 -0
- package/dist/proto/livekit_ingress.js.map +1 -0
- package/dist/proto/livekit_models.d.ts +84 -0
- package/dist/proto/livekit_models.js +340 -37
- package/dist/proto/livekit_models.js.map +1 -1
- package/dist/proto/livekit_room.d.ts +818 -0
- package/dist/proto/livekit_room.js +94 -4
- package/dist/proto/livekit_room.js.map +1 -1
- package/dist/proto/livekit_webhook.d.ts +548 -58
- package/dist/proto/livekit_webhook.js +15 -19
- package/dist/proto/livekit_webhook.js.map +1 -1
- package/package.json +2 -2
- package/dist/RecordingServiceClient.d.ts +0 -25
- package/dist/RecordingServiceClient.js +0 -91
- package/dist/RecordingServiceClient.js.map +0 -1
- package/dist/proto/livekit_recording.d.ts +0 -361
- package/dist/proto/livekit_recording.js +0 -843
- package/dist/proto/livekit_recording.js.map +0 -1
|
@@ -27,16 +27,16 @@ exports.WebhookEvent = exports.protobufPackage = void 0;
|
|
|
27
27
|
const long_1 = __importDefault(require("long"));
|
|
28
28
|
const _m0 = __importStar(require("protobufjs/minimal"));
|
|
29
29
|
const livekit_models_1 = require("./livekit_models");
|
|
30
|
-
const livekit_recording_1 = require("./livekit_recording");
|
|
31
30
|
const livekit_egress_1 = require("./livekit_egress");
|
|
31
|
+
const livekit_ingress_1 = require("./livekit_ingress");
|
|
32
32
|
exports.protobufPackage = 'livekit';
|
|
33
33
|
function createBaseWebhookEvent() {
|
|
34
34
|
return {
|
|
35
35
|
event: '',
|
|
36
36
|
room: undefined,
|
|
37
37
|
participant: undefined,
|
|
38
|
-
recordingInfo: undefined,
|
|
39
38
|
egressInfo: undefined,
|
|
39
|
+
ingressInfo: undefined,
|
|
40
40
|
track: undefined,
|
|
41
41
|
id: '',
|
|
42
42
|
createdAt: 0,
|
|
@@ -53,12 +53,12 @@ exports.WebhookEvent = {
|
|
|
53
53
|
if (message.participant !== undefined) {
|
|
54
54
|
livekit_models_1.ParticipantInfo.encode(message.participant, writer.uint32(26).fork()).ldelim();
|
|
55
55
|
}
|
|
56
|
-
if (message.recordingInfo !== undefined) {
|
|
57
|
-
livekit_recording_1.RecordingInfo.encode(message.recordingInfo, writer.uint32(42).fork()).ldelim();
|
|
58
|
-
}
|
|
59
56
|
if (message.egressInfo !== undefined) {
|
|
60
57
|
livekit_egress_1.EgressInfo.encode(message.egressInfo, writer.uint32(74).fork()).ldelim();
|
|
61
58
|
}
|
|
59
|
+
if (message.ingressInfo !== undefined) {
|
|
60
|
+
livekit_ingress_1.IngressInfo.encode(message.ingressInfo, writer.uint32(82).fork()).ldelim();
|
|
61
|
+
}
|
|
62
62
|
if (message.track !== undefined) {
|
|
63
63
|
livekit_models_1.TrackInfo.encode(message.track, writer.uint32(66).fork()).ldelim();
|
|
64
64
|
}
|
|
@@ -86,12 +86,12 @@ exports.WebhookEvent = {
|
|
|
86
86
|
case 3:
|
|
87
87
|
message.participant = livekit_models_1.ParticipantInfo.decode(reader, reader.uint32());
|
|
88
88
|
break;
|
|
89
|
-
case 5:
|
|
90
|
-
message.recordingInfo = livekit_recording_1.RecordingInfo.decode(reader, reader.uint32());
|
|
91
|
-
break;
|
|
92
89
|
case 9:
|
|
93
90
|
message.egressInfo = livekit_egress_1.EgressInfo.decode(reader, reader.uint32());
|
|
94
91
|
break;
|
|
92
|
+
case 10:
|
|
93
|
+
message.ingressInfo = livekit_ingress_1.IngressInfo.decode(reader, reader.uint32());
|
|
94
|
+
break;
|
|
95
95
|
case 8:
|
|
96
96
|
message.track = livekit_models_1.TrackInfo.decode(reader, reader.uint32());
|
|
97
97
|
break;
|
|
@@ -115,10 +115,8 @@ exports.WebhookEvent = {
|
|
|
115
115
|
participant: isSet(object.participant)
|
|
116
116
|
? livekit_models_1.ParticipantInfo.fromJSON(object.participant)
|
|
117
117
|
: undefined,
|
|
118
|
-
recordingInfo: isSet(object.recordingInfo)
|
|
119
|
-
? livekit_recording_1.RecordingInfo.fromJSON(object.recordingInfo)
|
|
120
|
-
: undefined,
|
|
121
118
|
egressInfo: isSet(object.egressInfo) ? livekit_egress_1.EgressInfo.fromJSON(object.egressInfo) : undefined,
|
|
119
|
+
ingressInfo: isSet(object.ingressInfo) ? livekit_ingress_1.IngressInfo.fromJSON(object.ingressInfo) : undefined,
|
|
122
120
|
track: isSet(object.track) ? livekit_models_1.TrackInfo.fromJSON(object.track) : undefined,
|
|
123
121
|
id: isSet(object.id) ? String(object.id) : '',
|
|
124
122
|
createdAt: isSet(object.createdAt) ? Number(object.createdAt) : 0,
|
|
@@ -132,12 +130,10 @@ exports.WebhookEvent = {
|
|
|
132
130
|
(obj.participant = message.participant
|
|
133
131
|
? livekit_models_1.ParticipantInfo.toJSON(message.participant)
|
|
134
132
|
: undefined);
|
|
135
|
-
message.recordingInfo !== undefined &&
|
|
136
|
-
(obj.recordingInfo = message.recordingInfo
|
|
137
|
-
? livekit_recording_1.RecordingInfo.toJSON(message.recordingInfo)
|
|
138
|
-
: undefined);
|
|
139
133
|
message.egressInfo !== undefined &&
|
|
140
134
|
(obj.egressInfo = message.egressInfo ? livekit_egress_1.EgressInfo.toJSON(message.egressInfo) : undefined);
|
|
135
|
+
message.ingressInfo !== undefined &&
|
|
136
|
+
(obj.ingressInfo = message.ingressInfo ? livekit_ingress_1.IngressInfo.toJSON(message.ingressInfo) : undefined);
|
|
141
137
|
message.track !== undefined &&
|
|
142
138
|
(obj.track = message.track ? livekit_models_1.TrackInfo.toJSON(message.track) : undefined);
|
|
143
139
|
message.id !== undefined && (obj.id = message.id);
|
|
@@ -154,14 +150,14 @@ exports.WebhookEvent = {
|
|
|
154
150
|
object.participant !== undefined && object.participant !== null
|
|
155
151
|
? livekit_models_1.ParticipantInfo.fromPartial(object.participant)
|
|
156
152
|
: undefined;
|
|
157
|
-
message.recordingInfo =
|
|
158
|
-
object.recordingInfo !== undefined && object.recordingInfo !== null
|
|
159
|
-
? livekit_recording_1.RecordingInfo.fromPartial(object.recordingInfo)
|
|
160
|
-
: undefined;
|
|
161
153
|
message.egressInfo =
|
|
162
154
|
object.egressInfo !== undefined && object.egressInfo !== null
|
|
163
155
|
? livekit_egress_1.EgressInfo.fromPartial(object.egressInfo)
|
|
164
156
|
: undefined;
|
|
157
|
+
message.ingressInfo =
|
|
158
|
+
object.ingressInfo !== undefined && object.ingressInfo !== null
|
|
159
|
+
? livekit_ingress_1.IngressInfo.fromPartial(object.ingressInfo)
|
|
160
|
+
: undefined;
|
|
165
161
|
message.track =
|
|
166
162
|
object.track !== undefined && object.track !== null
|
|
167
163
|
? livekit_models_1.TrackInfo.fromPartial(object.track)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"livekit_webhook.js","sourceRoot":"","sources":["../../src/proto/livekit_webhook.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oBAAoB;AACpB,gDAAwB;AACxB,wDAA0C;AAC1C,qDAAoE;AACpE,
|
|
1
|
+
{"version":3,"file":"livekit_webhook.js","sourceRoot":"","sources":["../../src/proto/livekit_webhook.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oBAAoB;AACpB,gDAAwB;AACxB,wDAA0C;AAC1C,qDAAoE;AACpE,qDAA8C;AAC9C,uDAAgD;AAEnC,QAAA,eAAe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AAO,UAAU,KAAK,WAAW;QAAE,OAAO,UAAU,CAAC;IACzD,IAAI,OAAO,IAAI,KAAK,WAAW;QAAE,OAAO,IAAI,CAAC;IAC7C,IAAI,OAAO,MAAM,KAAK,WAAW;QAAE,OAAO,MAAM,CAAC;IACjD,IAAI,OAAO,MAAM,KAAK,WAAW;QAAE,OAAO,MAAM,CAAC;IACjD,MAAM,gCAAgC,CAAC;AACzC,CAAC,CAAC,EAAE,CAAC;AAmBL,SAAS,YAAY,CAAC,IAAU;IAC9B,IAAI,IAAI,CAAC,EAAE,CAAC,MAAM,CAAC,gBAAgB,CAAC,EAAE;QACpC,MAAM,IAAI,UAAU,CAAC,KAAK,CAAC,8CAA8C,CAAC,CAAC;KAC5E;IACD,OAAO,IAAI,CAAC,QAAQ,EAAE,CAAC;AACzB,CAAC;AAED,IAAI,GAAG,CAAC,IAAI,CAAC,IAAI,KAAK,cAAI,EAAE;IAC1B,GAAG,CAAC,IAAI,CAAC,IAAI,GAAG,cAAW,CAAC;IAC5B,GAAG,CAAC,SAAS,EAAE,CAAC;CACjB;AAED,SAAS,KAAK,CAAC,KAAU;IACvB,OAAO,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,CAAC;AAC/C,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "livekit-server-sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Server-side SDK for LiveKit",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"build": "tsc",
|
|
12
12
|
"build:watch": "tsc --watch",
|
|
13
13
|
"build-docs": "typedoc",
|
|
14
|
-
"proto": "protoc --plugin=node_modules/ts-proto/protoc-gen-ts_proto --ts_proto_opt=esModuleInterop=true --ts_proto_out=./src/proto
|
|
14
|
+
"proto": "protoc --plugin=node_modules/ts-proto/protoc-gen-ts_proto --ts_proto_opt=esModuleInterop=true,useOptionals=messages,outputClientImpl=false --ts_proto_out=./src/proto -I./protocol ./protocol/livekit_egress.proto ./protocol/livekit_room.proto ./protocol/livekit_webhook.proto",
|
|
15
15
|
"lint": "eslint .",
|
|
16
16
|
"format": "prettier --write src",
|
|
17
17
|
"format:check": "prettier --check src",
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { RecordingTemplate, RtmpOutput, RecordingOptions } from './proto/livekit_recording';
|
|
2
|
-
/**
|
|
3
|
-
* Client to access Recording APIs
|
|
4
|
-
*/
|
|
5
|
-
export default class RecordingServiceClient {
|
|
6
|
-
private readonly rpc;
|
|
7
|
-
private readonly apiKey?;
|
|
8
|
-
private readonly secret?;
|
|
9
|
-
/**
|
|
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
|
-
*/
|
|
14
|
-
constructor(host: string, apiKey?: string, secret?: string);
|
|
15
|
-
/**
|
|
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>;
|
|
23
|
-
endRecording(recordingId: string): Promise<void>;
|
|
24
|
-
private authHeader;
|
|
25
|
-
}
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
const AccessToken_1 = require("./AccessToken");
|
|
13
|
-
const livekit_recording_1 = require("./proto/livekit_recording");
|
|
14
|
-
const TwirpRPC_1 = require("./TwirpRPC");
|
|
15
|
-
const svc = 'RecordingService';
|
|
16
|
-
/**
|
|
17
|
-
* Client to access Recording APIs
|
|
18
|
-
*/
|
|
19
|
-
class RecordingServiceClient {
|
|
20
|
-
/**
|
|
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
|
-
*/
|
|
25
|
-
constructor(host, apiKey, secret) {
|
|
26
|
-
this.rpc = new TwirpRPC_1.TwirpRpc(host, TwirpRPC_1.livekitPackage);
|
|
27
|
-
this.apiKey = apiKey;
|
|
28
|
-
this.secret = secret;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* @param input input url or recording template
|
|
32
|
-
* @param output output filepath or RtmpOutput
|
|
33
|
-
* @param options recording options
|
|
34
|
-
*/
|
|
35
|
-
startRecording(input, output, options) {
|
|
36
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
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,
|
|
55
|
-
template,
|
|
56
|
-
rtmp,
|
|
57
|
-
filepath,
|
|
58
|
-
options,
|
|
59
|
-
});
|
|
60
|
-
const data = yield this.rpc.request(svc, 'StartRecording', req, this.authHeader({ roomRecord: true }));
|
|
61
|
-
return livekit_recording_1.StartRecordingResponse.fromJSON(data).recordingId;
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
addOutput(recordingId, rtmpUrl) {
|
|
65
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
66
|
-
const req = livekit_recording_1.AddOutputRequest.toJSON({ recordingId, rtmpUrl });
|
|
67
|
-
yield this.rpc.request(svc, 'AddOutput', req, this.authHeader({ roomRecord: true }));
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
removeOutput(recordingId, rtmpUrl) {
|
|
71
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
72
|
-
const req = livekit_recording_1.RemoveOutputRequest.toJSON({ recordingId, rtmpUrl });
|
|
73
|
-
yield this.rpc.request(svc, 'RemoveOutput', req, this.authHeader({ roomRecord: true }));
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
endRecording(recordingId) {
|
|
77
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
78
|
-
const req = livekit_recording_1.EndRecordingRequest.toJSON({ recordingId });
|
|
79
|
-
yield this.rpc.request(svc, 'EndRecording', req, this.authHeader({ roomRecord: true }));
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
authHeader(grant) {
|
|
83
|
-
const at = new AccessToken_1.AccessToken(this.apiKey, this.secret, { ttl: '10m' });
|
|
84
|
-
at.addGrant(grant);
|
|
85
|
-
return {
|
|
86
|
-
Authorization: `Bearer ${at.toJwt()}`,
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
exports.default = RecordingServiceClient;
|
|
91
|
-
//# sourceMappingURL=RecordingServiceClient.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RecordingServiceClient.js","sourceRoot":"","sources":["../src/RecordingServiceClient.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+CAA4C;AAE5C,iEASmC;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,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE;gBAC9B,QAAQ,GAAG,MAAM,CAAC;aACnB;iBAAM;gBACL,IAAI,GAAG,MAAM,CAAC;aACf;YAED,MAAM,GAAG,GAAG,yCAAqB,CAAC,MAAM,CAAC;gBACvC,GAAG;gBACH,QAAQ;gBACR,IAAI;gBACJ,QAAQ;gBACR,OAAO;aACR,CAAC,CAAC;YACH,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,OAAO,CACjC,GAAG,EAC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AAC,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;AAlFD,yCAkFC"}
|
|
@@ -1,361 +0,0 @@
|
|
|
1
|
-
import * as _m0 from 'protobufjs/minimal';
|
|
2
|
-
import { Empty } from './google/protobuf/empty';
|
|
3
|
-
export declare const protobufPackage = "livekit";
|
|
4
|
-
export declare enum RecordingPreset {
|
|
5
|
-
/** NONE - All presets use 44100 Hz, 128k bitrate for audio and a color depth of 24 */
|
|
6
|
-
NONE = 0,
|
|
7
|
-
/** HD_30 - 720p, 30fps, 3000 kpbs */
|
|
8
|
-
HD_30 = 1,
|
|
9
|
-
/** HD_60 - 720p, 60fps, 4500 kbps */
|
|
10
|
-
HD_60 = 2,
|
|
11
|
-
/** FULL_HD_30 - 1080p, 30fps, 4500 kbps */
|
|
12
|
-
FULL_HD_30 = 3,
|
|
13
|
-
/** FULL_HD_60 - 1080p, 60fps, 6000 kbps */
|
|
14
|
-
FULL_HD_60 = 4,
|
|
15
|
-
UNRECOGNIZED = -1
|
|
16
|
-
}
|
|
17
|
-
export declare function recordingPresetFromJSON(object: any): RecordingPreset;
|
|
18
|
-
export declare function recordingPresetToJSON(object: RecordingPreset): string;
|
|
19
|
-
export interface StartRecordingRequest {
|
|
20
|
-
url: string | undefined;
|
|
21
|
-
template?: RecordingTemplate | undefined;
|
|
22
|
-
rtmp?: RtmpOutput | undefined;
|
|
23
|
-
filepath: string | undefined;
|
|
24
|
-
options?: RecordingOptions;
|
|
25
|
-
}
|
|
26
|
-
export interface RecordingTemplate {
|
|
27
|
-
layout: string;
|
|
28
|
-
roomName: string;
|
|
29
|
-
/** defaults to https://recorder.livekit.io */
|
|
30
|
-
baseUrl: string;
|
|
31
|
-
}
|
|
32
|
-
export interface RtmpOutput {
|
|
33
|
-
urls: string[];
|
|
34
|
-
}
|
|
35
|
-
export interface RecordingOptions {
|
|
36
|
-
preset: RecordingPreset;
|
|
37
|
-
/** default 1920 */
|
|
38
|
-
width: number;
|
|
39
|
-
/** default 1080 */
|
|
40
|
-
height: number;
|
|
41
|
-
/** default 24 */
|
|
42
|
-
depth: number;
|
|
43
|
-
/** default 30 */
|
|
44
|
-
framerate: number;
|
|
45
|
-
/** default 128 */
|
|
46
|
-
audioBitrate: number;
|
|
47
|
-
/** default 44100 */
|
|
48
|
-
audioFrequency: number;
|
|
49
|
-
/** default 4500 */
|
|
50
|
-
videoBitrate: number;
|
|
51
|
-
/** baseline, main, or high. default main */
|
|
52
|
-
profile: string;
|
|
53
|
-
}
|
|
54
|
-
export interface StartRecordingResponse {
|
|
55
|
-
recordingId: string;
|
|
56
|
-
}
|
|
57
|
-
export interface AddOutputRequest {
|
|
58
|
-
recordingId: string;
|
|
59
|
-
rtmpUrl: string;
|
|
60
|
-
}
|
|
61
|
-
export interface RemoveOutputRequest {
|
|
62
|
-
recordingId: string;
|
|
63
|
-
rtmpUrl: string;
|
|
64
|
-
}
|
|
65
|
-
export interface EndRecordingRequest {
|
|
66
|
-
recordingId: string;
|
|
67
|
-
}
|
|
68
|
-
export interface RecordingInfo {
|
|
69
|
-
id: string;
|
|
70
|
-
roomName: string;
|
|
71
|
-
active: boolean;
|
|
72
|
-
error: string;
|
|
73
|
-
file?: FileResult;
|
|
74
|
-
rtmp: RtmpResult[];
|
|
75
|
-
}
|
|
76
|
-
export interface FileResult {
|
|
77
|
-
downloadUrl: string;
|
|
78
|
-
duration: number;
|
|
79
|
-
}
|
|
80
|
-
export interface RtmpResult {
|
|
81
|
-
streamUrl: string;
|
|
82
|
-
duration: number;
|
|
83
|
-
}
|
|
84
|
-
export declare const StartRecordingRequest: {
|
|
85
|
-
encode(message: StartRecordingRequest, writer?: _m0.Writer): _m0.Writer;
|
|
86
|
-
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): StartRecordingRequest;
|
|
87
|
-
fromJSON(object: any): StartRecordingRequest;
|
|
88
|
-
toJSON(message: StartRecordingRequest): unknown;
|
|
89
|
-
fromPartial<I extends {
|
|
90
|
-
url?: string | undefined;
|
|
91
|
-
template?: {
|
|
92
|
-
layout?: string | undefined;
|
|
93
|
-
roomName?: string | undefined;
|
|
94
|
-
baseUrl?: string | undefined;
|
|
95
|
-
} | undefined;
|
|
96
|
-
rtmp?: {
|
|
97
|
-
urls?: string[] | undefined;
|
|
98
|
-
} | undefined;
|
|
99
|
-
filepath?: string | undefined;
|
|
100
|
-
options?: {
|
|
101
|
-
preset?: RecordingPreset | undefined;
|
|
102
|
-
width?: number | undefined;
|
|
103
|
-
height?: number | undefined;
|
|
104
|
-
depth?: number | undefined;
|
|
105
|
-
framerate?: number | undefined;
|
|
106
|
-
audioBitrate?: number | undefined;
|
|
107
|
-
audioFrequency?: number | undefined;
|
|
108
|
-
videoBitrate?: number | undefined;
|
|
109
|
-
profile?: string | undefined;
|
|
110
|
-
} | undefined;
|
|
111
|
-
} & {
|
|
112
|
-
url?: string | undefined;
|
|
113
|
-
template?: ({
|
|
114
|
-
layout?: string | undefined;
|
|
115
|
-
roomName?: string | undefined;
|
|
116
|
-
baseUrl?: string | undefined;
|
|
117
|
-
} & {
|
|
118
|
-
layout?: string | undefined;
|
|
119
|
-
roomName?: string | undefined;
|
|
120
|
-
baseUrl?: string | undefined;
|
|
121
|
-
} & Record<Exclude<keyof I["template"], keyof RecordingTemplate>, never>) | undefined;
|
|
122
|
-
rtmp?: ({
|
|
123
|
-
urls?: string[] | undefined;
|
|
124
|
-
} & {
|
|
125
|
-
urls?: (string[] & string[] & Record<Exclude<keyof I["rtmp"]["urls"], number | keyof string[]>, never>) | undefined;
|
|
126
|
-
} & Record<Exclude<keyof I["rtmp"], "urls">, never>) | undefined;
|
|
127
|
-
filepath?: string | undefined;
|
|
128
|
-
options?: ({
|
|
129
|
-
preset?: RecordingPreset | undefined;
|
|
130
|
-
width?: number | undefined;
|
|
131
|
-
height?: number | undefined;
|
|
132
|
-
depth?: number | undefined;
|
|
133
|
-
framerate?: number | undefined;
|
|
134
|
-
audioBitrate?: number | undefined;
|
|
135
|
-
audioFrequency?: number | undefined;
|
|
136
|
-
videoBitrate?: number | undefined;
|
|
137
|
-
profile?: string | undefined;
|
|
138
|
-
} & {
|
|
139
|
-
preset?: RecordingPreset | undefined;
|
|
140
|
-
width?: number | undefined;
|
|
141
|
-
height?: number | undefined;
|
|
142
|
-
depth?: number | undefined;
|
|
143
|
-
framerate?: number | undefined;
|
|
144
|
-
audioBitrate?: number | undefined;
|
|
145
|
-
audioFrequency?: number | undefined;
|
|
146
|
-
videoBitrate?: number | undefined;
|
|
147
|
-
profile?: string | undefined;
|
|
148
|
-
} & Record<Exclude<keyof I["options"], keyof RecordingOptions>, never>) | undefined;
|
|
149
|
-
} & Record<Exclude<keyof I, keyof StartRecordingRequest>, never>>(object: I): StartRecordingRequest;
|
|
150
|
-
};
|
|
151
|
-
export declare const RecordingTemplate: {
|
|
152
|
-
encode(message: RecordingTemplate, writer?: _m0.Writer): _m0.Writer;
|
|
153
|
-
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): RecordingTemplate;
|
|
154
|
-
fromJSON(object: any): RecordingTemplate;
|
|
155
|
-
toJSON(message: RecordingTemplate): unknown;
|
|
156
|
-
fromPartial<I extends {
|
|
157
|
-
layout?: string | undefined;
|
|
158
|
-
roomName?: string | undefined;
|
|
159
|
-
baseUrl?: string | undefined;
|
|
160
|
-
} & {
|
|
161
|
-
layout?: string | undefined;
|
|
162
|
-
roomName?: string | undefined;
|
|
163
|
-
baseUrl?: string | undefined;
|
|
164
|
-
} & Record<Exclude<keyof I, keyof RecordingTemplate>, never>>(object: I): RecordingTemplate;
|
|
165
|
-
};
|
|
166
|
-
export declare const RtmpOutput: {
|
|
167
|
-
encode(message: RtmpOutput, writer?: _m0.Writer): _m0.Writer;
|
|
168
|
-
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): RtmpOutput;
|
|
169
|
-
fromJSON(object: any): RtmpOutput;
|
|
170
|
-
toJSON(message: RtmpOutput): unknown;
|
|
171
|
-
fromPartial<I extends {
|
|
172
|
-
urls?: string[] | undefined;
|
|
173
|
-
} & {
|
|
174
|
-
urls?: (string[] & string[] & Record<Exclude<keyof I["urls"], number | keyof string[]>, never>) | undefined;
|
|
175
|
-
} & Record<Exclude<keyof I, "urls">, never>>(object: I): RtmpOutput;
|
|
176
|
-
};
|
|
177
|
-
export declare const RecordingOptions: {
|
|
178
|
-
encode(message: RecordingOptions, writer?: _m0.Writer): _m0.Writer;
|
|
179
|
-
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): RecordingOptions;
|
|
180
|
-
fromJSON(object: any): RecordingOptions;
|
|
181
|
-
toJSON(message: RecordingOptions): unknown;
|
|
182
|
-
fromPartial<I extends {
|
|
183
|
-
preset?: RecordingPreset | undefined;
|
|
184
|
-
width?: number | undefined;
|
|
185
|
-
height?: number | undefined;
|
|
186
|
-
depth?: number | undefined;
|
|
187
|
-
framerate?: number | undefined;
|
|
188
|
-
audioBitrate?: number | undefined;
|
|
189
|
-
audioFrequency?: number | undefined;
|
|
190
|
-
videoBitrate?: number | undefined;
|
|
191
|
-
profile?: string | undefined;
|
|
192
|
-
} & {
|
|
193
|
-
preset?: RecordingPreset | undefined;
|
|
194
|
-
width?: number | undefined;
|
|
195
|
-
height?: number | undefined;
|
|
196
|
-
depth?: number | undefined;
|
|
197
|
-
framerate?: number | undefined;
|
|
198
|
-
audioBitrate?: number | undefined;
|
|
199
|
-
audioFrequency?: number | undefined;
|
|
200
|
-
videoBitrate?: number | undefined;
|
|
201
|
-
profile?: string | undefined;
|
|
202
|
-
} & Record<Exclude<keyof I, keyof RecordingOptions>, never>>(object: I): RecordingOptions;
|
|
203
|
-
};
|
|
204
|
-
export declare const StartRecordingResponse: {
|
|
205
|
-
encode(message: StartRecordingResponse, writer?: _m0.Writer): _m0.Writer;
|
|
206
|
-
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): StartRecordingResponse;
|
|
207
|
-
fromJSON(object: any): StartRecordingResponse;
|
|
208
|
-
toJSON(message: StartRecordingResponse): unknown;
|
|
209
|
-
fromPartial<I extends {
|
|
210
|
-
recordingId?: string | undefined;
|
|
211
|
-
} & {
|
|
212
|
-
recordingId?: string | undefined;
|
|
213
|
-
} & Record<Exclude<keyof I, "recordingId">, never>>(object: I): StartRecordingResponse;
|
|
214
|
-
};
|
|
215
|
-
export declare const AddOutputRequest: {
|
|
216
|
-
encode(message: AddOutputRequest, writer?: _m0.Writer): _m0.Writer;
|
|
217
|
-
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): AddOutputRequest;
|
|
218
|
-
fromJSON(object: any): AddOutputRequest;
|
|
219
|
-
toJSON(message: AddOutputRequest): unknown;
|
|
220
|
-
fromPartial<I extends {
|
|
221
|
-
recordingId?: string | undefined;
|
|
222
|
-
rtmpUrl?: string | undefined;
|
|
223
|
-
} & {
|
|
224
|
-
recordingId?: string | undefined;
|
|
225
|
-
rtmpUrl?: string | undefined;
|
|
226
|
-
} & Record<Exclude<keyof I, keyof AddOutputRequest>, never>>(object: I): AddOutputRequest;
|
|
227
|
-
};
|
|
228
|
-
export declare const RemoveOutputRequest: {
|
|
229
|
-
encode(message: RemoveOutputRequest, writer?: _m0.Writer): _m0.Writer;
|
|
230
|
-
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): RemoveOutputRequest;
|
|
231
|
-
fromJSON(object: any): RemoveOutputRequest;
|
|
232
|
-
toJSON(message: RemoveOutputRequest): unknown;
|
|
233
|
-
fromPartial<I extends {
|
|
234
|
-
recordingId?: string | undefined;
|
|
235
|
-
rtmpUrl?: string | undefined;
|
|
236
|
-
} & {
|
|
237
|
-
recordingId?: string | undefined;
|
|
238
|
-
rtmpUrl?: string | undefined;
|
|
239
|
-
} & Record<Exclude<keyof I, keyof RemoveOutputRequest>, never>>(object: I): RemoveOutputRequest;
|
|
240
|
-
};
|
|
241
|
-
export declare const EndRecordingRequest: {
|
|
242
|
-
encode(message: EndRecordingRequest, writer?: _m0.Writer): _m0.Writer;
|
|
243
|
-
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): EndRecordingRequest;
|
|
244
|
-
fromJSON(object: any): EndRecordingRequest;
|
|
245
|
-
toJSON(message: EndRecordingRequest): unknown;
|
|
246
|
-
fromPartial<I extends {
|
|
247
|
-
recordingId?: string | undefined;
|
|
248
|
-
} & {
|
|
249
|
-
recordingId?: string | undefined;
|
|
250
|
-
} & Record<Exclude<keyof I, "recordingId">, never>>(object: I): EndRecordingRequest;
|
|
251
|
-
};
|
|
252
|
-
export declare const RecordingInfo: {
|
|
253
|
-
encode(message: RecordingInfo, writer?: _m0.Writer): _m0.Writer;
|
|
254
|
-
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): RecordingInfo;
|
|
255
|
-
fromJSON(object: any): RecordingInfo;
|
|
256
|
-
toJSON(message: RecordingInfo): unknown;
|
|
257
|
-
fromPartial<I extends {
|
|
258
|
-
id?: string | undefined;
|
|
259
|
-
roomName?: string | undefined;
|
|
260
|
-
active?: boolean | undefined;
|
|
261
|
-
error?: string | undefined;
|
|
262
|
-
file?: {
|
|
263
|
-
downloadUrl?: string | undefined;
|
|
264
|
-
duration?: number | undefined;
|
|
265
|
-
} | undefined;
|
|
266
|
-
rtmp?: {
|
|
267
|
-
streamUrl?: string | undefined;
|
|
268
|
-
duration?: number | undefined;
|
|
269
|
-
}[] | undefined;
|
|
270
|
-
} & {
|
|
271
|
-
id?: string | undefined;
|
|
272
|
-
roomName?: string | undefined;
|
|
273
|
-
active?: boolean | undefined;
|
|
274
|
-
error?: string | undefined;
|
|
275
|
-
file?: ({
|
|
276
|
-
downloadUrl?: string | undefined;
|
|
277
|
-
duration?: number | undefined;
|
|
278
|
-
} & {
|
|
279
|
-
downloadUrl?: string | undefined;
|
|
280
|
-
duration?: number | undefined;
|
|
281
|
-
} & Record<Exclude<keyof I["file"], keyof FileResult>, never>) | undefined;
|
|
282
|
-
rtmp?: ({
|
|
283
|
-
streamUrl?: string | undefined;
|
|
284
|
-
duration?: number | undefined;
|
|
285
|
-
}[] & ({
|
|
286
|
-
streamUrl?: string | undefined;
|
|
287
|
-
duration?: number | undefined;
|
|
288
|
-
} & {
|
|
289
|
-
streamUrl?: string | undefined;
|
|
290
|
-
duration?: number | undefined;
|
|
291
|
-
} & Record<Exclude<keyof I["rtmp"][number], keyof RtmpResult>, never>)[] & Record<Exclude<keyof I["rtmp"], number | keyof {
|
|
292
|
-
streamUrl?: string | undefined;
|
|
293
|
-
duration?: number | undefined;
|
|
294
|
-
}[]>, never>) | undefined;
|
|
295
|
-
} & Record<Exclude<keyof I, keyof RecordingInfo>, never>>(object: I): RecordingInfo;
|
|
296
|
-
};
|
|
297
|
-
export declare const FileResult: {
|
|
298
|
-
encode(message: FileResult, writer?: _m0.Writer): _m0.Writer;
|
|
299
|
-
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): FileResult;
|
|
300
|
-
fromJSON(object: any): FileResult;
|
|
301
|
-
toJSON(message: FileResult): unknown;
|
|
302
|
-
fromPartial<I extends {
|
|
303
|
-
downloadUrl?: string | undefined;
|
|
304
|
-
duration?: number | undefined;
|
|
305
|
-
} & {
|
|
306
|
-
downloadUrl?: string | undefined;
|
|
307
|
-
duration?: number | undefined;
|
|
308
|
-
} & Record<Exclude<keyof I, keyof FileResult>, never>>(object: I): FileResult;
|
|
309
|
-
};
|
|
310
|
-
export declare const RtmpResult: {
|
|
311
|
-
encode(message: RtmpResult, writer?: _m0.Writer): _m0.Writer;
|
|
312
|
-
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): RtmpResult;
|
|
313
|
-
fromJSON(object: any): RtmpResult;
|
|
314
|
-
toJSON(message: RtmpResult): unknown;
|
|
315
|
-
fromPartial<I extends {
|
|
316
|
-
streamUrl?: string | undefined;
|
|
317
|
-
duration?: number | undefined;
|
|
318
|
-
} & {
|
|
319
|
-
streamUrl?: string | undefined;
|
|
320
|
-
duration?: number | undefined;
|
|
321
|
-
} & Record<Exclude<keyof I, keyof RtmpResult>, never>>(object: I): RtmpResult;
|
|
322
|
-
};
|
|
323
|
-
/**
|
|
324
|
-
* Recording service that can be performed on any node
|
|
325
|
-
* they are Twirp-based HTTP req/responses
|
|
326
|
-
*/
|
|
327
|
-
export interface RecordingService {
|
|
328
|
-
/**
|
|
329
|
-
* Starts a room
|
|
330
|
-
*
|
|
331
|
-
* @deprecated
|
|
332
|
-
*/
|
|
333
|
-
StartRecording(request: StartRecordingRequest): Promise<StartRecordingResponse>;
|
|
334
|
-
/**
|
|
335
|
-
* Adds an rtmp output to a live recording
|
|
336
|
-
*
|
|
337
|
-
* @deprecated
|
|
338
|
-
*/
|
|
339
|
-
AddOutput(request: AddOutputRequest): Promise<Empty>;
|
|
340
|
-
/**
|
|
341
|
-
* Removes an rtmp output from a live recording
|
|
342
|
-
*
|
|
343
|
-
* @deprecated
|
|
344
|
-
*/
|
|
345
|
-
RemoveOutput(request: RemoveOutputRequest): Promise<Empty>;
|
|
346
|
-
/**
|
|
347
|
-
* Ends a recording
|
|
348
|
-
*
|
|
349
|
-
* @deprecated
|
|
350
|
-
*/
|
|
351
|
-
EndRecording(request: EndRecordingRequest): Promise<Empty>;
|
|
352
|
-
}
|
|
353
|
-
declare type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
354
|
-
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 {} ? {
|
|
355
|
-
[K in keyof T]?: DeepPartial<T[K]>;
|
|
356
|
-
} : Partial<T>;
|
|
357
|
-
declare type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
358
|
-
export declare type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
|
359
|
-
[K in keyof P]: Exact<P[K], I[K]>;
|
|
360
|
-
} & Record<Exclude<keyof I, KeysOfUnion<P>>, never>;
|
|
361
|
-
export {};
|