@stinkycomputing/sesame-api-client 1.4.1-alpha.2 → 1.4.1-alpha.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/dist/browser.cjs +7 -146
- package/dist/browser.cjs.map +2 -2
- package/dist/browser.d.ts +1 -1
- package/dist/browser.d.ts.map +1 -1
- package/dist/browser.mjs +7 -146
- package/dist/browser.mjs.map +2 -2
- package/dist/command-list.d.ts +18 -140
- package/dist/command-list.d.ts.map +1 -1
- package/dist/index.cjs +7 -146
- package/dist/index.cjs.map +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +7 -146
- package/dist/index.mjs.map +2 -2
- package/package.json +1 -1
package/dist/command-list.d.ts
CHANGED
|
@@ -1,130 +1,26 @@
|
|
|
1
1
|
import { sesame } from './proto/api';
|
|
2
2
|
import { EaseKind } from './sesame-api-client';
|
|
3
3
|
import Long from 'long';
|
|
4
|
+
/** Makes specified keys required and non-nullable, keeping the rest as-is from the generated type. */
|
|
5
|
+
type WithRequired<T, K extends keyof T> = Omit<T, K> & {
|
|
6
|
+
[P in K]-?: NonNullable<T[P]>;
|
|
7
|
+
};
|
|
4
8
|
export declare function keyframe(timeUs: number | Long, value: sesame.v1.common.IPropValue, easingIn?: EaseKind, easingOut?: EaseKind): sesame.v1.compositor.IKeyFrame;
|
|
5
9
|
export type CompositorID = string;
|
|
6
10
|
export type ReplayID = string;
|
|
7
11
|
export type AudioMixerID = string;
|
|
8
|
-
export
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
export
|
|
20
|
-
filename: string;
|
|
21
|
-
sizeGb: number;
|
|
22
|
-
groupId: string;
|
|
23
|
-
recorderType: sesame.v1.outputs.RecorderType;
|
|
24
|
-
}
|
|
25
|
-
export interface ISuperSlowmoRecorderOutputConfig extends IRecorderOutputConfig {
|
|
26
|
-
compositionIds: string[];
|
|
27
|
-
sourceIds: string[];
|
|
28
|
-
}
|
|
29
|
-
export interface IOutputConfig {
|
|
30
|
-
outputType: sesame.v1.outputs.OutputType;
|
|
31
|
-
compositionId: string;
|
|
32
|
-
audioMixIds: string[];
|
|
33
|
-
encodedConfig?: IEncoderOutputConfig;
|
|
34
|
-
decklinkConfig?: IDecklinkOutputConfig;
|
|
35
|
-
recorderConfig?: IRecorderOutputConfig;
|
|
36
|
-
superSlowmoRecorderConfig?: ISuperSlowmoRecorderOutputConfig;
|
|
37
|
-
moqConfig?: sesame.v1.outputs.IEncodedMoqOutputConfig;
|
|
38
|
-
systemAudioConfig?: sesame.v1.outputs.ISystemAudioOutputConfig;
|
|
39
|
-
useAsClock?: boolean;
|
|
40
|
-
}
|
|
41
|
-
export interface IEncoderOutputConfig {
|
|
42
|
-
url: string;
|
|
43
|
-
width: number;
|
|
44
|
-
height: number;
|
|
45
|
-
fps: number;
|
|
46
|
-
encoderConfig: IEncoderConfig;
|
|
47
|
-
}
|
|
48
|
-
export interface IDecklinkOutputConfig {
|
|
49
|
-
deviceIndex: number;
|
|
50
|
-
videoFormat: sesame.v1.common.VideoFormat;
|
|
51
|
-
keyAndFill: boolean;
|
|
52
|
-
}
|
|
53
|
-
export interface INDIOutputConfig {
|
|
54
|
-
name: string;
|
|
55
|
-
}
|
|
56
|
-
export interface IAudioMixerChannel {
|
|
57
|
-
id: string;
|
|
58
|
-
sourceId: string;
|
|
59
|
-
channelType: sesame.v1.audio.AudioMixerChannelType;
|
|
60
|
-
sourceChannels: number[];
|
|
61
|
-
plugins: sesame.v1.audio.IAudioPlugin[];
|
|
62
|
-
level: number;
|
|
63
|
-
pan: number;
|
|
64
|
-
}
|
|
65
|
-
export interface IAudioMixerConfig {
|
|
66
|
-
channels: IAudioMixerChannel[];
|
|
67
|
-
outputType: sesame.v1.audio.AudioMixerChannelType;
|
|
68
|
-
order: number;
|
|
69
|
-
}
|
|
70
|
-
export interface ISourceConfig {
|
|
71
|
-
sourceType: sesame.v1.sources.SourceType;
|
|
72
|
-
url?: string;
|
|
73
|
-
deinterlace?: sesame.v1.sources.DeinterlaceType;
|
|
74
|
-
useAsClock?: boolean;
|
|
75
|
-
audioChannels?: number;
|
|
76
|
-
loop?: boolean;
|
|
77
|
-
playState?: sesame.v1.sources.SourceTransportState;
|
|
78
|
-
userId?: string;
|
|
79
|
-
audioOnly: boolean;
|
|
80
|
-
mipMap: boolean;
|
|
81
|
-
decoderType?: sesame.v1.sources.DecoderType;
|
|
82
|
-
decodeBufferFrames?: number;
|
|
83
|
-
textureSize?: sesame.v1.sources.SourceTextureSize;
|
|
84
|
-
moqConfig?: sesame.v1.sources.IMoqSourceConfig;
|
|
85
|
-
rttConfig?: sesame.v1.sources.IRTTSourceConfig;
|
|
86
|
-
decklinkConfig?: sesame.v1.sources.IDecklinkSourceConfig;
|
|
87
|
-
videoProcessors?: sesame.v1.sources.IVideoProcessor[];
|
|
88
|
-
fileConfig?: IFileSourceConfig;
|
|
89
|
-
ndiConfig?: INDISourceConfig;
|
|
90
|
-
srtConfig?: ISRTSourceConfig;
|
|
91
|
-
rtmpConfig?: IRTMPSourceConfig;
|
|
92
|
-
rtspConfig?: IRTSPSourceConfig;
|
|
93
|
-
recorderConfig?: IRecorderSourceConfig;
|
|
94
|
-
}
|
|
95
|
-
export interface IFileSourceConfig {
|
|
96
|
-
filename: string;
|
|
97
|
-
loop?: boolean;
|
|
98
|
-
audioRouting?: number[];
|
|
99
|
-
}
|
|
100
|
-
export interface IDecklinkSourceConfig {
|
|
101
|
-
deviceIndex: number;
|
|
102
|
-
audioRouting?: number[];
|
|
103
|
-
}
|
|
104
|
-
export interface INDISourceConfig {
|
|
105
|
-
name: string;
|
|
106
|
-
audioRouting?: number[];
|
|
107
|
-
}
|
|
108
|
-
export interface ISRTSourceConfig {
|
|
109
|
-
url: string;
|
|
110
|
-
latencyMs?: number;
|
|
111
|
-
audioRouting?: number[];
|
|
112
|
-
}
|
|
113
|
-
export interface IRTMPSourceConfig {
|
|
114
|
-
url: string;
|
|
115
|
-
audioRouting?: number[];
|
|
116
|
-
}
|
|
117
|
-
export interface IRTSPSourceConfig {
|
|
118
|
-
url: string;
|
|
119
|
-
audioRouting?: number[];
|
|
120
|
-
}
|
|
121
|
-
export interface IRecorderSourceConfig {
|
|
122
|
-
recorderId: string;
|
|
123
|
-
}
|
|
124
|
-
export interface ISourceTransportConfig {
|
|
125
|
-
cmdType: sesame.v1.sources.SourceTransportCommandType;
|
|
126
|
-
value: sesame.v1.common.IPropValue;
|
|
127
|
-
}
|
|
12
|
+
export type INodeConfig = WithRequired<Omit<sesame.v1.compositor.INodeAddRequest, 'nodeId'>, 'compositorId' | 'parentAddress' | 'nodeType'>;
|
|
13
|
+
export type IEncoderConfig = WithRequired<sesame.v1.outputs.IEncoderConfig, 'preset' | 'bitrateKbps'>;
|
|
14
|
+
export type IRecorderOutputConfig = WithRequired<Omit<sesame.v1.outputs.IEncodedRecorderOutputConfig, 'encoded'>, 'filename' | 'sizeGb' | 'groupId' | 'recorderType'>;
|
|
15
|
+
export type ISuperSlowmoRecorderOutputConfig = WithRequired<Omit<sesame.v1.outputs.IEncodedSuperSlowMoRecorderOutputConfig, 'encoded'>, 'filename' | 'sizeGb' | 'groupId' | 'recorderType' | 'compositionIds' | 'sourceIds'>;
|
|
16
|
+
export type IOutputConfig = Omit<sesame.v1.outputs.IOutputAddRequest, 'id'>;
|
|
17
|
+
export type IEncoderOutputConfig = WithRequired<sesame.v1.outputs.IOutputEncodedConfig, 'width' | 'height' | 'fps' | 'encoderConfig'>;
|
|
18
|
+
export type IDecklinkOutputConfig = WithRequired<sesame.v1.outputs.IDecklinkOutputConfig, 'deviceIndex' | 'videoFormat' | 'keyAndFill'>;
|
|
19
|
+
export type IAudioMixerChannel = WithRequired<sesame.v1.audio.IAudioMixerChannel, 'id' | 'sourceId' | 'channelType' | 'sourceChannels' | 'plugins' | 'level' | 'pan'>;
|
|
20
|
+
export type IAudioMixerConfig = WithRequired<sesame.v1.audio.IAudioMixerConfig, 'channels' | 'outputType' | 'order'>;
|
|
21
|
+
export type ISourceConfig = sesame.v1.sources.ISourceConfig;
|
|
22
|
+
export type IRecorderSourceConfig = WithRequired<sesame.v1.sources.IRecorderSourceConfig, 'recorderId'>;
|
|
23
|
+
export type ISourceTransportConfig = WithRequired<Omit<sesame.v1.sources.ISourceTransportCommand, 'sourceId'>, 'cmdType' | 'value'>;
|
|
128
24
|
export interface ITransportCommand {
|
|
129
25
|
type: 'play' | 'pause' | 'stop' | 'seek' | 'seek_usertime' | 'jog' | 'live' | 'set_recorder' | 'load_playlist' | 'eject_playlist' | 'load_clip' | 'set_metadata' | 'take' | 'pre_roll' | 'post_roll' | 'next_playlist_clip' | 'skip_next_playlist_clip' | 'transitions_disabled' | 'set_scrubbing';
|
|
130
26
|
value?: number | string;
|
|
@@ -132,23 +28,7 @@ export interface ITransportCommand {
|
|
|
132
28
|
user?: string;
|
|
133
29
|
id?: string;
|
|
134
30
|
}
|
|
135
|
-
export
|
|
136
|
-
id: number;
|
|
137
|
-
recorderId: string;
|
|
138
|
-
transitionTime?: number;
|
|
139
|
-
speed?: number;
|
|
140
|
-
audioRouting?: number[];
|
|
141
|
-
transitionType?: number;
|
|
142
|
-
transitionFadeColor?: {
|
|
143
|
-
x: number;
|
|
144
|
-
y: number;
|
|
145
|
-
z: number;
|
|
146
|
-
w: number;
|
|
147
|
-
};
|
|
148
|
-
audioLevels?: number[];
|
|
149
|
-
startTime?: number;
|
|
150
|
-
endTime?: number;
|
|
151
|
-
}
|
|
31
|
+
export type IPlaylistClip = WithRequired<sesame.v1.recorder.IPlaylistItem, 'id' | 'recorderId'>;
|
|
152
32
|
export interface IPlaylist {
|
|
153
33
|
id: string;
|
|
154
34
|
duration: number;
|
|
@@ -179,9 +59,6 @@ export declare class CommandList {
|
|
|
179
59
|
getLength(): number;
|
|
180
60
|
filterCreatedAndDestroyedSources(): void;
|
|
181
61
|
get_command_list_msg(): sesame.v1.commands.CommandList;
|
|
182
|
-
private buildSourceConfig;
|
|
183
|
-
private buildOutputEncodedConfig;
|
|
184
|
-
private buildOutputConfig;
|
|
185
62
|
callback(event: string, data: string, timeOffsetMs?: number): sesame.v1.commands.CommandListItem;
|
|
186
63
|
add_compositor(id: string, width: number, height: number, multisample: boolean, timeOffsetMs?: number): sesame.v1.commands.CommandListItem;
|
|
187
64
|
remove_compositor(id: string, timeOffsetMs?: number): sesame.v1.commands.CommandListItem;
|
|
@@ -207,4 +84,5 @@ export declare class CommandList {
|
|
|
207
84
|
remove_audio_mixer_channel(mixerId: string, channelId: string, timeOffsetMs?: number): sesame.v1.commands.CommandListItem;
|
|
208
85
|
animate_property(propertyDomain: sesame.v1.common.IPropertyDomain, addr: string, prop: string, before: sesame.v1.compositor.AnimationChannelEvaluationMode, after: sesame.v1.compositor.AnimationChannelEvaluationMode, keyframes: sesame.v1.compositor.IKeyFrame[], timeOffsetMs?: number): sesame.v1.commands.CommandListItem;
|
|
209
86
|
}
|
|
87
|
+
export {};
|
|
210
88
|
//# sourceMappingURL=command-list.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-list.d.ts","sourceRoot":"","sources":["../src/command-list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,
|
|
1
|
+
{"version":3,"file":"command-list.d.ts","sourceRoot":"","sources":["../src/command-list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,sGAAsG;AACtG,KAAK,YAAY,CAAC,CAAC,EAAE,CAAC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AAa,CAAC,EAAE,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM;IAM/C,eAAe,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,iBAAiB,EAAE,YAAY,CAAC,EAAE,MAAM;IAMzE,kBAAkB,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,iBAAiB,EAAE,YAAY,CAAC,EAAE,MAAM;IAM5E,uBAAuB,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,kBAAkB,EAAE,YAAY,CAAC,EAAE,MAAM;IAMvF,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM;IAMzD,0BAA0B,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM;IAMpF,gBAAgB,CAAC,cAAc,EAAE,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,eAAe,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAClG,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC,UAAU,CAAC,8BAA8B,EAAE,KAAK,EAAE,MAAM,CAAC,EAAE,CAAC,UAAU,CAAC,8BAA8B,EACvH,SAAS,EAAE,MAAM,CAAC,EAAE,CAAC,UAAU,CAAC,SAAS,EAAE,EAAE,YAAY,CAAC,EAAE,MAAM;CAarE"}
|
package/dist/index.cjs
CHANGED
|
@@ -21252,145 +21252,6 @@ var CommandList = class {
|
|
|
21252
21252
|
get_command_list_msg() {
|
|
21253
21253
|
return this.cl;
|
|
21254
21254
|
}
|
|
21255
|
-
buildSourceConfig(cfg) {
|
|
21256
|
-
var _a;
|
|
21257
|
-
const config = {
|
|
21258
|
-
common: {
|
|
21259
|
-
userId: cfg.userId,
|
|
21260
|
-
useAsClock: cfg.useAsClock,
|
|
21261
|
-
audioOnly: cfg.audioOnly,
|
|
21262
|
-
audioChannels: cfg.audioChannels,
|
|
21263
|
-
loop: cfg.loop,
|
|
21264
|
-
playState: cfg.playState,
|
|
21265
|
-
mipMap: cfg.mipMap,
|
|
21266
|
-
textureSize: cfg.textureSize,
|
|
21267
|
-
decoderType: cfg.decoderType,
|
|
21268
|
-
deinterlace: cfg.deinterlace,
|
|
21269
|
-
videoProcessors: cfg.videoProcessors || []
|
|
21270
|
-
}
|
|
21271
|
-
};
|
|
21272
|
-
switch (cfg.sourceType) {
|
|
21273
|
-
case sesame.v1.sources.SourceType.SOURCE_TYPE_FILE:
|
|
21274
|
-
config.file = { url: ((_a = cfg.fileConfig) == null ? void 0 : _a.filename) || cfg.url || "" };
|
|
21275
|
-
break;
|
|
21276
|
-
case sesame.v1.sources.SourceType.SOURCE_TYPE_RECORDER:
|
|
21277
|
-
if (cfg.recorderConfig == null) throw new Error("No recorder source config found");
|
|
21278
|
-
config.recorder = cfg.recorderConfig;
|
|
21279
|
-
break;
|
|
21280
|
-
case sesame.v1.sources.SourceType.SOURCE_TYPE_BROWSER:
|
|
21281
|
-
if (!cfg.url) throw new Error("No browser URL found");
|
|
21282
|
-
config.browser = { url: cfg.url };
|
|
21283
|
-
break;
|
|
21284
|
-
case sesame.v1.sources.SourceType.SOURCE_TYPE_RTT:
|
|
21285
|
-
if (cfg.rttConfig == null) throw new Error("No RTT config found");
|
|
21286
|
-
config.rtt = cfg.rttConfig;
|
|
21287
|
-
break;
|
|
21288
|
-
case sesame.v1.sources.SourceType.SOURCE_TYPE_DECKLINK:
|
|
21289
|
-
if (cfg.decklinkConfig == null) throw new Error("No decklink source config found");
|
|
21290
|
-
config.decklink = cfg.decklinkConfig;
|
|
21291
|
-
break;
|
|
21292
|
-
case sesame.v1.sources.SourceType.SOURCE_TYPE_SIGNAL_GENERATOR:
|
|
21293
|
-
config.signalGenerator = {};
|
|
21294
|
-
break;
|
|
21295
|
-
case sesame.v1.sources.SourceType.SOURCE_TYPE_SYSTEM_AUDIO:
|
|
21296
|
-
config.systemAudio = { deviceName: cfg.url || "" };
|
|
21297
|
-
break;
|
|
21298
|
-
case sesame.v1.sources.SourceType.SOURCE_TYPE_SRT_STREAM:
|
|
21299
|
-
config.srtStream = cfg.srtConfig || (cfg.url ? { url: cfg.url } : void 0);
|
|
21300
|
-
if (config.srtStream == null) throw new Error("No SRT source config found");
|
|
21301
|
-
if (cfg.decodeBufferFrames) config.srtStream.decodeBufferFrames = cfg.decodeBufferFrames;
|
|
21302
|
-
break;
|
|
21303
|
-
case sesame.v1.sources.SourceType.SOURCE_TYPE_WEBSOCKET:
|
|
21304
|
-
if (!cfg.url) throw new Error("No websocket channel found");
|
|
21305
|
-
config.websocket = { channel: cfg.url };
|
|
21306
|
-
if (cfg.decodeBufferFrames) config.websocket.decodeBufferFrames = cfg.decodeBufferFrames;
|
|
21307
|
-
break;
|
|
21308
|
-
case sesame.v1.sources.SourceType.SOURCE_TYPE_MOQ:
|
|
21309
|
-
if (cfg.moqConfig == null) throw new Error("No MoQ source config found");
|
|
21310
|
-
config.moq = cfg.moqConfig;
|
|
21311
|
-
if (cfg.decodeBufferFrames) config.moq.decodeBufferFrames = cfg.decodeBufferFrames;
|
|
21312
|
-
break;
|
|
21313
|
-
default:
|
|
21314
|
-
throw new Error(`Unsupported source type: ${cfg.sourceType}`);
|
|
21315
|
-
}
|
|
21316
|
-
return config;
|
|
21317
|
-
}
|
|
21318
|
-
buildOutputEncodedConfig(cfg) {
|
|
21319
|
-
return {
|
|
21320
|
-
width: cfg.width,
|
|
21321
|
-
height: cfg.height,
|
|
21322
|
-
fps: cfg.fps,
|
|
21323
|
-
encoderConfig: cfg.encoderConfig
|
|
21324
|
-
};
|
|
21325
|
-
}
|
|
21326
|
-
buildOutputConfig(id, cfg) {
|
|
21327
|
-
var _a, _b;
|
|
21328
|
-
const outputConfig = {
|
|
21329
|
-
id,
|
|
21330
|
-
audioMixIds: cfg.audioMixIds,
|
|
21331
|
-
compositionId: cfg.compositionId,
|
|
21332
|
-
useAsClock: !!cfg.useAsClock
|
|
21333
|
-
};
|
|
21334
|
-
switch (cfg.outputType) {
|
|
21335
|
-
case sesame.v1.outputs.OutputType.OUTPUT_TYPE_DECKLINK:
|
|
21336
|
-
if (cfg.decklinkConfig == null) throw new Error("No decklink config found");
|
|
21337
|
-
outputConfig.decklink = cfg.decklinkConfig;
|
|
21338
|
-
break;
|
|
21339
|
-
case sesame.v1.outputs.OutputType.OUTPUT_TYPE_ENCODED_RECORDER:
|
|
21340
|
-
if (cfg.recorderConfig == null) throw new Error("No recorder config found");
|
|
21341
|
-
if (cfg.encodedConfig == null) throw new Error("No output config found");
|
|
21342
|
-
outputConfig.recorder = {
|
|
21343
|
-
encoded: this.buildOutputEncodedConfig(cfg.encodedConfig),
|
|
21344
|
-
filename: cfg.recorderConfig.filename,
|
|
21345
|
-
sizeGb: cfg.recorderConfig.sizeGb,
|
|
21346
|
-
groupId: cfg.recorderConfig.groupId,
|
|
21347
|
-
recorderType: cfg.recorderConfig.recorderType
|
|
21348
|
-
};
|
|
21349
|
-
break;
|
|
21350
|
-
case sesame.v1.outputs.OutputType.OUTPUT_TYPE_ENCODED_SUPER_SLOWMO_RECORDER:
|
|
21351
|
-
if (cfg.superSlowmoRecorderConfig == null) throw new Error("No super slowmo recorder config found");
|
|
21352
|
-
if (cfg.encodedConfig == null) throw new Error("No output config found");
|
|
21353
|
-
outputConfig.superSlowmoRecorder = {
|
|
21354
|
-
encoded: this.buildOutputEncodedConfig(cfg.encodedConfig),
|
|
21355
|
-
filename: cfg.superSlowmoRecorderConfig.filename,
|
|
21356
|
-
sizeGb: cfg.superSlowmoRecorderConfig.sizeGb,
|
|
21357
|
-
groupId: cfg.superSlowmoRecorderConfig.groupId,
|
|
21358
|
-
recorderType: cfg.superSlowmoRecorderConfig.recorderType,
|
|
21359
|
-
compositionIds: ((_a = cfg.superSlowmoRecorderConfig) == null ? void 0 : _a.compositionIds) || [],
|
|
21360
|
-
sourceIds: ((_b = cfg.superSlowmoRecorderConfig) == null ? void 0 : _b.sourceIds) || []
|
|
21361
|
-
};
|
|
21362
|
-
break;
|
|
21363
|
-
case sesame.v1.outputs.OutputType.OUTPUT_TYPE_SYSTEM_AUDIO:
|
|
21364
|
-
if (cfg.systemAudioConfig == null) throw new Error("No system audio config found");
|
|
21365
|
-
outputConfig.systemAudio = cfg.systemAudioConfig;
|
|
21366
|
-
break;
|
|
21367
|
-
case sesame.v1.outputs.OutputType.OUTPUT_TYPE_ENCODED_SRT:
|
|
21368
|
-
if (cfg.encodedConfig == null) throw new Error("No output config found");
|
|
21369
|
-
outputConfig.srt = {
|
|
21370
|
-
url: cfg.encodedConfig.url,
|
|
21371
|
-
encoded: this.buildOutputEncodedConfig(cfg.encodedConfig)
|
|
21372
|
-
};
|
|
21373
|
-
break;
|
|
21374
|
-
case sesame.v1.outputs.OutputType.OUTPUT_TYPE_ENCODED_WEBSOCKET:
|
|
21375
|
-
if (cfg.encodedConfig == null) throw new Error("No output config found");
|
|
21376
|
-
outputConfig.websocket = {
|
|
21377
|
-
channel: cfg.encodedConfig.url,
|
|
21378
|
-
encoded: this.buildOutputEncodedConfig(cfg.encodedConfig)
|
|
21379
|
-
};
|
|
21380
|
-
break;
|
|
21381
|
-
case sesame.v1.outputs.OutputType.OUTPUT_TYPE_ENCODED_MOQ:
|
|
21382
|
-
if (cfg.moqConfig == null) throw new Error("No MoQ config found");
|
|
21383
|
-
if (cfg.encodedConfig == null) throw new Error("No output config found");
|
|
21384
|
-
outputConfig.moq = {
|
|
21385
|
-
...cfg.moqConfig,
|
|
21386
|
-
encoded: this.buildOutputEncodedConfig(cfg.encodedConfig)
|
|
21387
|
-
};
|
|
21388
|
-
break;
|
|
21389
|
-
default:
|
|
21390
|
-
throw new Error(`Unsupported output type: ${cfg.outputType}`);
|
|
21391
|
-
}
|
|
21392
|
-
return outputConfig;
|
|
21393
|
-
}
|
|
21394
21255
|
callback(event, data, timeOffsetMs) {
|
|
21395
21256
|
let item = new sesame.v1.commands.CommandListItem();
|
|
21396
21257
|
item.callback = { event, data };
|
|
@@ -21413,7 +21274,7 @@ var CommandList = class {
|
|
|
21413
21274
|
}
|
|
21414
21275
|
add_source(id, cfg, timeOffsetMs) {
|
|
21415
21276
|
let item = new sesame.v1.commands.CommandListItem();
|
|
21416
|
-
item.addSource = { id, config:
|
|
21277
|
+
item.addSource = { id, config: cfg };
|
|
21417
21278
|
return this.add(item, timeOffsetMs);
|
|
21418
21279
|
}
|
|
21419
21280
|
remove_source(id, timeOffsetMs) {
|
|
@@ -21452,11 +21313,11 @@ var CommandList = class {
|
|
|
21452
21313
|
items: playlist.clips.map((clip) => ({
|
|
21453
21314
|
id: clip.id,
|
|
21454
21315
|
recorderId: clip.recorderId,
|
|
21455
|
-
transitionTimeUs:
|
|
21316
|
+
transitionTimeUs: clip.transitionTimeUs,
|
|
21456
21317
|
speed: clip.speed || 1,
|
|
21457
21318
|
audioRouting: clip.audioRouting,
|
|
21458
|
-
startTimeUs: clip.
|
|
21459
|
-
endTimeUs: clip.
|
|
21319
|
+
startTimeUs: clip.startTimeUs,
|
|
21320
|
+
endTimeUs: clip.endTimeUs,
|
|
21460
21321
|
transitionType: clip.transitionType ?? sesame.v1.recorder.TransitionType.TRANSITION_TYPE_MIX,
|
|
21461
21322
|
transitionFadeColor: clip.transitionFadeColor ?? { x: 0, y: 0, z: 0, w: 0 }
|
|
21462
21323
|
})),
|
|
@@ -21550,7 +21411,7 @@ var CommandList = class {
|
|
|
21550
21411
|
}
|
|
21551
21412
|
update_source(id, cfg, timeOffsetMs) {
|
|
21552
21413
|
let item = new sesame.v1.commands.CommandListItem();
|
|
21553
|
-
item.updateSource = { id, config:
|
|
21414
|
+
item.updateSource = { id, config: cfg };
|
|
21554
21415
|
return this.add(item, timeOffsetMs);
|
|
21555
21416
|
}
|
|
21556
21417
|
update_source_metadata(id, metadata, timeOffsetMs) {
|
|
@@ -21569,12 +21430,12 @@ var CommandList = class {
|
|
|
21569
21430
|
}
|
|
21570
21431
|
add_output(id, cfg, timeOffsetMs) {
|
|
21571
21432
|
let item = new sesame.v1.commands.CommandListItem();
|
|
21572
|
-
item.addOutput =
|
|
21433
|
+
item.addOutput = { id, ...cfg };
|
|
21573
21434
|
return this.add(item, timeOffsetMs);
|
|
21574
21435
|
}
|
|
21575
21436
|
update_output(id, cfg, timeOffsetMs) {
|
|
21576
21437
|
let item = new sesame.v1.commands.CommandListItem();
|
|
21577
|
-
item.updateOutput =
|
|
21438
|
+
item.updateOutput = { id, ...cfg };
|
|
21578
21439
|
return this.add(item, timeOffsetMs);
|
|
21579
21440
|
}
|
|
21580
21441
|
remove_output(id, timeOffsetMs) {
|