UNPKG

@atem-connection/camera-control

Version:
27 lines 929 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.AtemCameraControlBatchCommandSender = void 0; const baseGenerator_1 = require("./baseGenerator"); class AtemCameraControlBatchCommandSender extends baseGenerator_1.AtemCameraControlCommandGenerator { #atem; #pendingBatch = []; constructor(atem) { super(); this.#atem = atem; } get hasPendingCommands() { return this.#pendingBatch.length > 0; } discardBatch() { this.#pendingBatch.splice(0, this.#pendingBatch.length); } async sendBatch() { const commands = this.#pendingBatch.splice(0, this.#pendingBatch.length); return this.#atem.sendCommands(commands); } addCommand(command) { this.#pendingBatch.push(command); } } exports.AtemCameraControlBatchCommandSender = AtemCameraControlBatchCommandSender; //# sourceMappingURL=batchSender.js.map