livekit-server-sdk 0.5.8 → 1.0.0
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/.github/workflows/test.yaml +3 -0
- package/.prettierignore +7 -0
- package/README.md +13 -9
- package/dist/AccessToken.d.ts +5 -0
- package/dist/AccessToken.js +7 -1
- package/dist/AccessToken.js.map +1 -1
- package/dist/AccessToken.test.js +4 -0
- package/dist/AccessToken.test.js.map +1 -1
- package/dist/EgressClient.d.ts +60 -0
- package/dist/EgressClient.js +198 -0
- package/dist/EgressClient.js.map +1 -0
- package/dist/RecordingServiceClient.js +5 -1
- package/dist/RecordingServiceClient.js.map +1 -1
- package/dist/RoomServiceClient.d.ts +1 -2
- package/dist/RoomServiceClient.js.map +1 -1
- package/dist/TwirpRPC.js.map +1 -1
- package/dist/WebhookReceiver.test.js.map +1 -1
- package/dist/grants.d.ts +4 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/dist/proto/google/protobuf/empty.d.ts +6 -2
- package/dist/proto/google/protobuf/empty.js +32 -12
- package/dist/proto/google/protobuf/empty.js.map +1 -1
- package/dist/proto/google/protobuf/timestamp.d.ts +132 -0
- package/dist/proto/google/protobuf/timestamp.js +107 -0
- package/dist/proto/google/protobuf/timestamp.js.map +1 -0
- package/dist/proto/livekit_egress.d.ts +2283 -0
- package/dist/proto/livekit_egress.js +1819 -0
- package/dist/proto/livekit_egress.js.map +1 -0
- package/dist/proto/livekit_models.d.ts +675 -13
- package/dist/proto/livekit_models.js +1414 -838
- package/dist/proto/livekit_models.js.map +1 -1
- package/dist/proto/livekit_recording.d.ts +199 -17
- package/dist/proto/livekit_recording.js +284 -570
- package/dist/proto/livekit_recording.js.map +1 -1
- package/dist/proto/livekit_room.d.ts +566 -34
- package/dist/proto/livekit_room.js +302 -671
- package/dist/proto/livekit_room.js.map +1 -1
- package/dist/proto/livekit_webhook.d.ts +1031 -6
- package/dist/proto/livekit_webhook.js +106 -95
- package/dist/proto/livekit_webhook.js.map +1 -1
- package/package.json +12 -7
|
@@ -1,4 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
+
if (mod && mod.__esModule) return mod;
|
|
16
|
+
var result = {};
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
+
__setModuleDefault(result, mod);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
2
21
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
22
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
23
|
};
|
|
@@ -6,8 +25,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
25
|
exports.RtmpResult = exports.FileResult = exports.RecordingInfo = exports.EndRecordingRequest = exports.RemoveOutputRequest = exports.AddOutputRequest = exports.StartRecordingResponse = exports.RecordingOptions = exports.RtmpOutput = exports.RecordingTemplate = exports.StartRecordingRequest = exports.recordingPresetToJSON = exports.recordingPresetFromJSON = exports.RecordingPreset = exports.protobufPackage = void 0;
|
|
7
26
|
/* eslint-disable */
|
|
8
27
|
const long_1 = __importDefault(require("long"));
|
|
9
|
-
const
|
|
10
|
-
exports.protobufPackage =
|
|
28
|
+
const _m0 = __importStar(require("protobufjs/minimal"));
|
|
29
|
+
exports.protobufPackage = 'livekit';
|
|
11
30
|
var RecordingPreset;
|
|
12
31
|
(function (RecordingPreset) {
|
|
13
32
|
/** NONE - All presets use 44100 Hz, 128k bitrate for audio and a color depth of 24 */
|
|
@@ -25,22 +44,22 @@ var RecordingPreset;
|
|
|
25
44
|
function recordingPresetFromJSON(object) {
|
|
26
45
|
switch (object) {
|
|
27
46
|
case 0:
|
|
28
|
-
case
|
|
47
|
+
case 'NONE':
|
|
29
48
|
return RecordingPreset.NONE;
|
|
30
49
|
case 1:
|
|
31
|
-
case
|
|
50
|
+
case 'HD_30':
|
|
32
51
|
return RecordingPreset.HD_30;
|
|
33
52
|
case 2:
|
|
34
|
-
case
|
|
53
|
+
case 'HD_60':
|
|
35
54
|
return RecordingPreset.HD_60;
|
|
36
55
|
case 3:
|
|
37
|
-
case
|
|
56
|
+
case 'FULL_HD_30':
|
|
38
57
|
return RecordingPreset.FULL_HD_30;
|
|
39
58
|
case 4:
|
|
40
|
-
case
|
|
59
|
+
case 'FULL_HD_60':
|
|
41
60
|
return RecordingPreset.FULL_HD_60;
|
|
42
61
|
case -1:
|
|
43
|
-
case
|
|
62
|
+
case 'UNRECOGNIZED':
|
|
44
63
|
default:
|
|
45
64
|
return RecordingPreset.UNRECOGNIZED;
|
|
46
65
|
}
|
|
@@ -49,23 +68,31 @@ exports.recordingPresetFromJSON = recordingPresetFromJSON;
|
|
|
49
68
|
function recordingPresetToJSON(object) {
|
|
50
69
|
switch (object) {
|
|
51
70
|
case RecordingPreset.NONE:
|
|
52
|
-
return
|
|
71
|
+
return 'NONE';
|
|
53
72
|
case RecordingPreset.HD_30:
|
|
54
|
-
return
|
|
73
|
+
return 'HD_30';
|
|
55
74
|
case RecordingPreset.HD_60:
|
|
56
|
-
return
|
|
75
|
+
return 'HD_60';
|
|
57
76
|
case RecordingPreset.FULL_HD_30:
|
|
58
|
-
return
|
|
77
|
+
return 'FULL_HD_30';
|
|
59
78
|
case RecordingPreset.FULL_HD_60:
|
|
60
|
-
return
|
|
79
|
+
return 'FULL_HD_60';
|
|
61
80
|
default:
|
|
62
|
-
return
|
|
81
|
+
return 'UNKNOWN';
|
|
63
82
|
}
|
|
64
83
|
}
|
|
65
84
|
exports.recordingPresetToJSON = recordingPresetToJSON;
|
|
66
|
-
|
|
85
|
+
function createBaseStartRecordingRequest() {
|
|
86
|
+
return {
|
|
87
|
+
url: undefined,
|
|
88
|
+
template: undefined,
|
|
89
|
+
rtmp: undefined,
|
|
90
|
+
filepath: undefined,
|
|
91
|
+
options: undefined,
|
|
92
|
+
};
|
|
93
|
+
}
|
|
67
94
|
exports.StartRecordingRequest = {
|
|
68
|
-
encode(message, writer =
|
|
95
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
69
96
|
if (message.url !== undefined) {
|
|
70
97
|
writer.uint32(10).string(message.url);
|
|
71
98
|
}
|
|
@@ -84,9 +111,9 @@ exports.StartRecordingRequest = {
|
|
|
84
111
|
return writer;
|
|
85
112
|
},
|
|
86
113
|
decode(input, length) {
|
|
87
|
-
const reader = input instanceof
|
|
114
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
88
115
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
89
|
-
const message =
|
|
116
|
+
const message = createBaseStartRecordingRequest();
|
|
90
117
|
while (reader.pos < end) {
|
|
91
118
|
const tag = reader.uint32();
|
|
92
119
|
switch (tag >>> 3) {
|
|
@@ -113,108 +140,66 @@ exports.StartRecordingRequest = {
|
|
|
113
140
|
return message;
|
|
114
141
|
},
|
|
115
142
|
fromJSON(object) {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
}
|
|
123
|
-
if (object.template !== undefined && object.template !== null) {
|
|
124
|
-
message.template = exports.RecordingTemplate.fromJSON(object.template);
|
|
125
|
-
}
|
|
126
|
-
else {
|
|
127
|
-
message.template = undefined;
|
|
128
|
-
}
|
|
129
|
-
if (object.rtmp !== undefined && object.rtmp !== null) {
|
|
130
|
-
message.rtmp = exports.RtmpOutput.fromJSON(object.rtmp);
|
|
131
|
-
}
|
|
132
|
-
else {
|
|
133
|
-
message.rtmp = undefined;
|
|
134
|
-
}
|
|
135
|
-
if (object.filepath !== undefined && object.filepath !== null) {
|
|
136
|
-
message.filepath = String(object.filepath);
|
|
137
|
-
}
|
|
138
|
-
else {
|
|
139
|
-
message.filepath = undefined;
|
|
140
|
-
}
|
|
141
|
-
if (object.options !== undefined && object.options !== null) {
|
|
142
|
-
message.options = exports.RecordingOptions.fromJSON(object.options);
|
|
143
|
-
}
|
|
144
|
-
else {
|
|
145
|
-
message.options = undefined;
|
|
146
|
-
}
|
|
147
|
-
return message;
|
|
143
|
+
return {
|
|
144
|
+
url: isSet(object.url) ? String(object.url) : undefined,
|
|
145
|
+
template: isSet(object.template) ? exports.RecordingTemplate.fromJSON(object.template) : undefined,
|
|
146
|
+
rtmp: isSet(object.rtmp) ? exports.RtmpOutput.fromJSON(object.rtmp) : undefined,
|
|
147
|
+
filepath: isSet(object.filepath) ? String(object.filepath) : undefined,
|
|
148
|
+
options: isSet(object.options) ? exports.RecordingOptions.fromJSON(object.options) : undefined,
|
|
149
|
+
};
|
|
148
150
|
},
|
|
149
151
|
toJSON(message) {
|
|
150
152
|
const obj = {};
|
|
151
153
|
message.url !== undefined && (obj.url = message.url);
|
|
152
154
|
message.template !== undefined &&
|
|
153
|
-
(obj.template = message.template
|
|
154
|
-
? exports.RecordingTemplate.toJSON(message.template)
|
|
155
|
-
: undefined);
|
|
155
|
+
(obj.template = message.template ? exports.RecordingTemplate.toJSON(message.template) : undefined);
|
|
156
156
|
message.rtmp !== undefined &&
|
|
157
157
|
(obj.rtmp = message.rtmp ? exports.RtmpOutput.toJSON(message.rtmp) : undefined);
|
|
158
158
|
message.filepath !== undefined && (obj.filepath = message.filepath);
|
|
159
159
|
message.options !== undefined &&
|
|
160
|
-
(obj.options = message.options
|
|
161
|
-
? exports.RecordingOptions.toJSON(message.options)
|
|
162
|
-
: undefined);
|
|
160
|
+
(obj.options = message.options ? exports.RecordingOptions.toJSON(message.options) : undefined);
|
|
163
161
|
return obj;
|
|
164
162
|
},
|
|
165
163
|
fromPartial(object) {
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
else {
|
|
183
|
-
message.rtmp = undefined;
|
|
184
|
-
}
|
|
185
|
-
if (object.filepath !== undefined && object.filepath !== null) {
|
|
186
|
-
message.filepath = object.filepath;
|
|
187
|
-
}
|
|
188
|
-
else {
|
|
189
|
-
message.filepath = undefined;
|
|
190
|
-
}
|
|
191
|
-
if (object.options !== undefined && object.options !== null) {
|
|
192
|
-
message.options = exports.RecordingOptions.fromPartial(object.options);
|
|
193
|
-
}
|
|
194
|
-
else {
|
|
195
|
-
message.options = undefined;
|
|
196
|
-
}
|
|
164
|
+
var _a, _b;
|
|
165
|
+
const message = createBaseStartRecordingRequest();
|
|
166
|
+
message.url = (_a = object.url) !== null && _a !== void 0 ? _a : undefined;
|
|
167
|
+
message.template =
|
|
168
|
+
object.template !== undefined && object.template !== null
|
|
169
|
+
? exports.RecordingTemplate.fromPartial(object.template)
|
|
170
|
+
: undefined;
|
|
171
|
+
message.rtmp =
|
|
172
|
+
object.rtmp !== undefined && object.rtmp !== null
|
|
173
|
+
? exports.RtmpOutput.fromPartial(object.rtmp)
|
|
174
|
+
: undefined;
|
|
175
|
+
message.filepath = (_b = object.filepath) !== null && _b !== void 0 ? _b : undefined;
|
|
176
|
+
message.options =
|
|
177
|
+
object.options !== undefined && object.options !== null
|
|
178
|
+
? exports.RecordingOptions.fromPartial(object.options)
|
|
179
|
+
: undefined;
|
|
197
180
|
return message;
|
|
198
181
|
},
|
|
199
182
|
};
|
|
200
|
-
|
|
183
|
+
function createBaseRecordingTemplate() {
|
|
184
|
+
return { layout: '', roomName: '', baseUrl: '' };
|
|
185
|
+
}
|
|
201
186
|
exports.RecordingTemplate = {
|
|
202
|
-
encode(message, writer =
|
|
203
|
-
if (message.layout !==
|
|
187
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
188
|
+
if (message.layout !== '') {
|
|
204
189
|
writer.uint32(10).string(message.layout);
|
|
205
190
|
}
|
|
206
|
-
if (message.roomName !==
|
|
191
|
+
if (message.roomName !== '') {
|
|
207
192
|
writer.uint32(18).string(message.roomName);
|
|
208
193
|
}
|
|
209
|
-
if (message.baseUrl !==
|
|
194
|
+
if (message.baseUrl !== '') {
|
|
210
195
|
writer.uint32(26).string(message.baseUrl);
|
|
211
196
|
}
|
|
212
197
|
return writer;
|
|
213
198
|
},
|
|
214
199
|
decode(input, length) {
|
|
215
|
-
const reader = input instanceof
|
|
200
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
216
201
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
217
|
-
const message =
|
|
202
|
+
const message = createBaseRecordingTemplate();
|
|
218
203
|
while (reader.pos < end) {
|
|
219
204
|
const tag = reader.uint32();
|
|
220
205
|
switch (tag >>> 3) {
|
|
@@ -235,26 +220,11 @@ exports.RecordingTemplate = {
|
|
|
235
220
|
return message;
|
|
236
221
|
},
|
|
237
222
|
fromJSON(object) {
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
message.layout = "";
|
|
244
|
-
}
|
|
245
|
-
if (object.roomName !== undefined && object.roomName !== null) {
|
|
246
|
-
message.roomName = String(object.roomName);
|
|
247
|
-
}
|
|
248
|
-
else {
|
|
249
|
-
message.roomName = "";
|
|
250
|
-
}
|
|
251
|
-
if (object.baseUrl !== undefined && object.baseUrl !== null) {
|
|
252
|
-
message.baseUrl = String(object.baseUrl);
|
|
253
|
-
}
|
|
254
|
-
else {
|
|
255
|
-
message.baseUrl = "";
|
|
256
|
-
}
|
|
257
|
-
return message;
|
|
223
|
+
return {
|
|
224
|
+
layout: isSet(object.layout) ? String(object.layout) : '',
|
|
225
|
+
roomName: isSet(object.roomName) ? String(object.roomName) : '',
|
|
226
|
+
baseUrl: isSet(object.baseUrl) ? String(object.baseUrl) : '',
|
|
227
|
+
};
|
|
258
228
|
},
|
|
259
229
|
toJSON(message) {
|
|
260
230
|
const obj = {};
|
|
@@ -264,41 +234,28 @@ exports.RecordingTemplate = {
|
|
|
264
234
|
return obj;
|
|
265
235
|
},
|
|
266
236
|
fromPartial(object) {
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
message.layout = "";
|
|
273
|
-
}
|
|
274
|
-
if (object.roomName !== undefined && object.roomName !== null) {
|
|
275
|
-
message.roomName = object.roomName;
|
|
276
|
-
}
|
|
277
|
-
else {
|
|
278
|
-
message.roomName = "";
|
|
279
|
-
}
|
|
280
|
-
if (object.baseUrl !== undefined && object.baseUrl !== null) {
|
|
281
|
-
message.baseUrl = object.baseUrl;
|
|
282
|
-
}
|
|
283
|
-
else {
|
|
284
|
-
message.baseUrl = "";
|
|
285
|
-
}
|
|
237
|
+
var _a, _b, _c;
|
|
238
|
+
const message = createBaseRecordingTemplate();
|
|
239
|
+
message.layout = (_a = object.layout) !== null && _a !== void 0 ? _a : '';
|
|
240
|
+
message.roomName = (_b = object.roomName) !== null && _b !== void 0 ? _b : '';
|
|
241
|
+
message.baseUrl = (_c = object.baseUrl) !== null && _c !== void 0 ? _c : '';
|
|
286
242
|
return message;
|
|
287
243
|
},
|
|
288
244
|
};
|
|
289
|
-
|
|
245
|
+
function createBaseRtmpOutput() {
|
|
246
|
+
return { urls: [] };
|
|
247
|
+
}
|
|
290
248
|
exports.RtmpOutput = {
|
|
291
|
-
encode(message, writer =
|
|
249
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
292
250
|
for (const v of message.urls) {
|
|
293
251
|
writer.uint32(10).string(v);
|
|
294
252
|
}
|
|
295
253
|
return writer;
|
|
296
254
|
},
|
|
297
255
|
decode(input, length) {
|
|
298
|
-
const reader = input instanceof
|
|
256
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
299
257
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
300
|
-
const message =
|
|
301
|
-
message.urls = [];
|
|
258
|
+
const message = createBaseRtmpOutput();
|
|
302
259
|
while (reader.pos < end) {
|
|
303
260
|
const tag = reader.uint32();
|
|
304
261
|
switch (tag >>> 3) {
|
|
@@ -313,14 +270,9 @@ exports.RtmpOutput = {
|
|
|
313
270
|
return message;
|
|
314
271
|
},
|
|
315
272
|
fromJSON(object) {
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
for (const e of object.urls) {
|
|
320
|
-
message.urls.push(String(e));
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
|
-
return message;
|
|
273
|
+
return {
|
|
274
|
+
urls: Array.isArray(object === null || object === void 0 ? void 0 : object.urls) ? object.urls.map((e) => String(e)) : [],
|
|
275
|
+
};
|
|
324
276
|
},
|
|
325
277
|
toJSON(message) {
|
|
326
278
|
const obj = {};
|
|
@@ -333,29 +285,27 @@ exports.RtmpOutput = {
|
|
|
333
285
|
return obj;
|
|
334
286
|
},
|
|
335
287
|
fromPartial(object) {
|
|
336
|
-
|
|
337
|
-
message
|
|
338
|
-
|
|
339
|
-
for (const e of object.urls) {
|
|
340
|
-
message.urls.push(e);
|
|
341
|
-
}
|
|
342
|
-
}
|
|
288
|
+
var _a;
|
|
289
|
+
const message = createBaseRtmpOutput();
|
|
290
|
+
message.urls = ((_a = object.urls) === null || _a === void 0 ? void 0 : _a.map((e) => e)) || [];
|
|
343
291
|
return message;
|
|
344
292
|
},
|
|
345
293
|
};
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
294
|
+
function createBaseRecordingOptions() {
|
|
295
|
+
return {
|
|
296
|
+
preset: 0,
|
|
297
|
+
width: 0,
|
|
298
|
+
height: 0,
|
|
299
|
+
depth: 0,
|
|
300
|
+
framerate: 0,
|
|
301
|
+
audioBitrate: 0,
|
|
302
|
+
audioFrequency: 0,
|
|
303
|
+
videoBitrate: 0,
|
|
304
|
+
profile: '',
|
|
305
|
+
};
|
|
306
|
+
}
|
|
357
307
|
exports.RecordingOptions = {
|
|
358
|
-
encode(message, writer =
|
|
308
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
359
309
|
if (message.preset !== 0) {
|
|
360
310
|
writer.uint32(8).int32(message.preset);
|
|
361
311
|
}
|
|
@@ -380,15 +330,15 @@ exports.RecordingOptions = {
|
|
|
380
330
|
if (message.videoBitrate !== 0) {
|
|
381
331
|
writer.uint32(64).int32(message.videoBitrate);
|
|
382
332
|
}
|
|
383
|
-
if (message.profile !==
|
|
333
|
+
if (message.profile !== '') {
|
|
384
334
|
writer.uint32(74).string(message.profile);
|
|
385
335
|
}
|
|
386
336
|
return writer;
|
|
387
337
|
},
|
|
388
338
|
decode(input, length) {
|
|
389
|
-
const reader = input instanceof
|
|
339
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
390
340
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
391
|
-
const message =
|
|
341
|
+
const message = createBaseRecordingOptions();
|
|
392
342
|
while (reader.pos < end) {
|
|
393
343
|
const tag = reader.uint32();
|
|
394
344
|
switch (tag >>> 3) {
|
|
@@ -427,151 +377,61 @@ exports.RecordingOptions = {
|
|
|
427
377
|
return message;
|
|
428
378
|
},
|
|
429
379
|
fromJSON(object) {
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
message.width = 0;
|
|
442
|
-
}
|
|
443
|
-
if (object.height !== undefined && object.height !== null) {
|
|
444
|
-
message.height = Number(object.height);
|
|
445
|
-
}
|
|
446
|
-
else {
|
|
447
|
-
message.height = 0;
|
|
448
|
-
}
|
|
449
|
-
if (object.depth !== undefined && object.depth !== null) {
|
|
450
|
-
message.depth = Number(object.depth);
|
|
451
|
-
}
|
|
452
|
-
else {
|
|
453
|
-
message.depth = 0;
|
|
454
|
-
}
|
|
455
|
-
if (object.framerate !== undefined && object.framerate !== null) {
|
|
456
|
-
message.framerate = Number(object.framerate);
|
|
457
|
-
}
|
|
458
|
-
else {
|
|
459
|
-
message.framerate = 0;
|
|
460
|
-
}
|
|
461
|
-
if (object.audioBitrate !== undefined && object.audioBitrate !== null) {
|
|
462
|
-
message.audioBitrate = Number(object.audioBitrate);
|
|
463
|
-
}
|
|
464
|
-
else {
|
|
465
|
-
message.audioBitrate = 0;
|
|
466
|
-
}
|
|
467
|
-
if (object.audioFrequency !== undefined && object.audioFrequency !== null) {
|
|
468
|
-
message.audioFrequency = Number(object.audioFrequency);
|
|
469
|
-
}
|
|
470
|
-
else {
|
|
471
|
-
message.audioFrequency = 0;
|
|
472
|
-
}
|
|
473
|
-
if (object.videoBitrate !== undefined && object.videoBitrate !== null) {
|
|
474
|
-
message.videoBitrate = Number(object.videoBitrate);
|
|
475
|
-
}
|
|
476
|
-
else {
|
|
477
|
-
message.videoBitrate = 0;
|
|
478
|
-
}
|
|
479
|
-
if (object.profile !== undefined && object.profile !== null) {
|
|
480
|
-
message.profile = String(object.profile);
|
|
481
|
-
}
|
|
482
|
-
else {
|
|
483
|
-
message.profile = "";
|
|
484
|
-
}
|
|
485
|
-
return message;
|
|
380
|
+
return {
|
|
381
|
+
preset: isSet(object.preset) ? recordingPresetFromJSON(object.preset) : 0,
|
|
382
|
+
width: isSet(object.width) ? Number(object.width) : 0,
|
|
383
|
+
height: isSet(object.height) ? Number(object.height) : 0,
|
|
384
|
+
depth: isSet(object.depth) ? Number(object.depth) : 0,
|
|
385
|
+
framerate: isSet(object.framerate) ? Number(object.framerate) : 0,
|
|
386
|
+
audioBitrate: isSet(object.audioBitrate) ? Number(object.audioBitrate) : 0,
|
|
387
|
+
audioFrequency: isSet(object.audioFrequency) ? Number(object.audioFrequency) : 0,
|
|
388
|
+
videoBitrate: isSet(object.videoBitrate) ? Number(object.videoBitrate) : 0,
|
|
389
|
+
profile: isSet(object.profile) ? String(object.profile) : '',
|
|
390
|
+
};
|
|
486
391
|
},
|
|
487
392
|
toJSON(message) {
|
|
488
393
|
const obj = {};
|
|
489
|
-
message.preset !== undefined &&
|
|
490
|
-
|
|
491
|
-
message.
|
|
492
|
-
message.
|
|
493
|
-
message.
|
|
494
|
-
message.
|
|
495
|
-
message.audioBitrate !== undefined &&
|
|
496
|
-
(obj.audioBitrate = message.audioBitrate);
|
|
394
|
+
message.preset !== undefined && (obj.preset = recordingPresetToJSON(message.preset));
|
|
395
|
+
message.width !== undefined && (obj.width = Math.round(message.width));
|
|
396
|
+
message.height !== undefined && (obj.height = Math.round(message.height));
|
|
397
|
+
message.depth !== undefined && (obj.depth = Math.round(message.depth));
|
|
398
|
+
message.framerate !== undefined && (obj.framerate = Math.round(message.framerate));
|
|
399
|
+
message.audioBitrate !== undefined && (obj.audioBitrate = Math.round(message.audioBitrate));
|
|
497
400
|
message.audioFrequency !== undefined &&
|
|
498
|
-
(obj.audioFrequency = message.audioFrequency);
|
|
499
|
-
message.videoBitrate !== undefined &&
|
|
500
|
-
(obj.videoBitrate = message.videoBitrate);
|
|
401
|
+
(obj.audioFrequency = Math.round(message.audioFrequency));
|
|
402
|
+
message.videoBitrate !== undefined && (obj.videoBitrate = Math.round(message.videoBitrate));
|
|
501
403
|
message.profile !== undefined && (obj.profile = message.profile);
|
|
502
404
|
return obj;
|
|
503
405
|
},
|
|
504
406
|
fromPartial(object) {
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
message.width = 0;
|
|
517
|
-
}
|
|
518
|
-
if (object.height !== undefined && object.height !== null) {
|
|
519
|
-
message.height = object.height;
|
|
520
|
-
}
|
|
521
|
-
else {
|
|
522
|
-
message.height = 0;
|
|
523
|
-
}
|
|
524
|
-
if (object.depth !== undefined && object.depth !== null) {
|
|
525
|
-
message.depth = object.depth;
|
|
526
|
-
}
|
|
527
|
-
else {
|
|
528
|
-
message.depth = 0;
|
|
529
|
-
}
|
|
530
|
-
if (object.framerate !== undefined && object.framerate !== null) {
|
|
531
|
-
message.framerate = object.framerate;
|
|
532
|
-
}
|
|
533
|
-
else {
|
|
534
|
-
message.framerate = 0;
|
|
535
|
-
}
|
|
536
|
-
if (object.audioBitrate !== undefined && object.audioBitrate !== null) {
|
|
537
|
-
message.audioBitrate = object.audioBitrate;
|
|
538
|
-
}
|
|
539
|
-
else {
|
|
540
|
-
message.audioBitrate = 0;
|
|
541
|
-
}
|
|
542
|
-
if (object.audioFrequency !== undefined && object.audioFrequency !== null) {
|
|
543
|
-
message.audioFrequency = object.audioFrequency;
|
|
544
|
-
}
|
|
545
|
-
else {
|
|
546
|
-
message.audioFrequency = 0;
|
|
547
|
-
}
|
|
548
|
-
if (object.videoBitrate !== undefined && object.videoBitrate !== null) {
|
|
549
|
-
message.videoBitrate = object.videoBitrate;
|
|
550
|
-
}
|
|
551
|
-
else {
|
|
552
|
-
message.videoBitrate = 0;
|
|
553
|
-
}
|
|
554
|
-
if (object.profile !== undefined && object.profile !== null) {
|
|
555
|
-
message.profile = object.profile;
|
|
556
|
-
}
|
|
557
|
-
else {
|
|
558
|
-
message.profile = "";
|
|
559
|
-
}
|
|
407
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
408
|
+
const message = createBaseRecordingOptions();
|
|
409
|
+
message.preset = (_a = object.preset) !== null && _a !== void 0 ? _a : 0;
|
|
410
|
+
message.width = (_b = object.width) !== null && _b !== void 0 ? _b : 0;
|
|
411
|
+
message.height = (_c = object.height) !== null && _c !== void 0 ? _c : 0;
|
|
412
|
+
message.depth = (_d = object.depth) !== null && _d !== void 0 ? _d : 0;
|
|
413
|
+
message.framerate = (_e = object.framerate) !== null && _e !== void 0 ? _e : 0;
|
|
414
|
+
message.audioBitrate = (_f = object.audioBitrate) !== null && _f !== void 0 ? _f : 0;
|
|
415
|
+
message.audioFrequency = (_g = object.audioFrequency) !== null && _g !== void 0 ? _g : 0;
|
|
416
|
+
message.videoBitrate = (_h = object.videoBitrate) !== null && _h !== void 0 ? _h : 0;
|
|
417
|
+
message.profile = (_j = object.profile) !== null && _j !== void 0 ? _j : '';
|
|
560
418
|
return message;
|
|
561
419
|
},
|
|
562
420
|
};
|
|
563
|
-
|
|
421
|
+
function createBaseStartRecordingResponse() {
|
|
422
|
+
return { recordingId: '' };
|
|
423
|
+
}
|
|
564
424
|
exports.StartRecordingResponse = {
|
|
565
|
-
encode(message, writer =
|
|
566
|
-
if (message.recordingId !==
|
|
425
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
426
|
+
if (message.recordingId !== '') {
|
|
567
427
|
writer.uint32(10).string(message.recordingId);
|
|
568
428
|
}
|
|
569
429
|
return writer;
|
|
570
430
|
},
|
|
571
431
|
decode(input, length) {
|
|
572
|
-
const reader = input instanceof
|
|
432
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
573
433
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
574
|
-
const message =
|
|
434
|
+
const message = createBaseStartRecordingResponse();
|
|
575
435
|
while (reader.pos < end) {
|
|
576
436
|
const tag = reader.uint32();
|
|
577
437
|
switch (tag >>> 3) {
|
|
@@ -586,47 +446,39 @@ exports.StartRecordingResponse = {
|
|
|
586
446
|
return message;
|
|
587
447
|
},
|
|
588
448
|
fromJSON(object) {
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
}
|
|
593
|
-
else {
|
|
594
|
-
message.recordingId = "";
|
|
595
|
-
}
|
|
596
|
-
return message;
|
|
449
|
+
return {
|
|
450
|
+
recordingId: isSet(object.recordingId) ? String(object.recordingId) : '',
|
|
451
|
+
};
|
|
597
452
|
},
|
|
598
453
|
toJSON(message) {
|
|
599
454
|
const obj = {};
|
|
600
|
-
message.recordingId !== undefined &&
|
|
601
|
-
(obj.recordingId = message.recordingId);
|
|
455
|
+
message.recordingId !== undefined && (obj.recordingId = message.recordingId);
|
|
602
456
|
return obj;
|
|
603
457
|
},
|
|
604
458
|
fromPartial(object) {
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
}
|
|
609
|
-
else {
|
|
610
|
-
message.recordingId = "";
|
|
611
|
-
}
|
|
459
|
+
var _a;
|
|
460
|
+
const message = createBaseStartRecordingResponse();
|
|
461
|
+
message.recordingId = (_a = object.recordingId) !== null && _a !== void 0 ? _a : '';
|
|
612
462
|
return message;
|
|
613
463
|
},
|
|
614
464
|
};
|
|
615
|
-
|
|
465
|
+
function createBaseAddOutputRequest() {
|
|
466
|
+
return { recordingId: '', rtmpUrl: '' };
|
|
467
|
+
}
|
|
616
468
|
exports.AddOutputRequest = {
|
|
617
|
-
encode(message, writer =
|
|
618
|
-
if (message.recordingId !==
|
|
469
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
470
|
+
if (message.recordingId !== '') {
|
|
619
471
|
writer.uint32(10).string(message.recordingId);
|
|
620
472
|
}
|
|
621
|
-
if (message.rtmpUrl !==
|
|
473
|
+
if (message.rtmpUrl !== '') {
|
|
622
474
|
writer.uint32(18).string(message.rtmpUrl);
|
|
623
475
|
}
|
|
624
476
|
return writer;
|
|
625
477
|
},
|
|
626
478
|
decode(input, length) {
|
|
627
|
-
const reader = input instanceof
|
|
479
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
628
480
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
629
|
-
const message =
|
|
481
|
+
const message = createBaseAddOutputRequest();
|
|
630
482
|
while (reader.pos < end) {
|
|
631
483
|
const tag = reader.uint32();
|
|
632
484
|
switch (tag >>> 3) {
|
|
@@ -644,60 +496,42 @@ exports.AddOutputRequest = {
|
|
|
644
496
|
return message;
|
|
645
497
|
},
|
|
646
498
|
fromJSON(object) {
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
}
|
|
651
|
-
else {
|
|
652
|
-
message.recordingId = "";
|
|
653
|
-
}
|
|
654
|
-
if (object.rtmpUrl !== undefined && object.rtmpUrl !== null) {
|
|
655
|
-
message.rtmpUrl = String(object.rtmpUrl);
|
|
656
|
-
}
|
|
657
|
-
else {
|
|
658
|
-
message.rtmpUrl = "";
|
|
659
|
-
}
|
|
660
|
-
return message;
|
|
499
|
+
return {
|
|
500
|
+
recordingId: isSet(object.recordingId) ? String(object.recordingId) : '',
|
|
501
|
+
rtmpUrl: isSet(object.rtmpUrl) ? String(object.rtmpUrl) : '',
|
|
502
|
+
};
|
|
661
503
|
},
|
|
662
504
|
toJSON(message) {
|
|
663
505
|
const obj = {};
|
|
664
|
-
message.recordingId !== undefined &&
|
|
665
|
-
(obj.recordingId = message.recordingId);
|
|
506
|
+
message.recordingId !== undefined && (obj.recordingId = message.recordingId);
|
|
666
507
|
message.rtmpUrl !== undefined && (obj.rtmpUrl = message.rtmpUrl);
|
|
667
508
|
return obj;
|
|
668
509
|
},
|
|
669
510
|
fromPartial(object) {
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
else {
|
|
675
|
-
message.recordingId = "";
|
|
676
|
-
}
|
|
677
|
-
if (object.rtmpUrl !== undefined && object.rtmpUrl !== null) {
|
|
678
|
-
message.rtmpUrl = object.rtmpUrl;
|
|
679
|
-
}
|
|
680
|
-
else {
|
|
681
|
-
message.rtmpUrl = "";
|
|
682
|
-
}
|
|
511
|
+
var _a, _b;
|
|
512
|
+
const message = createBaseAddOutputRequest();
|
|
513
|
+
message.recordingId = (_a = object.recordingId) !== null && _a !== void 0 ? _a : '';
|
|
514
|
+
message.rtmpUrl = (_b = object.rtmpUrl) !== null && _b !== void 0 ? _b : '';
|
|
683
515
|
return message;
|
|
684
516
|
},
|
|
685
517
|
};
|
|
686
|
-
|
|
518
|
+
function createBaseRemoveOutputRequest() {
|
|
519
|
+
return { recordingId: '', rtmpUrl: '' };
|
|
520
|
+
}
|
|
687
521
|
exports.RemoveOutputRequest = {
|
|
688
|
-
encode(message, writer =
|
|
689
|
-
if (message.recordingId !==
|
|
522
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
523
|
+
if (message.recordingId !== '') {
|
|
690
524
|
writer.uint32(10).string(message.recordingId);
|
|
691
525
|
}
|
|
692
|
-
if (message.rtmpUrl !==
|
|
526
|
+
if (message.rtmpUrl !== '') {
|
|
693
527
|
writer.uint32(18).string(message.rtmpUrl);
|
|
694
528
|
}
|
|
695
529
|
return writer;
|
|
696
530
|
},
|
|
697
531
|
decode(input, length) {
|
|
698
|
-
const reader = input instanceof
|
|
532
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
699
533
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
700
|
-
const message =
|
|
534
|
+
const message = createBaseRemoveOutputRequest();
|
|
701
535
|
while (reader.pos < end) {
|
|
702
536
|
const tag = reader.uint32();
|
|
703
537
|
switch (tag >>> 3) {
|
|
@@ -715,57 +549,39 @@ exports.RemoveOutputRequest = {
|
|
|
715
549
|
return message;
|
|
716
550
|
},
|
|
717
551
|
fromJSON(object) {
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
}
|
|
722
|
-
else {
|
|
723
|
-
message.recordingId = "";
|
|
724
|
-
}
|
|
725
|
-
if (object.rtmpUrl !== undefined && object.rtmpUrl !== null) {
|
|
726
|
-
message.rtmpUrl = String(object.rtmpUrl);
|
|
727
|
-
}
|
|
728
|
-
else {
|
|
729
|
-
message.rtmpUrl = "";
|
|
730
|
-
}
|
|
731
|
-
return message;
|
|
552
|
+
return {
|
|
553
|
+
recordingId: isSet(object.recordingId) ? String(object.recordingId) : '',
|
|
554
|
+
rtmpUrl: isSet(object.rtmpUrl) ? String(object.rtmpUrl) : '',
|
|
555
|
+
};
|
|
732
556
|
},
|
|
733
557
|
toJSON(message) {
|
|
734
558
|
const obj = {};
|
|
735
|
-
message.recordingId !== undefined &&
|
|
736
|
-
(obj.recordingId = message.recordingId);
|
|
559
|
+
message.recordingId !== undefined && (obj.recordingId = message.recordingId);
|
|
737
560
|
message.rtmpUrl !== undefined && (obj.rtmpUrl = message.rtmpUrl);
|
|
738
561
|
return obj;
|
|
739
562
|
},
|
|
740
563
|
fromPartial(object) {
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
else {
|
|
746
|
-
message.recordingId = "";
|
|
747
|
-
}
|
|
748
|
-
if (object.rtmpUrl !== undefined && object.rtmpUrl !== null) {
|
|
749
|
-
message.rtmpUrl = object.rtmpUrl;
|
|
750
|
-
}
|
|
751
|
-
else {
|
|
752
|
-
message.rtmpUrl = "";
|
|
753
|
-
}
|
|
564
|
+
var _a, _b;
|
|
565
|
+
const message = createBaseRemoveOutputRequest();
|
|
566
|
+
message.recordingId = (_a = object.recordingId) !== null && _a !== void 0 ? _a : '';
|
|
567
|
+
message.rtmpUrl = (_b = object.rtmpUrl) !== null && _b !== void 0 ? _b : '';
|
|
754
568
|
return message;
|
|
755
569
|
},
|
|
756
570
|
};
|
|
757
|
-
|
|
571
|
+
function createBaseEndRecordingRequest() {
|
|
572
|
+
return { recordingId: '' };
|
|
573
|
+
}
|
|
758
574
|
exports.EndRecordingRequest = {
|
|
759
|
-
encode(message, writer =
|
|
760
|
-
if (message.recordingId !==
|
|
575
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
576
|
+
if (message.recordingId !== '') {
|
|
761
577
|
writer.uint32(10).string(message.recordingId);
|
|
762
578
|
}
|
|
763
579
|
return writer;
|
|
764
580
|
},
|
|
765
581
|
decode(input, length) {
|
|
766
|
-
const reader = input instanceof
|
|
582
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
767
583
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
768
|
-
const message =
|
|
584
|
+
const message = createBaseEndRecordingRequest();
|
|
769
585
|
while (reader.pos < end) {
|
|
770
586
|
const tag = reader.uint32();
|
|
771
587
|
switch (tag >>> 3) {
|
|
@@ -780,50 +596,37 @@ exports.EndRecordingRequest = {
|
|
|
780
596
|
return message;
|
|
781
597
|
},
|
|
782
598
|
fromJSON(object) {
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
}
|
|
787
|
-
else {
|
|
788
|
-
message.recordingId = "";
|
|
789
|
-
}
|
|
790
|
-
return message;
|
|
599
|
+
return {
|
|
600
|
+
recordingId: isSet(object.recordingId) ? String(object.recordingId) : '',
|
|
601
|
+
};
|
|
791
602
|
},
|
|
792
603
|
toJSON(message) {
|
|
793
604
|
const obj = {};
|
|
794
|
-
message.recordingId !== undefined &&
|
|
795
|
-
(obj.recordingId = message.recordingId);
|
|
605
|
+
message.recordingId !== undefined && (obj.recordingId = message.recordingId);
|
|
796
606
|
return obj;
|
|
797
607
|
},
|
|
798
608
|
fromPartial(object) {
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
}
|
|
803
|
-
else {
|
|
804
|
-
message.recordingId = "";
|
|
805
|
-
}
|
|
609
|
+
var _a;
|
|
610
|
+
const message = createBaseEndRecordingRequest();
|
|
611
|
+
message.recordingId = (_a = object.recordingId) !== null && _a !== void 0 ? _a : '';
|
|
806
612
|
return message;
|
|
807
613
|
},
|
|
808
614
|
};
|
|
809
|
-
|
|
810
|
-
id:
|
|
811
|
-
|
|
812
|
-
active: false,
|
|
813
|
-
error: "",
|
|
814
|
-
};
|
|
615
|
+
function createBaseRecordingInfo() {
|
|
616
|
+
return { id: '', roomName: '', active: false, error: '', file: undefined, rtmp: [] };
|
|
617
|
+
}
|
|
815
618
|
exports.RecordingInfo = {
|
|
816
|
-
encode(message, writer =
|
|
817
|
-
if (message.id !==
|
|
619
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
620
|
+
if (message.id !== '') {
|
|
818
621
|
writer.uint32(10).string(message.id);
|
|
819
622
|
}
|
|
820
|
-
if (message.roomName !==
|
|
623
|
+
if (message.roomName !== '') {
|
|
821
624
|
writer.uint32(18).string(message.roomName);
|
|
822
625
|
}
|
|
823
626
|
if (message.active === true) {
|
|
824
627
|
writer.uint32(24).bool(message.active);
|
|
825
628
|
}
|
|
826
|
-
if (message.error !==
|
|
629
|
+
if (message.error !== '') {
|
|
827
630
|
writer.uint32(34).string(message.error);
|
|
828
631
|
}
|
|
829
632
|
if (message.file !== undefined) {
|
|
@@ -835,10 +638,9 @@ exports.RecordingInfo = {
|
|
|
835
638
|
return writer;
|
|
836
639
|
},
|
|
837
640
|
decode(input, length) {
|
|
838
|
-
const reader = input instanceof
|
|
641
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
839
642
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
840
|
-
const message =
|
|
841
|
-
message.rtmp = [];
|
|
643
|
+
const message = createBaseRecordingInfo();
|
|
842
644
|
while (reader.pos < end) {
|
|
843
645
|
const tag = reader.uint32();
|
|
844
646
|
switch (tag >>> 3) {
|
|
@@ -868,44 +670,14 @@ exports.RecordingInfo = {
|
|
|
868
670
|
return message;
|
|
869
671
|
},
|
|
870
672
|
fromJSON(object) {
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
}
|
|
879
|
-
if (object.roomName !== undefined && object.roomName !== null) {
|
|
880
|
-
message.roomName = String(object.roomName);
|
|
881
|
-
}
|
|
882
|
-
else {
|
|
883
|
-
message.roomName = "";
|
|
884
|
-
}
|
|
885
|
-
if (object.active !== undefined && object.active !== null) {
|
|
886
|
-
message.active = Boolean(object.active);
|
|
887
|
-
}
|
|
888
|
-
else {
|
|
889
|
-
message.active = false;
|
|
890
|
-
}
|
|
891
|
-
if (object.error !== undefined && object.error !== null) {
|
|
892
|
-
message.error = String(object.error);
|
|
893
|
-
}
|
|
894
|
-
else {
|
|
895
|
-
message.error = "";
|
|
896
|
-
}
|
|
897
|
-
if (object.file !== undefined && object.file !== null) {
|
|
898
|
-
message.file = exports.FileResult.fromJSON(object.file);
|
|
899
|
-
}
|
|
900
|
-
else {
|
|
901
|
-
message.file = undefined;
|
|
902
|
-
}
|
|
903
|
-
if (object.rtmp !== undefined && object.rtmp !== null) {
|
|
904
|
-
for (const e of object.rtmp) {
|
|
905
|
-
message.rtmp.push(exports.RtmpResult.fromJSON(e));
|
|
906
|
-
}
|
|
907
|
-
}
|
|
908
|
-
return message;
|
|
673
|
+
return {
|
|
674
|
+
id: isSet(object.id) ? String(object.id) : '',
|
|
675
|
+
roomName: isSet(object.roomName) ? String(object.roomName) : '',
|
|
676
|
+
active: isSet(object.active) ? Boolean(object.active) : false,
|
|
677
|
+
error: isSet(object.error) ? String(object.error) : '',
|
|
678
|
+
file: isSet(object.file) ? exports.FileResult.fromJSON(object.file) : undefined,
|
|
679
|
+
rtmp: Array.isArray(object === null || object === void 0 ? void 0 : object.rtmp) ? object.rtmp.map((e) => exports.RtmpResult.fromJSON(e)) : [],
|
|
680
|
+
};
|
|
909
681
|
},
|
|
910
682
|
toJSON(message) {
|
|
911
683
|
const obj = {};
|
|
@@ -916,7 +688,7 @@ exports.RecordingInfo = {
|
|
|
916
688
|
message.file !== undefined &&
|
|
917
689
|
(obj.file = message.file ? exports.FileResult.toJSON(message.file) : undefined);
|
|
918
690
|
if (message.rtmp) {
|
|
919
|
-
obj.rtmp = message.rtmp.map((e) => e ? exports.RtmpResult.toJSON(e) : undefined);
|
|
691
|
+
obj.rtmp = message.rtmp.map((e) => (e ? exports.RtmpResult.toJSON(e) : undefined));
|
|
920
692
|
}
|
|
921
693
|
else {
|
|
922
694
|
obj.rtmp = [];
|
|
@@ -924,50 +696,26 @@ exports.RecordingInfo = {
|
|
|
924
696
|
return obj;
|
|
925
697
|
},
|
|
926
698
|
fromPartial(object) {
|
|
927
|
-
|
|
928
|
-
message
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
else {
|
|
939
|
-
message.roomName = "";
|
|
940
|
-
}
|
|
941
|
-
if (object.active !== undefined && object.active !== null) {
|
|
942
|
-
message.active = object.active;
|
|
943
|
-
}
|
|
944
|
-
else {
|
|
945
|
-
message.active = false;
|
|
946
|
-
}
|
|
947
|
-
if (object.error !== undefined && object.error !== null) {
|
|
948
|
-
message.error = object.error;
|
|
949
|
-
}
|
|
950
|
-
else {
|
|
951
|
-
message.error = "";
|
|
952
|
-
}
|
|
953
|
-
if (object.file !== undefined && object.file !== null) {
|
|
954
|
-
message.file = exports.FileResult.fromPartial(object.file);
|
|
955
|
-
}
|
|
956
|
-
else {
|
|
957
|
-
message.file = undefined;
|
|
958
|
-
}
|
|
959
|
-
if (object.rtmp !== undefined && object.rtmp !== null) {
|
|
960
|
-
for (const e of object.rtmp) {
|
|
961
|
-
message.rtmp.push(exports.RtmpResult.fromPartial(e));
|
|
962
|
-
}
|
|
963
|
-
}
|
|
699
|
+
var _a, _b, _c, _d, _e;
|
|
700
|
+
const message = createBaseRecordingInfo();
|
|
701
|
+
message.id = (_a = object.id) !== null && _a !== void 0 ? _a : '';
|
|
702
|
+
message.roomName = (_b = object.roomName) !== null && _b !== void 0 ? _b : '';
|
|
703
|
+
message.active = (_c = object.active) !== null && _c !== void 0 ? _c : false;
|
|
704
|
+
message.error = (_d = object.error) !== null && _d !== void 0 ? _d : '';
|
|
705
|
+
message.file =
|
|
706
|
+
object.file !== undefined && object.file !== null
|
|
707
|
+
? exports.FileResult.fromPartial(object.file)
|
|
708
|
+
: undefined;
|
|
709
|
+
message.rtmp = ((_e = object.rtmp) === null || _e === void 0 ? void 0 : _e.map((e) => exports.RtmpResult.fromPartial(e))) || [];
|
|
964
710
|
return message;
|
|
965
711
|
},
|
|
966
712
|
};
|
|
967
|
-
|
|
713
|
+
function createBaseFileResult() {
|
|
714
|
+
return { downloadUrl: '', duration: 0 };
|
|
715
|
+
}
|
|
968
716
|
exports.FileResult = {
|
|
969
|
-
encode(message, writer =
|
|
970
|
-
if (message.downloadUrl !==
|
|
717
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
718
|
+
if (message.downloadUrl !== '') {
|
|
971
719
|
writer.uint32(10).string(message.downloadUrl);
|
|
972
720
|
}
|
|
973
721
|
if (message.duration !== 0) {
|
|
@@ -976,9 +724,9 @@ exports.FileResult = {
|
|
|
976
724
|
return writer;
|
|
977
725
|
},
|
|
978
726
|
decode(input, length) {
|
|
979
|
-
const reader = input instanceof
|
|
727
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
980
728
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
981
|
-
const message =
|
|
729
|
+
const message = createBaseFileResult();
|
|
982
730
|
while (reader.pos < end) {
|
|
983
731
|
const tag = reader.uint32();
|
|
984
732
|
switch (tag >>> 3) {
|
|
@@ -996,49 +744,31 @@ exports.FileResult = {
|
|
|
996
744
|
return message;
|
|
997
745
|
},
|
|
998
746
|
fromJSON(object) {
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
}
|
|
1003
|
-
else {
|
|
1004
|
-
message.downloadUrl = "";
|
|
1005
|
-
}
|
|
1006
|
-
if (object.duration !== undefined && object.duration !== null) {
|
|
1007
|
-
message.duration = Number(object.duration);
|
|
1008
|
-
}
|
|
1009
|
-
else {
|
|
1010
|
-
message.duration = 0;
|
|
1011
|
-
}
|
|
1012
|
-
return message;
|
|
747
|
+
return {
|
|
748
|
+
downloadUrl: isSet(object.downloadUrl) ? String(object.downloadUrl) : '',
|
|
749
|
+
duration: isSet(object.duration) ? Number(object.duration) : 0,
|
|
750
|
+
};
|
|
1013
751
|
},
|
|
1014
752
|
toJSON(message) {
|
|
1015
753
|
const obj = {};
|
|
1016
|
-
message.downloadUrl !== undefined &&
|
|
1017
|
-
|
|
1018
|
-
message.duration !== undefined && (obj.duration = message.duration);
|
|
754
|
+
message.downloadUrl !== undefined && (obj.downloadUrl = message.downloadUrl);
|
|
755
|
+
message.duration !== undefined && (obj.duration = Math.round(message.duration));
|
|
1019
756
|
return obj;
|
|
1020
757
|
},
|
|
1021
758
|
fromPartial(object) {
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
else {
|
|
1027
|
-
message.downloadUrl = "";
|
|
1028
|
-
}
|
|
1029
|
-
if (object.duration !== undefined && object.duration !== null) {
|
|
1030
|
-
message.duration = object.duration;
|
|
1031
|
-
}
|
|
1032
|
-
else {
|
|
1033
|
-
message.duration = 0;
|
|
1034
|
-
}
|
|
759
|
+
var _a, _b;
|
|
760
|
+
const message = createBaseFileResult();
|
|
761
|
+
message.downloadUrl = (_a = object.downloadUrl) !== null && _a !== void 0 ? _a : '';
|
|
762
|
+
message.duration = (_b = object.duration) !== null && _b !== void 0 ? _b : 0;
|
|
1035
763
|
return message;
|
|
1036
764
|
},
|
|
1037
765
|
};
|
|
1038
|
-
|
|
766
|
+
function createBaseRtmpResult() {
|
|
767
|
+
return { streamUrl: '', duration: 0 };
|
|
768
|
+
}
|
|
1039
769
|
exports.RtmpResult = {
|
|
1040
|
-
encode(message, writer =
|
|
1041
|
-
if (message.streamUrl !==
|
|
770
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
771
|
+
if (message.streamUrl !== '') {
|
|
1042
772
|
writer.uint32(10).string(message.streamUrl);
|
|
1043
773
|
}
|
|
1044
774
|
if (message.duration !== 0) {
|
|
@@ -1047,9 +777,9 @@ exports.RtmpResult = {
|
|
|
1047
777
|
return writer;
|
|
1048
778
|
},
|
|
1049
779
|
decode(input, length) {
|
|
1050
|
-
const reader = input instanceof
|
|
780
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
1051
781
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1052
|
-
const message =
|
|
782
|
+
const message = createBaseRtmpResult();
|
|
1053
783
|
while (reader.pos < end) {
|
|
1054
784
|
const tag = reader.uint32();
|
|
1055
785
|
switch (tag >>> 3) {
|
|
@@ -1067,63 +797,47 @@ exports.RtmpResult = {
|
|
|
1067
797
|
return message;
|
|
1068
798
|
},
|
|
1069
799
|
fromJSON(object) {
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
}
|
|
1074
|
-
else {
|
|
1075
|
-
message.streamUrl = "";
|
|
1076
|
-
}
|
|
1077
|
-
if (object.duration !== undefined && object.duration !== null) {
|
|
1078
|
-
message.duration = Number(object.duration);
|
|
1079
|
-
}
|
|
1080
|
-
else {
|
|
1081
|
-
message.duration = 0;
|
|
1082
|
-
}
|
|
1083
|
-
return message;
|
|
800
|
+
return {
|
|
801
|
+
streamUrl: isSet(object.streamUrl) ? String(object.streamUrl) : '',
|
|
802
|
+
duration: isSet(object.duration) ? Number(object.duration) : 0,
|
|
803
|
+
};
|
|
1084
804
|
},
|
|
1085
805
|
toJSON(message) {
|
|
1086
806
|
const obj = {};
|
|
1087
807
|
message.streamUrl !== undefined && (obj.streamUrl = message.streamUrl);
|
|
1088
|
-
message.duration !== undefined && (obj.duration = message.duration);
|
|
808
|
+
message.duration !== undefined && (obj.duration = Math.round(message.duration));
|
|
1089
809
|
return obj;
|
|
1090
810
|
},
|
|
1091
811
|
fromPartial(object) {
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
else {
|
|
1097
|
-
message.streamUrl = "";
|
|
1098
|
-
}
|
|
1099
|
-
if (object.duration !== undefined && object.duration !== null) {
|
|
1100
|
-
message.duration = object.duration;
|
|
1101
|
-
}
|
|
1102
|
-
else {
|
|
1103
|
-
message.duration = 0;
|
|
1104
|
-
}
|
|
812
|
+
var _a, _b;
|
|
813
|
+
const message = createBaseRtmpResult();
|
|
814
|
+
message.streamUrl = (_a = object.streamUrl) !== null && _a !== void 0 ? _a : '';
|
|
815
|
+
message.duration = (_b = object.duration) !== null && _b !== void 0 ? _b : 0;
|
|
1105
816
|
return message;
|
|
1106
817
|
},
|
|
1107
818
|
};
|
|
1108
819
|
var globalThis = (() => {
|
|
1109
|
-
if (typeof globalThis !==
|
|
820
|
+
if (typeof globalThis !== 'undefined')
|
|
1110
821
|
return globalThis;
|
|
1111
|
-
if (typeof self !==
|
|
822
|
+
if (typeof self !== 'undefined')
|
|
1112
823
|
return self;
|
|
1113
|
-
if (typeof window !==
|
|
824
|
+
if (typeof window !== 'undefined')
|
|
1114
825
|
return window;
|
|
1115
|
-
if (typeof global !==
|
|
826
|
+
if (typeof global !== 'undefined')
|
|
1116
827
|
return global;
|
|
1117
|
-
throw
|
|
828
|
+
throw 'Unable to locate global object';
|
|
1118
829
|
})();
|
|
1119
830
|
function longToNumber(long) {
|
|
1120
831
|
if (long.gt(Number.MAX_SAFE_INTEGER)) {
|
|
1121
|
-
throw new globalThis.Error(
|
|
832
|
+
throw new globalThis.Error('Value is larger than Number.MAX_SAFE_INTEGER');
|
|
1122
833
|
}
|
|
1123
834
|
return long.toNumber();
|
|
1124
835
|
}
|
|
1125
|
-
if (
|
|
1126
|
-
|
|
1127
|
-
|
|
836
|
+
if (_m0.util.Long !== long_1.default) {
|
|
837
|
+
_m0.util.Long = long_1.default;
|
|
838
|
+
_m0.configure();
|
|
839
|
+
}
|
|
840
|
+
function isSet(value) {
|
|
841
|
+
return value !== null && value !== undefined;
|
|
1128
842
|
}
|
|
1129
843
|
//# sourceMappingURL=livekit_recording.js.map
|