atem-connection
Advanced tools
Comparing version 3.0.0-nightly-latest-20220507-145153-f8145aa.0 to 3.0.0-nightly-latest-20220528-143522-2337013.0
@@ -21,2 +21,3 @@ /// <reference types="node" /> | ||
import { FontFace } from 'freetype2'; | ||
import { TimeInfo } from './state/info'; | ||
export interface AtemOptions { | ||
@@ -37,2 +38,3 @@ address?: string; | ||
receivedCommands: [IDeserializedCommand[]]; | ||
updatedTime: [TimeInfo]; | ||
}; | ||
@@ -182,2 +184,3 @@ export declare enum AtemConnectionStatus { | ||
setMediaPoolSettings(props: Commands.MediaPoolProps): Promise<void>; | ||
hasInternalMultiviewerLabelGeneration(): boolean; | ||
/** | ||
@@ -184,0 +187,0 @@ * Write a custom multiviewer label buffer |
@@ -17,2 +17,3 @@ "use strict"; | ||
const PLazy = require("p-lazy"); | ||
const commands_1 = require("./commands"); | ||
var AtemConnectionStatus; | ||
@@ -105,3 +106,6 @@ (function (AtemConnectionStatus) { | ||
for (const command of commands) { | ||
if (state) { | ||
if (command instanceof commands_1.TimeCommand) { | ||
this.emit('updatedTime', command.properties); | ||
} | ||
else if (state) { | ||
try { | ||
@@ -709,2 +713,5 @@ const changePaths = command.applyToState(state); | ||
} | ||
hasInternalMultiviewerLabelGeneration() { | ||
return !!this.state && (0, multiviewLabel_1.hasInternalMultiviewerLabelGeneration)(this.state?.info.model); | ||
} | ||
/** | ||
@@ -717,2 +724,4 @@ * Write a custom multiviewer label buffer | ||
async writeMultiviewerLabel(inputId, buffer) { | ||
if (this.hasInternalMultiviewerLabelGeneration()) | ||
throw new Error(`ATEM doesn't support custom labels`); | ||
// Verify the buffer doesnt contain data that is 'out of bounds' and will crash the atem | ||
@@ -734,2 +743,4 @@ const badValues = new Set([255, 254]); | ||
async drawMultiviewerLabel(inputId, text) { | ||
if (this.hasInternalMultiviewerLabelGeneration()) | ||
throw new Error(`ATEM doesn't support custom labels`); | ||
const props = (0, multiviewLabel_1.calculateGenerateMultiviewerLabelProps)(this.state ?? null); | ||
@@ -736,0 +747,0 @@ if (!props) |
@@ -25,2 +25,3 @@ "use strict"; | ||
case __1.Enums.Model.Constellation8K: | ||
case __1.Enums.Model.ConstellationHD4ME: | ||
state.info.power = [false, false]; | ||
@@ -27,0 +28,0 @@ break; |
/// <reference types="node" /> | ||
import { AtemState } from '../state'; | ||
import { TimeInfo } from '../state/info'; | ||
@@ -12,3 +11,3 @@ import * as Enums from '../enums'; | ||
static deserialize(rawCommand: Buffer): TimeCommand; | ||
applyToState(state: AtemState): string; | ||
applyToState(): string[]; | ||
} | ||
@@ -15,0 +14,0 @@ export declare class TimeRequestCommand extends BasicWritableCommand<null> { |
@@ -34,5 +34,5 @@ "use strict"; | ||
} | ||
applyToState(state) { | ||
state.info.lastTime = this.properties; | ||
return 'info.lastTime'; | ||
applyToState() { | ||
// Not stored in the state | ||
return []; | ||
} | ||
@@ -39,0 +39,0 @@ } |
@@ -19,3 +19,6 @@ export declare enum Model { | ||
MiniExtreme = 16, | ||
MiniExtremeISO = 17 | ||
MiniExtremeISO = 17, | ||
ConstellationHD1ME = 18, | ||
ConstellationHD2ME = 19, | ||
ConstellationHD4ME = 20 | ||
} | ||
@@ -22,0 +25,0 @@ export declare enum ProtocolVersion { |
@@ -24,2 +24,5 @@ "use strict"; | ||
Model[Model["MiniExtremeISO"] = 17] = "MiniExtremeISO"; | ||
Model[Model["ConstellationHD1ME"] = 18] = "ConstellationHD1ME"; | ||
Model[Model["ConstellationHD2ME"] = 19] = "ConstellationHD2ME"; | ||
Model[Model["ConstellationHD4ME"] = 20] = "ConstellationHD4ME"; | ||
})(Model = exports.Model || (exports.Model = {})); | ||
@@ -26,0 +29,0 @@ var ProtocolVersion; |
/// <reference types="node" /> | ||
import { FontFace } from 'freetype2'; | ||
import { Model } from '../enums'; | ||
import { AtemState } from '../state'; | ||
@@ -29,2 +30,3 @@ export interface GenerateMultiviewerLabelProps { | ||
export declare function loadFont(fontPath?: string): Promise<FontFace>; | ||
export declare function hasInternalMultiviewerLabelGeneration(modelId: Model): boolean; | ||
//# sourceMappingURL=multiviewLabel.d.ts.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.loadFont = exports.calculateGenerateMultiviewerLabelProps = exports.generateMultiviewerLabel = void 0; | ||
exports.hasInternalMultiviewerLabelGeneration = exports.loadFont = exports.calculateGenerateMultiviewerLabelProps = exports.generateMultiviewerLabel = void 0; | ||
const freetype2_1 = require("freetype2"); | ||
@@ -279,2 +279,6 @@ const enums_1 = require("../enums"); | ||
exports.loadFont = loadFont; | ||
function hasInternalMultiviewerLabelGeneration(modelId) { | ||
return modelId >= enums_1.Model.Mini; | ||
} | ||
exports.hasInternalMultiviewerLabelGeneration = hasInternalMultiviewerLabelGeneration; | ||
//# sourceMappingURL=multiviewLabel.js.map |
@@ -65,3 +65,2 @@ import { Model, ProtocolVersion, VideoMode } from '../enums'; | ||
multiviewer?: MultiviewerInfo; | ||
lastTime?: TimeInfo; | ||
supportedVideoModes?: Readonly<Array<SupportedVideoMode>>; | ||
@@ -68,0 +67,0 @@ } |
{ | ||
"name": "atem-connection", | ||
"version": "3.0.0-nightly-latest-20220507-145153-f8145aa.0", | ||
"version": "3.0.0-nightly-latest-20220528-143522-2337013.0", | ||
"description": "Typescript Node.js library for connecting with an ATEM switcher.", | ||
@@ -66,3 +66,3 @@ "main": "dist/index.js", | ||
"@types/sinonjs__fake-timers": "^6.0.4", | ||
"jest": "^27.5.1", | ||
"jest": "^28.1.0", | ||
"jest-extended": "^2.0.0", | ||
@@ -73,3 +73,3 @@ "object-path": "^0.11.8", | ||
"standard-version": "^9.3.2", | ||
"ts-jest": "^27.1.3", | ||
"ts-jest": "^28.0.1", | ||
"ts-node": "^10.7.0", | ||
@@ -76,0 +76,0 @@ "typedoc": "^0.22.13", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1290478
13413