@stinkycomputing/sesame-api-client 1.4.1-alpha.1 → 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 -143
- 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 -143
- package/dist/browser.mjs.map +2 -2
- package/dist/command-list.d.ts +18 -135
- package/dist/command-list.d.ts.map +1 -1
- package/dist/index.cjs +7 -143
- 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 -143
- package/dist/index.mjs.map +2 -2
- package/package.json +1 -1
package/dist/command-list.d.ts
CHANGED
|
@@ -1,125 +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
|
-
type: sesame.v1.outputs.RecorderType;
|
|
24
|
-
}
|
|
25
|
-
export interface IOutputConfig {
|
|
26
|
-
outputType: sesame.v1.outputs.OutputType;
|
|
27
|
-
compositionId: string;
|
|
28
|
-
audioMixIds: string[];
|
|
29
|
-
encodedConfig?: IEncoderOutputConfig;
|
|
30
|
-
decklinkConfig?: IDecklinkOutputConfig;
|
|
31
|
-
recorderConfig?: IRecorderOutputConfig;
|
|
32
|
-
moqConfig?: sesame.v1.outputs.IEncodedMoqOutputConfig;
|
|
33
|
-
systemAudioConfig?: sesame.v1.outputs.ISystemAudioOutputConfig;
|
|
34
|
-
useAsClock?: boolean;
|
|
35
|
-
}
|
|
36
|
-
export interface IEncoderOutputConfig {
|
|
37
|
-
url: string;
|
|
38
|
-
width: number;
|
|
39
|
-
height: number;
|
|
40
|
-
fps: number;
|
|
41
|
-
encoderConfig: IEncoderConfig;
|
|
42
|
-
}
|
|
43
|
-
export interface IDecklinkOutputConfig {
|
|
44
|
-
deviceIndex: number;
|
|
45
|
-
videoFormat: sesame.v1.common.VideoFormat;
|
|
46
|
-
keyAndFill: boolean;
|
|
47
|
-
}
|
|
48
|
-
export interface INDIOutputConfig {
|
|
49
|
-
name: string;
|
|
50
|
-
}
|
|
51
|
-
export interface IAudioMixerChannel {
|
|
52
|
-
id: string;
|
|
53
|
-
sourceId: string;
|
|
54
|
-
channelType: sesame.v1.audio.AudioMixerChannelType;
|
|
55
|
-
sourceChannels: number[];
|
|
56
|
-
plugins: sesame.v1.audio.IAudioPlugin[];
|
|
57
|
-
level: number;
|
|
58
|
-
pan: number;
|
|
59
|
-
}
|
|
60
|
-
export interface IAudioMixerConfig {
|
|
61
|
-
channels: IAudioMixerChannel[];
|
|
62
|
-
outputType: sesame.v1.audio.AudioMixerChannelType;
|
|
63
|
-
order: number;
|
|
64
|
-
}
|
|
65
|
-
export interface ISourceConfig {
|
|
66
|
-
sourceType: sesame.v1.sources.SourceType;
|
|
67
|
-
url?: string;
|
|
68
|
-
deinterlace?: sesame.v1.sources.DeinterlaceType;
|
|
69
|
-
useAsClock?: boolean;
|
|
70
|
-
audioChannels?: number;
|
|
71
|
-
loop?: boolean;
|
|
72
|
-
playState?: sesame.v1.sources.SourceTransportState;
|
|
73
|
-
userId?: string;
|
|
74
|
-
audioOnly: boolean;
|
|
75
|
-
mipMap: boolean;
|
|
76
|
-
decoderType?: sesame.v1.sources.DecoderType;
|
|
77
|
-
decodeBufferFrames?: number;
|
|
78
|
-
textureSize?: sesame.v1.sources.SourceTextureSize;
|
|
79
|
-
moqConfig?: sesame.v1.sources.IMoqSourceConfig;
|
|
80
|
-
rttConfig?: sesame.v1.sources.IRTTSourceConfig;
|
|
81
|
-
decklinkConfig?: sesame.v1.sources.IDecklinkSourceConfig;
|
|
82
|
-
videoProcessors?: sesame.v1.sources.IVideoProcessor[];
|
|
83
|
-
fileConfig?: IFileSourceConfig;
|
|
84
|
-
ndiConfig?: INDISourceConfig;
|
|
85
|
-
srtConfig?: ISRTSourceConfig;
|
|
86
|
-
rtmpConfig?: IRTMPSourceConfig;
|
|
87
|
-
rtspConfig?: IRTSPSourceConfig;
|
|
88
|
-
recorderConfig?: IRecorderSourceConfig;
|
|
89
|
-
}
|
|
90
|
-
export interface IFileSourceConfig {
|
|
91
|
-
filename: string;
|
|
92
|
-
loop?: boolean;
|
|
93
|
-
audioRouting?: number[];
|
|
94
|
-
}
|
|
95
|
-
export interface IDecklinkSourceConfig {
|
|
96
|
-
deviceIndex: number;
|
|
97
|
-
audioRouting?: number[];
|
|
98
|
-
}
|
|
99
|
-
export interface INDISourceConfig {
|
|
100
|
-
name: string;
|
|
101
|
-
audioRouting?: number[];
|
|
102
|
-
}
|
|
103
|
-
export interface ISRTSourceConfig {
|
|
104
|
-
url: string;
|
|
105
|
-
latencyMs?: number;
|
|
106
|
-
audioRouting?: number[];
|
|
107
|
-
}
|
|
108
|
-
export interface IRTMPSourceConfig {
|
|
109
|
-
url: string;
|
|
110
|
-
audioRouting?: number[];
|
|
111
|
-
}
|
|
112
|
-
export interface IRTSPSourceConfig {
|
|
113
|
-
url: string;
|
|
114
|
-
audioRouting?: number[];
|
|
115
|
-
}
|
|
116
|
-
export interface IRecorderSourceConfig {
|
|
117
|
-
recorderId: string;
|
|
118
|
-
}
|
|
119
|
-
export interface ISourceTransportConfig {
|
|
120
|
-
cmdType: sesame.v1.sources.SourceTransportCommandType;
|
|
121
|
-
value: sesame.v1.common.IPropValue;
|
|
122
|
-
}
|
|
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'>;
|
|
123
24
|
export interface ITransportCommand {
|
|
124
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';
|
|
125
26
|
value?: number | string;
|
|
@@ -127,23 +28,7 @@ export interface ITransportCommand {
|
|
|
127
28
|
user?: string;
|
|
128
29
|
id?: string;
|
|
129
30
|
}
|
|
130
|
-
export
|
|
131
|
-
id: number;
|
|
132
|
-
recorderId: string;
|
|
133
|
-
transitionTime?: number;
|
|
134
|
-
speed?: number;
|
|
135
|
-
audioRouting?: number[];
|
|
136
|
-
transitionType?: number;
|
|
137
|
-
transitionFadeColor?: {
|
|
138
|
-
x: number;
|
|
139
|
-
y: number;
|
|
140
|
-
z: number;
|
|
141
|
-
w: number;
|
|
142
|
-
};
|
|
143
|
-
audioLevels?: number[];
|
|
144
|
-
startTime?: number;
|
|
145
|
-
endTime?: number;
|
|
146
|
-
}
|
|
31
|
+
export type IPlaylistClip = WithRequired<sesame.v1.recorder.IPlaylistItem, 'id' | 'recorderId'>;
|
|
147
32
|
export interface IPlaylist {
|
|
148
33
|
id: string;
|
|
149
34
|
duration: number;
|
|
@@ -174,9 +59,6 @@ export declare class CommandList {
|
|
|
174
59
|
getLength(): number;
|
|
175
60
|
filterCreatedAndDestroyedSources(): void;
|
|
176
61
|
get_command_list_msg(): sesame.v1.commands.CommandList;
|
|
177
|
-
private buildSourceConfig;
|
|
178
|
-
private buildOutputEncodedConfig;
|
|
179
|
-
private buildOutputConfig;
|
|
180
62
|
callback(event: string, data: string, timeOffsetMs?: number): sesame.v1.commands.CommandListItem;
|
|
181
63
|
add_compositor(id: string, width: number, height: number, multisample: boolean, timeOffsetMs?: number): sesame.v1.commands.CommandListItem;
|
|
182
64
|
remove_compositor(id: string, timeOffsetMs?: number): sesame.v1.commands.CommandListItem;
|
|
@@ -202,4 +84,5 @@ export declare class CommandList {
|
|
|
202
84
|
remove_audio_mixer_channel(mixerId: string, channelId: string, timeOffsetMs?: number): sesame.v1.commands.CommandListItem;
|
|
203
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;
|
|
204
86
|
}
|
|
87
|
+
export {};
|
|
205
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,SAAS,MAAM,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;KAAG,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,CAAC;AAEzF,wBAAgB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E,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,142 +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
|
-
const outputConfig = {
|
|
21328
|
-
id,
|
|
21329
|
-
audioMixIds: cfg.audioMixIds,
|
|
21330
|
-
compositionId: cfg.compositionId,
|
|
21331
|
-
useAsClock: !!cfg.useAsClock
|
|
21332
|
-
};
|
|
21333
|
-
switch (cfg.outputType) {
|
|
21334
|
-
case sesame.v1.outputs.OutputType.OUTPUT_TYPE_DECKLINK:
|
|
21335
|
-
if (cfg.decklinkConfig == null) throw new Error("No decklink config found");
|
|
21336
|
-
outputConfig.decklink = cfg.decklinkConfig;
|
|
21337
|
-
break;
|
|
21338
|
-
case sesame.v1.outputs.OutputType.OUTPUT_TYPE_ENCODED_RECORDER:
|
|
21339
|
-
if (cfg.recorderConfig == null) throw new Error("No recorder config found");
|
|
21340
|
-
if (cfg.encodedConfig == null) throw new Error("No output config found");
|
|
21341
|
-
outputConfig.recorder = {
|
|
21342
|
-
encoded: this.buildOutputEncodedConfig(cfg.encodedConfig),
|
|
21343
|
-
filename: cfg.recorderConfig.filename,
|
|
21344
|
-
sizeGb: cfg.recorderConfig.sizeGb,
|
|
21345
|
-
groupId: cfg.recorderConfig.groupId,
|
|
21346
|
-
recorderType: cfg.recorderConfig.type
|
|
21347
|
-
};
|
|
21348
|
-
break;
|
|
21349
|
-
case sesame.v1.outputs.OutputType.OUTPUT_TYPE_ENCODED_SUPER_SLOWMO_RECORDER:
|
|
21350
|
-
if (cfg.recorderConfig == null) throw new Error("No recorder config found");
|
|
21351
|
-
if (cfg.encodedConfig == null) throw new Error("No output config found");
|
|
21352
|
-
outputConfig.superSlowmoRecorder = {
|
|
21353
|
-
encoded: this.buildOutputEncodedConfig(cfg.encodedConfig),
|
|
21354
|
-
filename: cfg.recorderConfig.filename,
|
|
21355
|
-
sizeGb: cfg.recorderConfig.sizeGb,
|
|
21356
|
-
groupId: cfg.recorderConfig.groupId,
|
|
21357
|
-
recorderType: cfg.recorderConfig.type
|
|
21358
|
-
};
|
|
21359
|
-
break;
|
|
21360
|
-
case sesame.v1.outputs.OutputType.OUTPUT_TYPE_SYSTEM_AUDIO:
|
|
21361
|
-
if (cfg.systemAudioConfig == null) throw new Error("No system audio config found");
|
|
21362
|
-
outputConfig.systemAudio = cfg.systemAudioConfig;
|
|
21363
|
-
break;
|
|
21364
|
-
case sesame.v1.outputs.OutputType.OUTPUT_TYPE_ENCODED_SRT:
|
|
21365
|
-
if (cfg.encodedConfig == null) throw new Error("No output config found");
|
|
21366
|
-
outputConfig.srt = {
|
|
21367
|
-
url: cfg.encodedConfig.url,
|
|
21368
|
-
encoded: this.buildOutputEncodedConfig(cfg.encodedConfig)
|
|
21369
|
-
};
|
|
21370
|
-
break;
|
|
21371
|
-
case sesame.v1.outputs.OutputType.OUTPUT_TYPE_ENCODED_WEBSOCKET:
|
|
21372
|
-
if (cfg.encodedConfig == null) throw new Error("No output config found");
|
|
21373
|
-
outputConfig.websocket = {
|
|
21374
|
-
channel: cfg.encodedConfig.url,
|
|
21375
|
-
encoded: this.buildOutputEncodedConfig(cfg.encodedConfig)
|
|
21376
|
-
};
|
|
21377
|
-
break;
|
|
21378
|
-
case sesame.v1.outputs.OutputType.OUTPUT_TYPE_ENCODED_MOQ:
|
|
21379
|
-
if (cfg.moqConfig == null) throw new Error("No MoQ config found");
|
|
21380
|
-
if (cfg.encodedConfig == null) throw new Error("No output config found");
|
|
21381
|
-
outputConfig.moq = {
|
|
21382
|
-
...cfg.moqConfig,
|
|
21383
|
-
encoded: this.buildOutputEncodedConfig(cfg.encodedConfig)
|
|
21384
|
-
};
|
|
21385
|
-
break;
|
|
21386
|
-
default:
|
|
21387
|
-
throw new Error(`Unsupported output type: ${cfg.outputType}`);
|
|
21388
|
-
}
|
|
21389
|
-
return outputConfig;
|
|
21390
|
-
}
|
|
21391
21255
|
callback(event, data, timeOffsetMs) {
|
|
21392
21256
|
let item = new sesame.v1.commands.CommandListItem();
|
|
21393
21257
|
item.callback = { event, data };
|
|
@@ -21410,7 +21274,7 @@ var CommandList = class {
|
|
|
21410
21274
|
}
|
|
21411
21275
|
add_source(id, cfg, timeOffsetMs) {
|
|
21412
21276
|
let item = new sesame.v1.commands.CommandListItem();
|
|
21413
|
-
item.addSource = { id, config:
|
|
21277
|
+
item.addSource = { id, config: cfg };
|
|
21414
21278
|
return this.add(item, timeOffsetMs);
|
|
21415
21279
|
}
|
|
21416
21280
|
remove_source(id, timeOffsetMs) {
|
|
@@ -21449,11 +21313,11 @@ var CommandList = class {
|
|
|
21449
21313
|
items: playlist.clips.map((clip) => ({
|
|
21450
21314
|
id: clip.id,
|
|
21451
21315
|
recorderId: clip.recorderId,
|
|
21452
|
-
transitionTimeUs:
|
|
21316
|
+
transitionTimeUs: clip.transitionTimeUs,
|
|
21453
21317
|
speed: clip.speed || 1,
|
|
21454
21318
|
audioRouting: clip.audioRouting,
|
|
21455
|
-
startTimeUs: clip.
|
|
21456
|
-
endTimeUs: clip.
|
|
21319
|
+
startTimeUs: clip.startTimeUs,
|
|
21320
|
+
endTimeUs: clip.endTimeUs,
|
|
21457
21321
|
transitionType: clip.transitionType ?? sesame.v1.recorder.TransitionType.TRANSITION_TYPE_MIX,
|
|
21458
21322
|
transitionFadeColor: clip.transitionFadeColor ?? { x: 0, y: 0, z: 0, w: 0 }
|
|
21459
21323
|
})),
|
|
@@ -21547,7 +21411,7 @@ var CommandList = class {
|
|
|
21547
21411
|
}
|
|
21548
21412
|
update_source(id, cfg, timeOffsetMs) {
|
|
21549
21413
|
let item = new sesame.v1.commands.CommandListItem();
|
|
21550
|
-
item.updateSource = { id, config:
|
|
21414
|
+
item.updateSource = { id, config: cfg };
|
|
21551
21415
|
return this.add(item, timeOffsetMs);
|
|
21552
21416
|
}
|
|
21553
21417
|
update_source_metadata(id, metadata, timeOffsetMs) {
|
|
@@ -21566,12 +21430,12 @@ var CommandList = class {
|
|
|
21566
21430
|
}
|
|
21567
21431
|
add_output(id, cfg, timeOffsetMs) {
|
|
21568
21432
|
let item = new sesame.v1.commands.CommandListItem();
|
|
21569
|
-
item.addOutput =
|
|
21433
|
+
item.addOutput = { id, ...cfg };
|
|
21570
21434
|
return this.add(item, timeOffsetMs);
|
|
21571
21435
|
}
|
|
21572
21436
|
update_output(id, cfg, timeOffsetMs) {
|
|
21573
21437
|
let item = new sesame.v1.commands.CommandListItem();
|
|
21574
|
-
item.updateOutput =
|
|
21438
|
+
item.updateOutput = { id, ...cfg };
|
|
21575
21439
|
return this.add(item, timeOffsetMs);
|
|
21576
21440
|
}
|
|
21577
21441
|
remove_output(id, timeOffsetMs) {
|