Added category icon, renamed StreamDeck
This commit is contained in:
parent
af76f81b36
commit
995165d58b
6 changed files with 11 additions and 12 deletions
|
|
@ -37,7 +37,7 @@ A short guide to help you getting started quickly.
|
||||||
You can get starting in app.js!
|
You can get starting in app.js!
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
streamDeck.onConnected(({actionInfo, appInfo, connection, messageType, port, uuid}) => {
|
$SD.onConnected(({actionInfo, appInfo, connection, messageType, port, uuid}) => {
|
||||||
const myAction = new Action('my.domain.plugin.action');
|
const myAction = new Action('my.domain.plugin.action');
|
||||||
|
|
||||||
myAction.onKeyUp(({action, context, device, event, payload}) => {
|
myAction.onKeyUp(({action, context, device, event, payload}) => {
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
/// <reference path="../../../libs/js/stream-deck.js" />
|
/// <reference path="../../../libs/js/stream-deck.js" />
|
||||||
/// <reference path="../../../libs/js/utils.js" />
|
/// <reference path="../../../libs/js/utils.js" />
|
||||||
|
|
||||||
StreamDeck.onConnected((jsn) => {
|
$SD.onConnected((jsn) => {
|
||||||
StreamDeck.loadLocalization('../../../');
|
$SD.loadLocalization('../../../');
|
||||||
|
|
||||||
const form = document.querySelector('#property-inspector');
|
const form = document.querySelector('#property-inspector');
|
||||||
const { actionInfo, appInfo, connection, messageType, port, uuid } = jsn;
|
const { actionInfo, appInfo, connection, messageType, port, uuid } = jsn;
|
||||||
|
|
@ -15,8 +15,8 @@ StreamDeck.onConnected((jsn) => {
|
||||||
'input',
|
'input',
|
||||||
Utils.debounce(150, () => {
|
Utils.debounce(150, () => {
|
||||||
const value = Utils.getFormValue(form);
|
const value = Utils.getFormValue(form);
|
||||||
StreamDeck.sendToPlugin(value, context);
|
$SD.sendToPlugin(value, context);
|
||||||
StreamDeck.setSettings(value);
|
$SD.setSettings(value);
|
||||||
console.log(value);
|
console.log(value);
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
/**
|
/**
|
||||||
* The first event fired when Stream Deck starts
|
* The first event fired when Stream Deck starts
|
||||||
*/
|
*/
|
||||||
StreamDeck.onConnected(({ actionInfo, appInfo, connection, messageType, port, uuid }) => {
|
$SD.onConnected(({ actionInfo, appInfo, connection, messageType, port, uuid }) => {
|
||||||
// TODO: Remove this test logging code and replace with simple action
|
// TODO: Remove this test logging code and replace with simple action
|
||||||
console.log({ object: 'stream-deck', event: 'onConnected' });
|
console.log({ object: 'stream-deck', event: 'onConnected' });
|
||||||
|
|
||||||
|
|
@ -43,7 +43,7 @@ StreamDeck.onConnected(({ actionInfo, appInfo, connection, messageType, port, uu
|
||||||
console.log({ object: 'action', event: 'onSendToPropertyInspector' });
|
console.log({ object: 'action', event: 'onSendToPropertyInspector' });
|
||||||
});
|
});
|
||||||
|
|
||||||
StreamDeck.onDeviceDidConnect(() => {
|
$SD.onDeviceDidConnect(() => {
|
||||||
console.log({ object: 'stream-deck', event: 'onDeviceDidConnect' });
|
console.log({ object: 'stream-deck', event: 'onDeviceDidConnect' });
|
||||||
})
|
})
|
||||||
.onDeviceDidDisconnect(() => {
|
.onDeviceDidDisconnect(() => {
|
||||||
|
|
@ -53,11 +53,9 @@ StreamDeck.onConnected(({ actionInfo, appInfo, connection, messageType, port, uu
|
||||||
console.log({ object: 'stream-deck', event: 'onSendToPropertyInspector' });
|
console.log({ object: 'stream-deck', event: 'onSendToPropertyInspector' });
|
||||||
})
|
})
|
||||||
.onApplicationDidLaunch(() => {
|
.onApplicationDidLaunch(() => {
|
||||||
// TODO: figure out why this event does not fire
|
|
||||||
console.log({ object: 'stream-deck', event: 'onApplicationDidLaunch' });
|
console.log({ object: 'stream-deck', event: 'onApplicationDidLaunch' });
|
||||||
})
|
})
|
||||||
.onApplicationDidTerminate(() => {
|
.onApplicationDidTerminate(() => {
|
||||||
// TODO: figure out why this event does not fire
|
|
||||||
console.log({ object: 'stream-deck', event: 'onApplicationDidTerminate' });
|
console.log({ object: 'stream-deck', event: 'onApplicationDidTerminate' });
|
||||||
})
|
})
|
||||||
.onSystemDidWakeUp(() => {
|
.onSystemDidWakeUp(() => {
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ const fadeColor = function (col, amt) {
|
||||||
return '#' + (g | (b << 8) | (r << 16)).toString(16).padStart(6, 0);
|
return '#' + (g | (b << 8) | (r << 16)).toString(16).padStart(6, 0);
|
||||||
};
|
};
|
||||||
|
|
||||||
StreamDeck.onConnected(({ appInfo }) => {
|
$SD.onConnected(({ appInfo }) => {
|
||||||
if (appInfo?.colors) return;
|
if (appInfo?.colors) return;
|
||||||
const clrs = appInfo.colors;
|
const clrs = appInfo.colors;
|
||||||
const node = document.getElementById('#sdpi-dynamic-styles') || document.createElement('style');
|
const node = document.getElementById('#sdpi-dynamic-styles') || document.createElement('style');
|
||||||
|
|
|
||||||
|
|
@ -368,7 +368,7 @@ class ELGSDStreamDeck {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var StreamDeck = new ELGSDStreamDeck();
|
var $SD = new ELGSDStreamDeck();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* connectElgatoStreamDeckSocket
|
* connectElgatoStreamDeckSocket
|
||||||
|
|
@ -381,5 +381,5 @@ var StreamDeck = new ELGSDStreamDeck();
|
||||||
* @param {string} actionInfo - Context is an internal identifier used to communicate to the host application.
|
* @param {string} actionInfo - Context is an internal identifier used to communicate to the host application.
|
||||||
*/
|
*/
|
||||||
function connectElgatoStreamDeckSocket() {
|
function connectElgatoStreamDeckSocket() {
|
||||||
StreamDeck.connect(arguments);
|
$SD.connect(arguments);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"Category": "Template Plugin",
|
"Category": "Template Plugin",
|
||||||
|
"CategoryIcon": "actions/template/assets/actionimage",
|
||||||
"Actions": [
|
"Actions": [
|
||||||
{
|
{
|
||||||
"Icon": "actions/template/assets/actionimage",
|
"Icon": "actions/template/assets/actionimage",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue