@stinkycomputing/sesame-api-client 1.4.1-alpha.8 → 1.4.1-alpha.9
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/README.md +8 -8
- package/dist/browser.cjs +24 -24
- 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 +24 -24
- package/dist/browser.mjs.map +2 -2
- package/dist/command-list.d.ts +60 -28
- package/dist/command-list.d.ts.map +1 -1
- package/dist/index.browser.mjs +22576 -0
- package/dist/index.browser.mjs.map +7 -0
- package/dist/index.cjs +189 -183
- package/dist/index.cjs.map +3 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +66 -60
- package/dist/index.mjs.map +3 -3
- package/dist/proto/api.js +1 -1
- package/dist/rpc-client.d.ts +1 -6
- package/dist/rpc-client.d.ts.map +1 -1
- package/dist/sesame-connection.d.ts +6 -6
- package/dist/sesame-connection.d.ts.map +1 -1
- package/package.json +11 -14
package/README.md
CHANGED
|
@@ -30,11 +30,11 @@ const client = new SesameClient(8080);
|
|
|
30
30
|
|
|
31
31
|
// Build command list
|
|
32
32
|
const cl = new CommandList();
|
|
33
|
-
cl.
|
|
33
|
+
cl.sourceAdd('my-source', {
|
|
34
34
|
type: 'file',
|
|
35
35
|
path: '/path/to/video.mp4'
|
|
36
36
|
});
|
|
37
|
-
cl.
|
|
37
|
+
cl.compositorAdd('main', 1920, 1080, false);
|
|
38
38
|
|
|
39
39
|
// Execute commands
|
|
40
40
|
await client.execute(cl);
|
|
@@ -118,21 +118,21 @@ The `CommandList` class provides a fluent API for building command sequences:
|
|
|
118
118
|
const cl = new CommandList();
|
|
119
119
|
|
|
120
120
|
// Add source
|
|
121
|
-
cl.
|
|
121
|
+
cl.sourceAdd('cam1', {
|
|
122
122
|
type: 'decklink',
|
|
123
123
|
deviceIndex: 0
|
|
124
124
|
});
|
|
125
125
|
|
|
126
126
|
// Add compositor
|
|
127
|
-
cl.
|
|
127
|
+
cl.compositorAdd('main', 1920, 1080, false);
|
|
128
128
|
|
|
129
129
|
// Add node to compositor
|
|
130
|
-
cl.
|
|
130
|
+
cl.nodeAdd('main', 'cam1-node', 'source', {
|
|
131
131
|
sourceId: 'cam1'
|
|
132
132
|
});
|
|
133
133
|
|
|
134
134
|
// Set properties
|
|
135
|
-
cl.
|
|
135
|
+
cl.propertySet(
|
|
136
136
|
{ compositor: 'main', node: 'cam1-node' },
|
|
137
137
|
'transform',
|
|
138
138
|
'position',
|
|
@@ -140,7 +140,7 @@ cl.set_property(
|
|
|
140
140
|
);
|
|
141
141
|
|
|
142
142
|
// Transport control
|
|
143
|
-
cl.
|
|
143
|
+
cl.transportCommand('cam1', { type: 'play' });
|
|
144
144
|
|
|
145
145
|
// Execute all commands
|
|
146
146
|
await client.execute(cl);
|
|
@@ -155,7 +155,7 @@ import { CommandList, keyframe, EaseKind, sesame } from '@stinkycomputing/sesame
|
|
|
155
155
|
|
|
156
156
|
const cl = new CommandList();
|
|
157
157
|
|
|
158
|
-
cl.
|
|
158
|
+
cl.propertyAnimate(
|
|
159
159
|
{ compositor: 'main', node: 'cam1-node' }, // property domain
|
|
160
160
|
'cam1-node', // address
|
|
161
161
|
'opacity', // property name
|
package/dist/browser.cjs
CHANGED
|
@@ -21149,7 +21149,7 @@ var CommandList = class {
|
|
|
21149
21149
|
this.cl.commandList.splice(this.cl.commandList.indexOf(item.del), 1);
|
|
21150
21150
|
});
|
|
21151
21151
|
}
|
|
21152
|
-
|
|
21152
|
+
getCommandListMsg() {
|
|
21153
21153
|
return this.cl;
|
|
21154
21154
|
}
|
|
21155
21155
|
callback(event, data, timeOffsetMs) {
|
|
@@ -21157,32 +21157,32 @@ var CommandList = class {
|
|
|
21157
21157
|
item.callback = { event, data };
|
|
21158
21158
|
return this.add(item, timeOffsetMs);
|
|
21159
21159
|
}
|
|
21160
|
-
|
|
21160
|
+
compositorAdd(id, width, height, multisample, timeOffsetMs) {
|
|
21161
21161
|
let item = new sesame.v1.commands.CommandListItem();
|
|
21162
21162
|
item.addCompositor = { id, multisample, width, height };
|
|
21163
21163
|
return this.add(item, timeOffsetMs);
|
|
21164
21164
|
}
|
|
21165
|
-
|
|
21165
|
+
compositorRemove(id, timeOffsetMs) {
|
|
21166
21166
|
let item = new sesame.v1.commands.CommandListItem();
|
|
21167
21167
|
item.removeCompositor = { id };
|
|
21168
21168
|
return this.add(item, timeOffsetMs);
|
|
21169
21169
|
}
|
|
21170
|
-
|
|
21170
|
+
compositorClear(id, timeOffsetMs) {
|
|
21171
21171
|
let item = new sesame.v1.commands.CommandListItem();
|
|
21172
21172
|
item.clearCompositor = { id };
|
|
21173
21173
|
return this.add(item, timeOffsetMs);
|
|
21174
21174
|
}
|
|
21175
|
-
|
|
21175
|
+
sourceAdd(id, cfg, timeOffsetMs) {
|
|
21176
21176
|
let item = new sesame.v1.commands.CommandListItem();
|
|
21177
21177
|
item.addSource = { id, config: cfg };
|
|
21178
21178
|
return this.add(item, timeOffsetMs);
|
|
21179
21179
|
}
|
|
21180
|
-
|
|
21180
|
+
sourceRemove(id, timeOffsetMs) {
|
|
21181
21181
|
let item = new sesame.v1.commands.CommandListItem();
|
|
21182
21182
|
item.removeSource = { id };
|
|
21183
21183
|
return this.add(item, timeOffsetMs);
|
|
21184
21184
|
}
|
|
21185
|
-
|
|
21185
|
+
nodeAdd(id, cfg, timeOffsetMs) {
|
|
21186
21186
|
let item = new sesame.v1.commands.CommandListItem();
|
|
21187
21187
|
item.addNode = {
|
|
21188
21188
|
compositorId: cfg.compositorId,
|
|
@@ -21192,12 +21192,12 @@ var CommandList = class {
|
|
|
21192
21192
|
};
|
|
21193
21193
|
return this.add(item, timeOffsetMs);
|
|
21194
21194
|
}
|
|
21195
|
-
|
|
21195
|
+
nodeRemove(compositorId, address, timeOffsetMs) {
|
|
21196
21196
|
let item = new sesame.v1.commands.CommandListItem();
|
|
21197
21197
|
item.removeNode = { compositorId, address };
|
|
21198
21198
|
return this.add(item, timeOffsetMs);
|
|
21199
21199
|
}
|
|
21200
|
-
|
|
21200
|
+
propertySet(propertyDomain, addr, prop, val, timeOffsetMs) {
|
|
21201
21201
|
let item = new sesame.v1.commands.CommandListItem();
|
|
21202
21202
|
item.setProperty = {
|
|
21203
21203
|
address: addr,
|
|
@@ -21207,7 +21207,7 @@ var CommandList = class {
|
|
|
21207
21207
|
};
|
|
21208
21208
|
return this.add(item, timeOffsetMs);
|
|
21209
21209
|
}
|
|
21210
|
-
|
|
21210
|
+
playlistLoad(sourceId, playlist) {
|
|
21211
21211
|
const item = new sesame.v1.commands.CommandListItem();
|
|
21212
21212
|
const loadPlaylistCmd = {
|
|
21213
21213
|
items: playlist.clips.map((clip) => ({
|
|
@@ -21230,13 +21230,13 @@ var CommandList = class {
|
|
|
21230
21230
|
item.loadPlaylist = loadPlaylistCmd;
|
|
21231
21231
|
return this.add(item, 0);
|
|
21232
21232
|
}
|
|
21233
|
-
|
|
21233
|
+
playlistEject(sourceId) {
|
|
21234
21234
|
const item = new sesame.v1.commands.CommandListItem();
|
|
21235
21235
|
const ejectPlaylistCmd = { sourceId };
|
|
21236
21236
|
item.ejectPlaylist = ejectPlaylistCmd;
|
|
21237
21237
|
return this.add(item, 0);
|
|
21238
21238
|
}
|
|
21239
|
-
|
|
21239
|
+
transportCommand(id, msg, timeOffsetMs) {
|
|
21240
21240
|
let item = new sesame.v1.commands.CommandListItem();
|
|
21241
21241
|
let transportCmd = { sourceId: id };
|
|
21242
21242
|
let cmd;
|
|
@@ -21309,17 +21309,17 @@ var CommandList = class {
|
|
|
21309
21309
|
item.updateSourceTransport = transportCmd;
|
|
21310
21310
|
return this.add(item, timeOffsetMs, { transactionId: msg.transactionId, dependencies: [] });
|
|
21311
21311
|
}
|
|
21312
|
-
|
|
21312
|
+
sourceUpdate(id, cfg, timeOffsetMs) {
|
|
21313
21313
|
let item = new sesame.v1.commands.CommandListItem();
|
|
21314
21314
|
item.updateSource = { id, config: cfg };
|
|
21315
21315
|
return this.add(item, timeOffsetMs);
|
|
21316
21316
|
}
|
|
21317
|
-
|
|
21317
|
+
sourceUpdateMetadata(id, metadata, timeOffsetMs) {
|
|
21318
21318
|
let item = new sesame.v1.commands.CommandListItem();
|
|
21319
21319
|
item.setSourceMetadata = { sourceId: id, metadata };
|
|
21320
21320
|
return this.add(item, timeOffsetMs);
|
|
21321
21321
|
}
|
|
21322
|
-
|
|
21322
|
+
sourceUpdateTransport(id, cfg, timeOffsetMs) {
|
|
21323
21323
|
let item = new sesame.v1.commands.CommandListItem();
|
|
21324
21324
|
item.updateSourceTransport = {
|
|
21325
21325
|
sourceId: id,
|
|
@@ -21328,47 +21328,47 @@ var CommandList = class {
|
|
|
21328
21328
|
};
|
|
21329
21329
|
return this.add(item, timeOffsetMs);
|
|
21330
21330
|
}
|
|
21331
|
-
|
|
21331
|
+
outputAdd(id, cfg, timeOffsetMs) {
|
|
21332
21332
|
let item = new sesame.v1.commands.CommandListItem();
|
|
21333
21333
|
item.addOutput = { id, ...cfg };
|
|
21334
21334
|
return this.add(item, timeOffsetMs);
|
|
21335
21335
|
}
|
|
21336
|
-
|
|
21336
|
+
outputUpdate(id, cfg, timeOffsetMs) {
|
|
21337
21337
|
let item = new sesame.v1.commands.CommandListItem();
|
|
21338
21338
|
item.updateOutput = { id, ...cfg };
|
|
21339
21339
|
return this.add(item, timeOffsetMs);
|
|
21340
21340
|
}
|
|
21341
|
-
|
|
21341
|
+
outputRemove(id, timeOffsetMs) {
|
|
21342
21342
|
let item = new sesame.v1.commands.CommandListItem();
|
|
21343
21343
|
item.removeOutput = { id };
|
|
21344
21344
|
return this.add(item, timeOffsetMs);
|
|
21345
21345
|
}
|
|
21346
|
-
|
|
21346
|
+
audioMixerAdd(id, cfg, timeOffsetMs) {
|
|
21347
21347
|
let item = new sesame.v1.commands.CommandListItem();
|
|
21348
21348
|
item.addAudioMixer = { id, config: cfg };
|
|
21349
21349
|
return this.add(item, timeOffsetMs);
|
|
21350
21350
|
}
|
|
21351
|
-
|
|
21351
|
+
audioMixerUpdate(id, cfg, timeOffsetMs) {
|
|
21352
21352
|
let item = new sesame.v1.commands.CommandListItem();
|
|
21353
21353
|
item.updateAudioMixer = { id, config: cfg };
|
|
21354
21354
|
return this.add(item, timeOffsetMs);
|
|
21355
21355
|
}
|
|
21356
|
-
|
|
21356
|
+
audioMixerChannelAdd(mixerId, cfg, timeOffsetMs) {
|
|
21357
21357
|
let item = new sesame.v1.commands.CommandListItem();
|
|
21358
21358
|
item.addAudioChannel = { mixerId, channelConfig: cfg };
|
|
21359
21359
|
return this.add(item, timeOffsetMs);
|
|
21360
21360
|
}
|
|
21361
|
-
|
|
21361
|
+
audioMixerRemove(mixerId, timeOffsetMs) {
|
|
21362
21362
|
let item = new sesame.v1.commands.CommandListItem();
|
|
21363
21363
|
item.removeAudioMixer = { id: mixerId };
|
|
21364
21364
|
return this.add(item, timeOffsetMs);
|
|
21365
21365
|
}
|
|
21366
|
-
|
|
21366
|
+
audioMixerChannelRemove(mixerId, channelId, timeOffsetMs) {
|
|
21367
21367
|
let item = new sesame.v1.commands.CommandListItem();
|
|
21368
21368
|
item.removeAudioChannel = { mixerId, channelId };
|
|
21369
21369
|
return this.add(item, timeOffsetMs);
|
|
21370
21370
|
}
|
|
21371
|
-
|
|
21371
|
+
propertyAnimate(propertyDomain, addr, prop, before, after, keyframes, timeOffsetMs) {
|
|
21372
21372
|
let item = new sesame.v1.commands.CommandListItem();
|
|
21373
21373
|
item.animateProperty = {
|
|
21374
21374
|
address: addr,
|