UNPKG

@elgato-stream-deck/core

Version:

An npm module for interfacing with the Elgato Stream Deck

35 lines 1.21 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.NetworkDockPropertiesService = void 0; const all_firmware_js_1 = require("./all-firmware.js"); class NetworkDockPropertiesService { #device; constructor(device) { this.#device = device; } async setBrightness(_percentage) { // Noop } async resetToLogo() { // Noop } async getFirmwareVersion() { const data = await this.#device.getFeatureReport(0x83, -1); return new TextDecoder('ascii').decode(data.subarray(8, 16)); } async getAllFirmwareVersions() { const [ap2Data] = await Promise.all([this.#device.getFeatureReport(0x83, -1)]); return (0, all_firmware_js_1.parseAllFirmwareVersionsHelper)({ ap2: ap2Data.slice(2), encoderAp2: null, encoderLd: null, }); } async getSerialNumber() { const data = await this.#device.getFeatureReport(0x84, -1); const length = data[3]; return new TextDecoder('ascii').decode(data.subarray(4, 4 + length)); } } exports.NetworkDockPropertiesService = NetworkDockPropertiesService; //# sourceMappingURL=network-dock.js.map