@stinkycomputing/sesame-api-client 1.5.9 → 1.5.11
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 +12 -0
- package/dist/command-list.d.ts +9 -0
- package/dist/command-list.d.ts.map +1 -1
- package/dist/index.browser.mjs +168 -14
- package/dist/index.browser.mjs.map +2 -2
- package/dist/index.cjs +168 -14
- 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 +168 -14
- package/dist/index.mjs.map +2 -2
- package/dist/proto/api.d.ts +34 -0
- package/dist/proto/api.js +172 -3
- package/docs/protocol-reference.md +701 -551
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -7395,6 +7395,22 @@ var sesame = $root.sesame = (() => {
|
|
|
7395
7395
|
};
|
|
7396
7396
|
return DecklinkSourceConfig;
|
|
7397
7397
|
}();
|
|
7398
|
+
sources.SignalGeneratorVideoPattern = function() {
|
|
7399
|
+
const valuesById = {}, values = Object.create(valuesById);
|
|
7400
|
+
values[valuesById[0] = "SIGNAL_GENERATOR_VIDEO_PATTERN_BARS"] = 0;
|
|
7401
|
+
values[valuesById[1] = "SIGNAL_GENERATOR_VIDEO_PATTERN_RAMP"] = 1;
|
|
7402
|
+
values[valuesById[2] = "SIGNAL_GENERATOR_VIDEO_PATTERN_GRID"] = 2;
|
|
7403
|
+
values[valuesById[3] = "SIGNAL_GENERATOR_VIDEO_PATTERN_FILL_KEY"] = 3;
|
|
7404
|
+
return values;
|
|
7405
|
+
}();
|
|
7406
|
+
sources.SignalGeneratorAudioMode = function() {
|
|
7407
|
+
const valuesById = {}, values = Object.create(valuesById);
|
|
7408
|
+
values[valuesById[0] = "SIGNAL_GENERATOR_AUDIO_MODE_SYNC"] = 0;
|
|
7409
|
+
values[valuesById[1] = "SIGNAL_GENERATOR_AUDIO_MODE_CHANNEL_IDENT"] = 1;
|
|
7410
|
+
values[valuesById[2] = "SIGNAL_GENERATOR_AUDIO_MODE_TONE"] = 2;
|
|
7411
|
+
values[valuesById[3] = "SIGNAL_GENERATOR_AUDIO_MODE_SILENCE"] = 3;
|
|
7412
|
+
return values;
|
|
7413
|
+
}();
|
|
7398
7414
|
sources.SignalGeneratorSourceConfig = function() {
|
|
7399
7415
|
function SignalGeneratorSourceConfig(properties) {
|
|
7400
7416
|
if (properties) {
|
|
@@ -7403,12 +7419,30 @@ var sesame = $root.sesame = (() => {
|
|
|
7403
7419
|
this[keys[i]] = properties[keys[i]];
|
|
7404
7420
|
}
|
|
7405
7421
|
}
|
|
7422
|
+
SignalGeneratorSourceConfig.prototype.freeze = false;
|
|
7423
|
+
SignalGeneratorSourceConfig.prototype.videoPattern = 0;
|
|
7424
|
+
SignalGeneratorSourceConfig.prototype.audioMode = 0;
|
|
7406
7425
|
SignalGeneratorSourceConfig.create = function create(properties) {
|
|
7407
7426
|
return new SignalGeneratorSourceConfig(properties);
|
|
7408
7427
|
};
|
|
7409
7428
|
SignalGeneratorSourceConfig.encode = function encode(message, writer) {
|
|
7410
7429
|
if (!writer)
|
|
7411
7430
|
writer = $Writer.create();
|
|
7431
|
+
if (message.freeze != null && Object.hasOwnProperty.call(message, "freeze"))
|
|
7432
|
+
writer.uint32(
|
|
7433
|
+
/* id 1, wireType 0 =*/
|
|
7434
|
+
8
|
|
7435
|
+
).bool(message.freeze);
|
|
7436
|
+
if (message.videoPattern != null && Object.hasOwnProperty.call(message, "videoPattern"))
|
|
7437
|
+
writer.uint32(
|
|
7438
|
+
/* id 2, wireType 0 =*/
|
|
7439
|
+
16
|
|
7440
|
+
).int32(message.videoPattern);
|
|
7441
|
+
if (message.audioMode != null && Object.hasOwnProperty.call(message, "audioMode"))
|
|
7442
|
+
writer.uint32(
|
|
7443
|
+
/* id 3, wireType 0 =*/
|
|
7444
|
+
24
|
|
7445
|
+
).int32(message.audioMode);
|
|
7412
7446
|
return writer;
|
|
7413
7447
|
};
|
|
7414
7448
|
SignalGeneratorSourceConfig.encodeDelimited = function encodeDelimited(message, writer) {
|
|
@@ -7423,6 +7457,18 @@ var sesame = $root.sesame = (() => {
|
|
|
7423
7457
|
if (tag === error)
|
|
7424
7458
|
break;
|
|
7425
7459
|
switch (tag >>> 3) {
|
|
7460
|
+
case 1: {
|
|
7461
|
+
message.freeze = reader.bool();
|
|
7462
|
+
break;
|
|
7463
|
+
}
|
|
7464
|
+
case 2: {
|
|
7465
|
+
message.videoPattern = reader.int32();
|
|
7466
|
+
break;
|
|
7467
|
+
}
|
|
7468
|
+
case 3: {
|
|
7469
|
+
message.audioMode = reader.int32();
|
|
7470
|
+
break;
|
|
7471
|
+
}
|
|
7426
7472
|
default:
|
|
7427
7473
|
reader.skipType(tag & 7);
|
|
7428
7474
|
break;
|
|
@@ -7438,15 +7484,104 @@ var sesame = $root.sesame = (() => {
|
|
|
7438
7484
|
SignalGeneratorSourceConfig.verify = function verify(message) {
|
|
7439
7485
|
if (typeof message !== "object" || message === null)
|
|
7440
7486
|
return "object expected";
|
|
7487
|
+
if (message.freeze != null && message.hasOwnProperty("freeze")) {
|
|
7488
|
+
if (typeof message.freeze !== "boolean")
|
|
7489
|
+
return "freeze: boolean expected";
|
|
7490
|
+
}
|
|
7491
|
+
if (message.videoPattern != null && message.hasOwnProperty("videoPattern"))
|
|
7492
|
+
switch (message.videoPattern) {
|
|
7493
|
+
default:
|
|
7494
|
+
return "videoPattern: enum value expected";
|
|
7495
|
+
case 0:
|
|
7496
|
+
case 1:
|
|
7497
|
+
case 2:
|
|
7498
|
+
case 3:
|
|
7499
|
+
break;
|
|
7500
|
+
}
|
|
7501
|
+
if (message.audioMode != null && message.hasOwnProperty("audioMode"))
|
|
7502
|
+
switch (message.audioMode) {
|
|
7503
|
+
default:
|
|
7504
|
+
return "audioMode: enum value expected";
|
|
7505
|
+
case 0:
|
|
7506
|
+
case 1:
|
|
7507
|
+
case 2:
|
|
7508
|
+
case 3:
|
|
7509
|
+
break;
|
|
7510
|
+
}
|
|
7441
7511
|
return null;
|
|
7442
7512
|
};
|
|
7443
7513
|
SignalGeneratorSourceConfig.fromObject = function fromObject(object) {
|
|
7444
7514
|
if (object instanceof $root.sesame.v1.sources.SignalGeneratorSourceConfig)
|
|
7445
7515
|
return object;
|
|
7446
|
-
|
|
7516
|
+
let message = new $root.sesame.v1.sources.SignalGeneratorSourceConfig();
|
|
7517
|
+
if (object.freeze != null)
|
|
7518
|
+
message.freeze = Boolean(object.freeze);
|
|
7519
|
+
switch (object.videoPattern) {
|
|
7520
|
+
default:
|
|
7521
|
+
if (typeof object.videoPattern === "number") {
|
|
7522
|
+
message.videoPattern = object.videoPattern;
|
|
7523
|
+
break;
|
|
7524
|
+
}
|
|
7525
|
+
break;
|
|
7526
|
+
case "SIGNAL_GENERATOR_VIDEO_PATTERN_BARS":
|
|
7527
|
+
case 0:
|
|
7528
|
+
message.videoPattern = 0;
|
|
7529
|
+
break;
|
|
7530
|
+
case "SIGNAL_GENERATOR_VIDEO_PATTERN_RAMP":
|
|
7531
|
+
case 1:
|
|
7532
|
+
message.videoPattern = 1;
|
|
7533
|
+
break;
|
|
7534
|
+
case "SIGNAL_GENERATOR_VIDEO_PATTERN_GRID":
|
|
7535
|
+
case 2:
|
|
7536
|
+
message.videoPattern = 2;
|
|
7537
|
+
break;
|
|
7538
|
+
case "SIGNAL_GENERATOR_VIDEO_PATTERN_FILL_KEY":
|
|
7539
|
+
case 3:
|
|
7540
|
+
message.videoPattern = 3;
|
|
7541
|
+
break;
|
|
7542
|
+
}
|
|
7543
|
+
switch (object.audioMode) {
|
|
7544
|
+
default:
|
|
7545
|
+
if (typeof object.audioMode === "number") {
|
|
7546
|
+
message.audioMode = object.audioMode;
|
|
7547
|
+
break;
|
|
7548
|
+
}
|
|
7549
|
+
break;
|
|
7550
|
+
case "SIGNAL_GENERATOR_AUDIO_MODE_SYNC":
|
|
7551
|
+
case 0:
|
|
7552
|
+
message.audioMode = 0;
|
|
7553
|
+
break;
|
|
7554
|
+
case "SIGNAL_GENERATOR_AUDIO_MODE_CHANNEL_IDENT":
|
|
7555
|
+
case 1:
|
|
7556
|
+
message.audioMode = 1;
|
|
7557
|
+
break;
|
|
7558
|
+
case "SIGNAL_GENERATOR_AUDIO_MODE_TONE":
|
|
7559
|
+
case 2:
|
|
7560
|
+
message.audioMode = 2;
|
|
7561
|
+
break;
|
|
7562
|
+
case "SIGNAL_GENERATOR_AUDIO_MODE_SILENCE":
|
|
7563
|
+
case 3:
|
|
7564
|
+
message.audioMode = 3;
|
|
7565
|
+
break;
|
|
7566
|
+
}
|
|
7567
|
+
return message;
|
|
7447
7568
|
};
|
|
7448
|
-
SignalGeneratorSourceConfig.toObject = function toObject() {
|
|
7449
|
-
|
|
7569
|
+
SignalGeneratorSourceConfig.toObject = function toObject(message, options) {
|
|
7570
|
+
if (!options)
|
|
7571
|
+
options = {};
|
|
7572
|
+
let object = {};
|
|
7573
|
+
if (options.defaults) {
|
|
7574
|
+
object.freeze = false;
|
|
7575
|
+
object.videoPattern = options.enums === String ? "SIGNAL_GENERATOR_VIDEO_PATTERN_BARS" : 0;
|
|
7576
|
+
object.audioMode = options.enums === String ? "SIGNAL_GENERATOR_AUDIO_MODE_SYNC" : 0;
|
|
7577
|
+
}
|
|
7578
|
+
if (message.freeze != null && message.hasOwnProperty("freeze"))
|
|
7579
|
+
object.freeze = message.freeze;
|
|
7580
|
+
if (message.videoPattern != null && message.hasOwnProperty("videoPattern"))
|
|
7581
|
+
object.videoPattern = options.enums === String ? $root.sesame.v1.sources.SignalGeneratorVideoPattern[message.videoPattern] === void 0 ? message.videoPattern : $root.sesame.v1.sources.SignalGeneratorVideoPattern[message.videoPattern] : message.videoPattern;
|
|
7582
|
+
if (message.audioMode != null && message.hasOwnProperty("audioMode"))
|
|
7583
|
+
object.audioMode = options.enums === String ? $root.sesame.v1.sources.SignalGeneratorAudioMode[message.audioMode] === void 0 ? message.audioMode : $root.sesame.v1.sources.SignalGeneratorAudioMode[message.audioMode] : message.audioMode;
|
|
7584
|
+
return object;
|
|
7450
7585
|
};
|
|
7451
7586
|
SignalGeneratorSourceConfig.prototype.toJSON = function toJSON() {
|
|
7452
7587
|
return this.constructor.toObject(this, import_minimal.default.util.toJSONOptions);
|
|
@@ -25555,6 +25690,20 @@ var sesame = $root.sesame = (() => {
|
|
|
25555
25690
|
})();
|
|
25556
25691
|
|
|
25557
25692
|
// src/command-list.ts
|
|
25693
|
+
function playlistItems(playlist) {
|
|
25694
|
+
return playlist.clips.map((clip) => ({
|
|
25695
|
+
id: clip.id,
|
|
25696
|
+
recorderId: clip.recorderId,
|
|
25697
|
+
transitionTimeUs: clip.transitionTimeUs,
|
|
25698
|
+
speed: clip.speed ?? 1,
|
|
25699
|
+
audioRouting: clip.audioRouting,
|
|
25700
|
+
audioLevels: clip.audioLevels,
|
|
25701
|
+
startTimeUs: clip.startTimeUs,
|
|
25702
|
+
endTimeUs: clip.endTimeUs,
|
|
25703
|
+
transitionType: clip.transitionType ?? sesame.v1.recorder.TransitionType.TRANSITION_TYPE_MIX,
|
|
25704
|
+
transitionFadeColor: clip.transitionFadeColor ?? { x: 0, y: 0, z: 0, w: 0 }
|
|
25705
|
+
}));
|
|
25706
|
+
}
|
|
25558
25707
|
var CommandList = class {
|
|
25559
25708
|
constructor() {
|
|
25560
25709
|
this.cl = new sesame.v1.commands.CommandList();
|
|
@@ -25662,17 +25811,7 @@ var CommandList = class {
|
|
|
25662
25811
|
playlistLoad(sourceId, playlist, startTimeUs, startIndex, materialPosUs, timeOffsetMs) {
|
|
25663
25812
|
const item = new sesame.v1.commands.CommandListItem();
|
|
25664
25813
|
const loadPlaylistCmd = {
|
|
25665
|
-
items: playlist
|
|
25666
|
-
id: clip.id,
|
|
25667
|
-
recorderId: clip.recorderId,
|
|
25668
|
-
transitionTimeUs: clip.transitionTimeUs,
|
|
25669
|
-
speed: clip.speed || 1,
|
|
25670
|
-
audioRouting: clip.audioRouting,
|
|
25671
|
-
startTimeUs: clip.startTimeUs,
|
|
25672
|
-
endTimeUs: clip.endTimeUs,
|
|
25673
|
-
transitionType: clip.transitionType ?? sesame.v1.recorder.TransitionType.TRANSITION_TYPE_MIX,
|
|
25674
|
-
transitionFadeColor: clip.transitionFadeColor ?? { x: 0, y: 0, z: 0, w: 0 }
|
|
25675
|
-
})),
|
|
25814
|
+
items: playlistItems(playlist),
|
|
25676
25815
|
sourceId,
|
|
25677
25816
|
userPlaylistId: playlist.id,
|
|
25678
25817
|
startTimeUs,
|
|
@@ -25682,6 +25821,21 @@ var CommandList = class {
|
|
|
25682
25821
|
item.loadPlaylist = loadPlaylistCmd;
|
|
25683
25822
|
return this.add(item, timeOffsetMs ?? 0);
|
|
25684
25823
|
}
|
|
25824
|
+
playlistTake(sourceId, playlist, options = {}) {
|
|
25825
|
+
const item = new sesame.v1.commands.CommandListItem();
|
|
25826
|
+
const takePlaylistCmd = {
|
|
25827
|
+
items: playlistItems(playlist),
|
|
25828
|
+
sourceId,
|
|
25829
|
+
userPlaylistId: playlist.id,
|
|
25830
|
+
startTimeUs: options.startTimeUs,
|
|
25831
|
+
startIndex: options.startIndex,
|
|
25832
|
+
materialPosUs: options.materialPosUs,
|
|
25833
|
+
transitionTimeUs: options.transitionTimeUs,
|
|
25834
|
+
playbackSpeed: options.playbackSpeed
|
|
25835
|
+
};
|
|
25836
|
+
item.takePlaylist = takePlaylistCmd;
|
|
25837
|
+
return this.add(item, options.timeOffsetMs ?? 0, options);
|
|
25838
|
+
}
|
|
25685
25839
|
playlistEject(sourceId) {
|
|
25686
25840
|
const item = new sesame.v1.commands.CommandListItem();
|
|
25687
25841
|
const ejectPlaylistCmd = { sourceId };
|