@elgato-stream-deck/core
Version:
An npm module for interfacing with the Elgato Stream Deck
124 lines • 5.63 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.DEVICE_MODELS = exports.DEVICE_MODELS2 = exports.DeviceModelType = exports.VENDOR_ID = exports.parseAllFirmwareVersionsHelper = exports.uint8ArrayToDataView = exports.StreamDeckProxy = void 0;
const tslib_1 = require("tslib");
const id_js_1 = require("./id.js");
const original_js_1 = require("./models/original.js");
const _6_key_js_1 = require("./models/6-key.js");
const _32_key_js_1 = require("./models/32-key.js");
const _15_key_js_1 = require("./models/15-key.js");
const plus_js_1 = require("./models/plus.js");
const pedal_js_1 = require("./models/pedal.js");
const neo_js_1 = require("./models/neo.js");
const studio_js_1 = require("./models/studio.js");
const network_dock_js_1 = require("./models/network-dock.js");
tslib_1.__exportStar(require("./types.js"), exports);
tslib_1.__exportStar(require("./id.js"), exports);
tslib_1.__exportStar(require("./controlDefinition.js"), exports);
var proxy_js_1 = require("./proxy.js");
Object.defineProperty(exports, "StreamDeckProxy", { enumerable: true, get: function () { return proxy_js_1.StreamDeckProxy; } });
var util_js_1 = require("./util.js");
Object.defineProperty(exports, "uint8ArrayToDataView", { enumerable: true, get: function () { return util_js_1.uint8ArrayToDataView; } });
var all_firmware_js_1 = require("./services/properties/all-firmware.js");
Object.defineProperty(exports, "parseAllFirmwareVersionsHelper", { enumerable: true, get: function () { return all_firmware_js_1.parseAllFirmwareVersionsHelper; } });
/** Elgato vendor id */
exports.VENDOR_ID = 0x0fd9;
var DeviceModelType;
(function (DeviceModelType) {
DeviceModelType["STREAMDECK"] = "streamdeck";
DeviceModelType["PEDAL"] = "pedal";
DeviceModelType["NETWORK_DOCK"] = "network-dock";
})(DeviceModelType || (exports.DeviceModelType = DeviceModelType = {}));
/** List of all the known models, and the classes to use them */
exports.DEVICE_MODELS2 = {
[id_js_1.DeviceModelId.ORIGINAL]: {
type: DeviceModelType.STREAMDECK,
productIds: [0x0060],
factory: original_js_1.StreamDeckOriginalFactory,
hasNativeTcp: false,
},
[id_js_1.DeviceModelId.MINI]: {
type: DeviceModelType.STREAMDECK,
productIds: [0x0063, 0x0090],
factory: (...args) => (0, _6_key_js_1.StreamDeck6KeyFactory)(id_js_1.DeviceModelId.MINI, ...args),
hasNativeTcp: false,
},
[id_js_1.DeviceModelId.XL]: {
type: DeviceModelType.STREAMDECK,
productIds: [0x006c, 0x008f],
factory: (...args) => (0, _32_key_js_1.StreamDeck32KeyFactory)(id_js_1.DeviceModelId.XL, ...args),
hasNativeTcp: false,
},
[id_js_1.DeviceModelId.ORIGINALV2]: {
type: DeviceModelType.STREAMDECK,
productIds: [0x006d],
factory: (...args) => (0, _15_key_js_1.StreamDeck15KeyFactory)(id_js_1.DeviceModelId.ORIGINALV2, ...args),
hasNativeTcp: false,
},
[id_js_1.DeviceModelId.ORIGINALMK2]: {
type: DeviceModelType.STREAMDECK,
productIds: [0x0080],
factory: (...args) => (0, _15_key_js_1.StreamDeck15KeyFactory)(id_js_1.DeviceModelId.ORIGINALMK2, ...args),
hasNativeTcp: false,
},
[id_js_1.DeviceModelId.ORIGINALMK2SCISSOR]: {
type: DeviceModelType.STREAMDECK,
productIds: [0x00a5],
factory: (...args) => (0, _15_key_js_1.StreamDeck15KeyFactory)(id_js_1.DeviceModelId.ORIGINALMK2SCISSOR, ...args),
hasNativeTcp: false,
},
[id_js_1.DeviceModelId.PLUS]: {
type: DeviceModelType.STREAMDECK,
productIds: [0x0084],
factory: plus_js_1.StreamDeckPlusFactory,
hasNativeTcp: false,
},
[id_js_1.DeviceModelId.PEDAL]: {
type: DeviceModelType.PEDAL,
productIds: [0x0086],
factory: pedal_js_1.StreamDeckPedalFactory,
hasNativeTcp: false,
},
[id_js_1.DeviceModelId.NEO]: {
type: DeviceModelType.STREAMDECK,
productIds: [0x009a],
factory: neo_js_1.StreamDeckNeoFactory,
hasNativeTcp: false,
},
[id_js_1.DeviceModelId.STUDIO]: {
type: DeviceModelType.STREAMDECK,
productIds: [0x00aa],
factory: studio_js_1.StreamDeckStudioFactory,
hasNativeTcp: true,
},
[id_js_1.DeviceModelId.MODULE6]: {
type: DeviceModelType.STREAMDECK,
productIds: [0x00b8],
factory: (...args) => (0, _6_key_js_1.StreamDeck6KeyFactory)(id_js_1.DeviceModelId.MODULE6, ...args),
hasNativeTcp: false,
},
[id_js_1.DeviceModelId.MODULE15]: {
type: DeviceModelType.STREAMDECK,
productIds: [0x00b9],
factory: (...args) => (0, _15_key_js_1.StreamDeck15KeyFactory)(id_js_1.DeviceModelId.MODULE15, ...args),
hasNativeTcp: false,
},
[id_js_1.DeviceModelId.MODULE32]: {
type: DeviceModelType.STREAMDECK,
productIds: [0x00ba],
factory: (...args) => (0, _32_key_js_1.StreamDeck32KeyFactory)(id_js_1.DeviceModelId.MODULE32, ...args),
hasNativeTcp: false,
},
[id_js_1.DeviceModelId.NETWORK_DOCK]: {
type: DeviceModelType.NETWORK_DOCK,
productIds: [0xffff], // Note: This isn't a real product id, but matches what is reported when querying the device
factory: network_dock_js_1.NetworkDockFactory,
hasNativeTcp: true,
},
};
/** @deprecated maybe? */
exports.DEVICE_MODELS = Object.entries(exports.DEVICE_MODELS2).map(([id, spec]) => {
const modelId = id;
return { id: modelId, productName: id_js_1.MODEL_NAMES[modelId], ...spec };
});
//# sourceMappingURL=index.js.map