UNPKG

@elgato-stream-deck/core

Version:

An npm module for interfacing with the Elgato Stream Deck

72 lines 2.11 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.StreamDeckPlusFactory = StreamDeckPlusFactory; const base_js_1 = require("./base.js"); const generic_gen2_js_1 = require("./generic-gen2.js"); const id_js_1 = require("../id.js"); const controlsGenerator_js_1 = require("../controlsGenerator.js"); const plus_js_1 = require("../services/lcdSegmentDisplay/plus.js"); const plusControls = (0, controlsGenerator_js_1.generateButtonsGrid)(4, 2, { width: 120, height: 120 }); plusControls.push({ type: 'lcd-segment', row: 2, column: 0, columnSpan: 4, rowSpan: 1, id: 0, pixelSize: Object.freeze({ width: 800, height: 100, }), drawRegions: true, }, { type: 'encoder', row: 3, column: 0, index: 0, hidIndex: 0, hasLed: false, ledRingSteps: 0, }, { type: 'encoder', row: 3, column: 1, index: 1, hidIndex: 1, hasLed: false, ledRingSteps: 0, }, { type: 'encoder', row: 3, column: 2, index: 2, hidIndex: 2, hasLed: false, ledRingSteps: 0, }, { type: 'encoder', row: 3, column: 3, index: 3, hidIndex: 3, hasLed: false, ledRingSteps: 0, }); const plusProperties = { MODEL: id_js_1.DeviceModelId.PLUS, PRODUCT_NAME: id_js_1.MODEL_NAMES[id_js_1.DeviceModelId.PLUS], SUPPORTS_RGB_KEY_FILL: true, CONTROLS: (0, controlsGenerator_js_1.freezeDefinitions)(plusControls), KEY_SPACING_HORIZONTAL: 99, KEY_SPACING_VERTICAL: 40, FULLSCREEN_PANELS: 0, HAS_NFC_READER: false, SUPPORTS_CHILD_DEVICES: false, }; const lcdSegmentControls = plusProperties.CONTROLS.filter((control) => control.type === 'lcd-segment'); function StreamDeckPlusFactory(device, options) { const services = (0, generic_gen2_js_1.createBaseGen2Properties)(device, options, plusProperties, null, true); services.lcdSegmentDisplay = new plus_js_1.StreamDeckPlusLcdService(options.encodeJPEG, device, lcdSegmentControls); return new base_js_1.StreamDeckBase(device, options, services); } //# sourceMappingURL=plus.js.map