Compare commits
52 Commits
plugin-d&b
..
v1.0.0
| Author | SHA1 | Date | |
|---|---|---|---|
| f0b04d2d1c | |||
| 3c17c0a980 | |||
| 7d7d76d35c | |||
| 665b926e44 | |||
| 679fee26f7 | |||
| e00029963f | |||
| 6bd852a50b | |||
| 8ef1ba9bcf | |||
| 99af6e9093 | |||
| cfc3c6e5de | |||
| 9a42f0f88c | |||
| 6e92891f6c | |||
| d58ea7012c | |||
| d5252e9278 | |||
| 930b4daf16 | |||
| 5accc828db | |||
| eb1d120345 | |||
| 719e5fce41 | |||
| 5025ff3694 | |||
| 0ab85bc9c4 | |||
| 6ea358b813 | |||
| ae091a7f88 | |||
| cf364a7381 | |||
| cf1874a29b | |||
| 38962ff052 | |||
| 57324c82e9 | |||
| bf06ec7f3a | |||
| 382dc8a0fe | |||
| 0444d3976e | |||
| c61b189634 | |||
| 09ceb01963 | |||
| af1094d3cd | |||
| c0d8c58e90 | |||
| 6d69bac639 | |||
| dbb7064385 | |||
| aec2effee1 | |||
| 454e794d4c | |||
| 55ede73f22 | |||
| 76d8f5e736 | |||
| bd9894c596 | |||
| 77549aff56 | |||
| a237841a3a | |||
| 0364924f24 | |||
| d7508c1e22 | |||
| 4cf68d3a07 | |||
| 03ad8f9682 | |||
| f273dab45d | |||
| 00c8a30221 | |||
| 980bd0e1ee | |||
| d6cc11f97d | |||
| 5503ac9888 | |||
| e90aa6fc17 |
@@ -21,14 +21,9 @@ A dashboard for everything in your show.
|
||||
- XAir Audio Consoles
|
||||
- Art-Net Universes
|
||||
- sACN Universes
|
||||
- ATEM VIdeo Mixers
|
||||
- Shure ULXD Wireless
|
||||
|
||||
#### Future Devices
|
||||
|
||||
- ATEM Video Mixers
|
||||
- DiGiCo Consoles
|
||||
- d&b DS100, amps
|
||||
- Hog
|
||||
- Meyer Galileo Processors
|
||||
|
||||
# Plugins
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
"@electron/notarize": "^1.2.3",
|
||||
"electron": "^22.2.0",
|
||||
"electron-builder": "^24.4.0",
|
||||
"eslint": "^8.40.0",
|
||||
"eslint": "^8.41.0",
|
||||
"eslint-config-airbnb-base": "^15.0.0",
|
||||
"eslint-config-prettier": "^8.8.0",
|
||||
"eslint-plugin-import": "^2.27.5",
|
||||
@@ -321,9 +321,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@eslint/js": {
|
||||
"version": "8.40.0",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.40.0.tgz",
|
||||
"integrity": "sha512-ElyB54bJIhXQYVKjDSvCkPO1iU1tSAeVQJbllWJq1XQSmmA4dgFk8CbiBGpiOPxleE48vDogxCtmMYku4HSVLA==",
|
||||
"version": "8.41.0",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.41.0.tgz",
|
||||
"integrity": "sha512-LxcyMGxwmTh2lY9FwHPGWOHmYFCZvbrFCBZL4FzSSsxsRPuhrYUg/49/0KDfW8tnIEaEHtfmn6+NPN+1DqaNmA==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||
@@ -2453,15 +2453,15 @@
|
||||
}
|
||||
},
|
||||
"node_modules/eslint": {
|
||||
"version": "8.40.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.40.0.tgz",
|
||||
"integrity": "sha512-bvR+TsP9EHL3TqNtj9sCNJVAFK3fBN8Q7g5waghxyRsPLIMwL73XSKnZFK0hk/O2ANC+iAoq6PWMQ+IfBAJIiQ==",
|
||||
"version": "8.41.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.41.0.tgz",
|
||||
"integrity": "sha512-WQDQpzGBOP5IrXPo4Hc0814r4/v2rrIsB0rhT7jtunIalgg6gYXWhRMOejVO8yH21T/FGaxjmFjBMNqcIlmH1Q==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@eslint-community/eslint-utils": "^4.2.0",
|
||||
"@eslint-community/regexpp": "^4.4.0",
|
||||
"@eslint/eslintrc": "^2.0.3",
|
||||
"@eslint/js": "8.40.0",
|
||||
"@eslint/js": "8.41.0",
|
||||
"@humanwhocodes/config-array": "^0.11.8",
|
||||
"@humanwhocodes/module-importer": "^1.0.1",
|
||||
"@nodelib/fs.walk": "^1.2.8",
|
||||
@@ -2481,13 +2481,12 @@
|
||||
"find-up": "^5.0.0",
|
||||
"glob-parent": "^6.0.2",
|
||||
"globals": "^13.19.0",
|
||||
"grapheme-splitter": "^1.0.4",
|
||||
"graphemer": "^1.4.0",
|
||||
"ignore": "^5.2.0",
|
||||
"import-fresh": "^3.0.0",
|
||||
"imurmurhash": "^0.1.4",
|
||||
"is-glob": "^4.0.0",
|
||||
"is-path-inside": "^3.0.3",
|
||||
"js-sdsl": "^4.1.4",
|
||||
"js-yaml": "^4.1.0",
|
||||
"json-stable-stringify-without-jsonify": "^1.0.1",
|
||||
"levn": "^0.4.1",
|
||||
@@ -3178,10 +3177,10 @@
|
||||
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz",
|
||||
"integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ=="
|
||||
},
|
||||
"node_modules/grapheme-splitter": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz",
|
||||
"integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==",
|
||||
"node_modules/graphemer": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz",
|
||||
"integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/has": {
|
||||
@@ -3823,16 +3822,6 @@
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/js-sdsl": {
|
||||
"version": "4.3.0",
|
||||
"resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.3.0.tgz",
|
||||
"integrity": "sha512-mifzlm2+5nZ+lEcLJMoBK0/IH/bDg8XnJfd/Wq6IP+xoCjLZsTOnV2QpxlVbX9bMnkl5PdEjNtBJ9Cj1NjifhQ==",
|
||||
"dev": true,
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/js-sdsl"
|
||||
}
|
||||
},
|
||||
"node_modules/js-yaml": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
|
||||
@@ -6241,9 +6230,9 @@
|
||||
}
|
||||
},
|
||||
"@eslint/js": {
|
||||
"version": "8.40.0",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.40.0.tgz",
|
||||
"integrity": "sha512-ElyB54bJIhXQYVKjDSvCkPO1iU1tSAeVQJbllWJq1XQSmmA4dgFk8CbiBGpiOPxleE48vDogxCtmMYku4HSVLA==",
|
||||
"version": "8.41.0",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.41.0.tgz",
|
||||
"integrity": "sha512-LxcyMGxwmTh2lY9FwHPGWOHmYFCZvbrFCBZL4FzSSsxsRPuhrYUg/49/0KDfW8tnIEaEHtfmn6+NPN+1DqaNmA==",
|
||||
"dev": true
|
||||
},
|
||||
"@gar/promisify": {
|
||||
@@ -7863,15 +7852,15 @@
|
||||
"dev": true
|
||||
},
|
||||
"eslint": {
|
||||
"version": "8.40.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.40.0.tgz",
|
||||
"integrity": "sha512-bvR+TsP9EHL3TqNtj9sCNJVAFK3fBN8Q7g5waghxyRsPLIMwL73XSKnZFK0hk/O2ANC+iAoq6PWMQ+IfBAJIiQ==",
|
||||
"version": "8.41.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.41.0.tgz",
|
||||
"integrity": "sha512-WQDQpzGBOP5IrXPo4Hc0814r4/v2rrIsB0rhT7jtunIalgg6gYXWhRMOejVO8yH21T/FGaxjmFjBMNqcIlmH1Q==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@eslint-community/eslint-utils": "^4.2.0",
|
||||
"@eslint-community/regexpp": "^4.4.0",
|
||||
"@eslint/eslintrc": "^2.0.3",
|
||||
"@eslint/js": "8.40.0",
|
||||
"@eslint/js": "8.41.0",
|
||||
"@humanwhocodes/config-array": "^0.11.8",
|
||||
"@humanwhocodes/module-importer": "^1.0.1",
|
||||
"@nodelib/fs.walk": "^1.2.8",
|
||||
@@ -7891,13 +7880,12 @@
|
||||
"find-up": "^5.0.0",
|
||||
"glob-parent": "^6.0.2",
|
||||
"globals": "^13.19.0",
|
||||
"grapheme-splitter": "^1.0.4",
|
||||
"graphemer": "^1.4.0",
|
||||
"ignore": "^5.2.0",
|
||||
"import-fresh": "^3.0.0",
|
||||
"imurmurhash": "^0.1.4",
|
||||
"is-glob": "^4.0.0",
|
||||
"is-path-inside": "^3.0.3",
|
||||
"js-sdsl": "^4.1.4",
|
||||
"js-yaml": "^4.1.0",
|
||||
"json-stable-stringify-without-jsonify": "^1.0.1",
|
||||
"levn": "^0.4.1",
|
||||
@@ -8420,10 +8408,10 @@
|
||||
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz",
|
||||
"integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ=="
|
||||
},
|
||||
"grapheme-splitter": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz",
|
||||
"integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==",
|
||||
"graphemer": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz",
|
||||
"integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==",
|
||||
"dev": true
|
||||
},
|
||||
"has": {
|
||||
@@ -8867,12 +8855,6 @@
|
||||
"minimatch": "^3.0.4"
|
||||
}
|
||||
},
|
||||
"js-sdsl": {
|
||||
"version": "4.3.0",
|
||||
"resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.3.0.tgz",
|
||||
"integrity": "sha512-mifzlm2+5nZ+lEcLJMoBK0/IH/bDg8XnJfd/Wq6IP+xoCjLZsTOnV2QpxlVbX9bMnkl5PdEjNtBJ9Cj1NjifhQ==",
|
||||
"dev": true
|
||||
},
|
||||
"js-yaml": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "cue-view",
|
||||
"productName": "Cue View",
|
||||
"version": "0.9.9-pre",
|
||||
"version": "1.0.0",
|
||||
"description": "A dashboard for everything in your show",
|
||||
"main": "main.js",
|
||||
"scripts": {
|
||||
@@ -23,7 +23,7 @@
|
||||
"@electron/notarize": "^1.2.3",
|
||||
"electron": "^22.2.0",
|
||||
"electron-builder": "^24.4.0",
|
||||
"eslint": "^8.40.0",
|
||||
"eslint": "^8.41.0",
|
||||
"eslint-config-airbnb-base": "^15.0.0",
|
||||
"eslint-config-prettier": "^8.8.0",
|
||||
"eslint-plugin-import": "^2.27.5",
|
||||
|
||||
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 3.0 KiB |
@@ -1,2 +1,2 @@
|
||||
<p><em>Art-Net</em> requires no configuration.</p>
|
||||
<p>Quit any other applications that use Art-Net before using this plugin.</p>
|
||||
<p>Art-Net™ Designed by and Copyright Artistic Licence Holdings Ltd</p>
|
||||
|
||||
@@ -23,11 +23,21 @@ exports.ready = function ready(_device) {
|
||||
};
|
||||
|
||||
exports.data = function data(_device, buf) {
|
||||
if (buf.length < 18) {
|
||||
const device = _device;
|
||||
|
||||
if (buf.length < 18 || buf.slice(0, 7).toString() !== 'Art-Net') {
|
||||
return;
|
||||
}
|
||||
|
||||
const opCode = buf.readUInt16BE(8);
|
||||
|
||||
if (opCode === 33) {
|
||||
sendArtPollReply(device);
|
||||
return;
|
||||
}
|
||||
|
||||
const universeIndex = buf.readUInt8(14);
|
||||
const device = _device;
|
||||
|
||||
let universe = device.data.universes[universeIndex];
|
||||
|
||||
if (!universe) {
|
||||
@@ -93,3 +103,53 @@ exports.update = function update(_device, _document, updateType, updateData) {
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
function sendArtPollReply(device) {
|
||||
// minimum viable Art-Net packet
|
||||
// not to full Art-Net spec
|
||||
// https://art-net.org.uk/how-it-works/discovery-packets/artpollreply/
|
||||
|
||||
const interfaces = device.getNetworkInterfaces();
|
||||
|
||||
for (let i = 0; i < Object.keys(interfaces).length; i++) {
|
||||
const buf = Buffer.alloc(213);
|
||||
buf.write('Art-Net', 0);
|
||||
|
||||
buf.writeInt16LE(0x2100, 8);
|
||||
|
||||
const addr = interfaces[Object.keys(interfaces)[i]][0].address.split('.');
|
||||
|
||||
buf.writeUInt8(addr[0], 10);
|
||||
buf.writeUInt8(addr[1], 11);
|
||||
buf.writeUInt8(addr[2], 12);
|
||||
buf.writeUInt8(addr[3], 13);
|
||||
|
||||
buf.writeInt16LE(6454, 14);
|
||||
|
||||
buf.write('Cue View', 26);
|
||||
|
||||
buf.writeUInt8(4, 173);
|
||||
|
||||
buf.writeUInt8(0xc0, 174);
|
||||
buf.writeUInt8(0xc0, 175);
|
||||
buf.writeUInt8(0xc0, 176);
|
||||
buf.writeUInt8(0xc0, 177);
|
||||
|
||||
buf.writeUInt8(0x80, 178);
|
||||
buf.writeUInt8(0x80, 179);
|
||||
buf.writeUInt8(0x80, 180);
|
||||
buf.writeUInt8(0x80, 181);
|
||||
|
||||
buf.writeUInt8(0x80, 182);
|
||||
buf.writeUInt8(0x80, 183);
|
||||
buf.writeUInt8(0x80, 184);
|
||||
buf.writeUInt8(0x80, 185);
|
||||
|
||||
buf.writeUInt8(0x00, 186);
|
||||
buf.writeUInt8(0x01, 187);
|
||||
buf.writeUInt8(0x02, 188);
|
||||
buf.writeUInt8(0x03, 189);
|
||||
|
||||
device.send(buf);
|
||||
}
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 3.4 KiB |
@@ -1,441 +0,0 @@
|
||||
exports.config = {
|
||||
defaultName: 'd&b Amps',
|
||||
connectionType: 'TCPsocket',
|
||||
defaultPort: 30013,
|
||||
mayChangePort: false,
|
||||
heartbeatInterval: 1000,
|
||||
heartbeatTimeout: 5000,
|
||||
searchOptions: {
|
||||
type: 'Bonjour',
|
||||
bonjourName: 'oca',
|
||||
validateResponse(msg, info) {
|
||||
return msg.includes('d&b audiotechnik');
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
exports.ready = function ready(_device) {
|
||||
const device = _device;
|
||||
|
||||
device.data.oca = structuredClone(OCAStructure);
|
||||
|
||||
device.data.ocaKeys = Object.keys(device.data.oca);
|
||||
device.data.ocaIDs = [];
|
||||
|
||||
for (let i = 0; i < device.data.ocaKeys.length; i++) {
|
||||
const key = device.data.oca[device.data.ocaKeys[i]];
|
||||
key.parameters = [0];
|
||||
device.data.ocaIDs[i] = key;
|
||||
ocaCommandRequest(i, key.target, key.method, device);
|
||||
ocaSubscriptionRequest(i, key.target, key.method, device);
|
||||
}
|
||||
};
|
||||
|
||||
exports.data = function data(_device, _buffer) {
|
||||
const device = _device;
|
||||
|
||||
if (_buffer[0] === 0x3b && _buffer[1] === 0 && _buffer[2] === 1) {
|
||||
let start = 0;
|
||||
while (start < _buffer.length - 3) {
|
||||
const messageLength = _buffer.readInt32BE(start + 3) + 1;
|
||||
const message = _buffer.slice(start, start + messageLength);
|
||||
|
||||
const messageType = message[7];
|
||||
|
||||
if (messageType === 0x04) {
|
||||
// keep-alive message
|
||||
} else if (messageType === 0x02) {
|
||||
// console.log('NOTIFICATION!!');
|
||||
console.log(message.slice(33));
|
||||
} else if (messageType === 0x03) {
|
||||
const messageHandle = _buffer.readInt32BE(start + 14);
|
||||
const paramCount = message[19];
|
||||
|
||||
if (paramCount) {
|
||||
let paramsStart = 20;
|
||||
const ocaObj = device.data.ocaIDs[messageHandle];
|
||||
|
||||
ocaObj.parameters = [];
|
||||
|
||||
while (paramsStart < message.length) {
|
||||
let paramLength = 0;
|
||||
let param;
|
||||
|
||||
if (ocaObj.format === 'int16' || ocaObj.format === 'float' || ocaObj.format === 'int32') {
|
||||
paramLength = 2;
|
||||
param = message.slice(paramsStart, paramsStart + paramLength + 2);
|
||||
} else if (ocaObj.format === 'int8') {
|
||||
paramLength = 1;
|
||||
param = message.slice(paramsStart, paramsStart + paramLength);
|
||||
} else if (ocaObj.format === 'stringArray') {
|
||||
const nextBreak = message.indexOf(0x00, paramsStart + 1);
|
||||
|
||||
if (nextBreak < 0) {
|
||||
break;
|
||||
}
|
||||
|
||||
paramLength = nextBreak - paramsStart + 1;
|
||||
param = message.slice(paramsStart - 1, paramsStart + paramLength - 1).toString();
|
||||
} else {
|
||||
paramLength = message.readInt16BE(20);
|
||||
param = message.slice(paramsStart + 2, paramsStart + 2 + paramLength);
|
||||
}
|
||||
|
||||
if (ocaObj.format === 'string') {
|
||||
ocaObj.parameters.push(param.toString());
|
||||
} else if (ocaObj.format === 'stringArray') {
|
||||
ocaObj.parameters.push(param.toString());
|
||||
} else if (ocaObj.format === 'float') {
|
||||
ocaObj.parameters.push(param.readFloatBE(0));
|
||||
} else if (ocaObj.format === 'int16') {
|
||||
ocaObj.parameters.push(param.readInt16BE(0));
|
||||
} else if (ocaObj.format === 'int8') {
|
||||
ocaObj.parameters.push(param.readInt8(0));
|
||||
} else if (ocaObj.format === 'int32') {
|
||||
ocaObj.parameters.push(param.readInt32BE(0));
|
||||
} else {
|
||||
ocaObj.parameters.push(param);
|
||||
}
|
||||
this.deviceInfoUpdate(device, 'status', 'ok');
|
||||
paramsStart += paramLength + 2;
|
||||
}
|
||||
}
|
||||
device.draw();
|
||||
}
|
||||
|
||||
start += messageLength;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
exports.heartbeat = function heartbeat(device) {
|
||||
device.send(Buffer.from('3b00010000000b0400010001', 'hex'));
|
||||
};
|
||||
|
||||
function ocaCommandRequest(handle, target, method, device) {
|
||||
const buf = Buffer.from('3b00010000001a01000100000011AAAAAAAABBBBBBBBCCCCCCCC00', 'hex');
|
||||
buf.writeInt32BE(handle, 14); // handle
|
||||
buf.writeInt32BE(target, 18); // target
|
||||
buf.writeInt32BE(method, 22); // method
|
||||
device.send(buf);
|
||||
return buf;
|
||||
}
|
||||
|
||||
function ocaSubscriptionRequest(handle, target, method, device) {
|
||||
const buf = Buffer.from(
|
||||
'3b00010000002f01000100000026000000ae00000004000300010510008205000100010000041f000100010000010000',
|
||||
'hex'
|
||||
);
|
||||
buf.writeInt32BE(handle, 14); // handle
|
||||
buf.writeInt32BE(target, 27); // target
|
||||
device.send(buf);
|
||||
return buf;
|
||||
}
|
||||
|
||||
const OCAStructure = {
|
||||
ModelDescription: {
|
||||
target: 0x1000010d,
|
||||
method: 0x00050001,
|
||||
format: 'string',
|
||||
},
|
||||
PwrOn: {
|
||||
target: 0x10000100,
|
||||
method: 0x00040001,
|
||||
format: 'int16',
|
||||
},
|
||||
SubNet: {
|
||||
target: 0x10000109,
|
||||
method: 0x00050001,
|
||||
format: 'int32',
|
||||
},
|
||||
DeviceId: {
|
||||
target: 0x10000108,
|
||||
method: 0x00050001,
|
||||
format: 'int32',
|
||||
},
|
||||
DeviceType: {
|
||||
target: 0x10000034,
|
||||
method: 0x00050001,
|
||||
format: 'string',
|
||||
},
|
||||
FirmwareRevision: {
|
||||
target: 0x10000031,
|
||||
method: 0x00050001,
|
||||
format: 'string',
|
||||
},
|
||||
ChannelNameA: {
|
||||
target: 0x10008215,
|
||||
method: 0x00050001,
|
||||
format: 'string',
|
||||
},
|
||||
ChannelNameB: {
|
||||
target: 0x10010215,
|
||||
method: 0x00050001,
|
||||
format: 'string',
|
||||
},
|
||||
ChannelNameC: {
|
||||
target: 0x10018215,
|
||||
method: 0x00050001,
|
||||
format: 'string',
|
||||
},
|
||||
ChannelNameD: {
|
||||
target: 0x10020215,
|
||||
method: 0x00050001,
|
||||
format: 'string',
|
||||
},
|
||||
DelayA: {
|
||||
target: 0x10008207,
|
||||
method: 0x00050001,
|
||||
format: 'float',
|
||||
},
|
||||
DelayB: {
|
||||
target: 0x10010207,
|
||||
method: 0x00050001,
|
||||
format: 'float',
|
||||
},
|
||||
DelayC: {
|
||||
target: 0x10018207,
|
||||
method: 0x00050001,
|
||||
format: 'float',
|
||||
},
|
||||
DelayD: {
|
||||
target: 0x10020207,
|
||||
method: 0x00050001,
|
||||
format: 'float',
|
||||
},
|
||||
InputEnable1A: {
|
||||
target: 0x10008220,
|
||||
method: 0x00040001,
|
||||
format: 'int16',
|
||||
},
|
||||
InputEnable2A: {
|
||||
target: 0x10008221,
|
||||
method: 0x00040001,
|
||||
format: 'int16',
|
||||
},
|
||||
InputEnable3A: {
|
||||
target: 0x10008222,
|
||||
method: 0x00040001,
|
||||
format: 'int16',
|
||||
},
|
||||
InputEnable4A: {
|
||||
target: 0x10008223,
|
||||
method: 0x00040001,
|
||||
format: 'int16',
|
||||
},
|
||||
InputEnable5A: {
|
||||
target: 0x10008224,
|
||||
method: 0x00040001,
|
||||
format: 'int16',
|
||||
},
|
||||
InputEnable6A: {
|
||||
target: 0x10008225,
|
||||
method: 0x00040001,
|
||||
format: 'int16',
|
||||
},
|
||||
InputEnable7A: {
|
||||
target: 0x10008226,
|
||||
method: 0x00040001,
|
||||
format: 'int16',
|
||||
},
|
||||
InputEnable8A: {
|
||||
target: 0x10008227,
|
||||
method: 0x00040001,
|
||||
format: 'int16',
|
||||
},
|
||||
InputEnable1B: {
|
||||
target: 0x10010220,
|
||||
method: 0x00040001,
|
||||
format: 'int16',
|
||||
},
|
||||
InputEnable2B: {
|
||||
target: 0x10010221,
|
||||
method: 0x00040001,
|
||||
format: 'int16',
|
||||
},
|
||||
InputEnable3B: {
|
||||
target: 0x10010222,
|
||||
method: 0x00040001,
|
||||
format: 'int16',
|
||||
},
|
||||
InputEnable4B: {
|
||||
target: 0x10010223,
|
||||
method: 0x00040001,
|
||||
format: 'int16',
|
||||
},
|
||||
InputEnable5B: {
|
||||
target: 0x10010224,
|
||||
method: 0x00040001,
|
||||
format: 'int16',
|
||||
},
|
||||
InputEnable6B: {
|
||||
target: 0x10010225,
|
||||
method: 0x00040001,
|
||||
format: 'int16',
|
||||
},
|
||||
InputEnable7B: {
|
||||
target: 0x10010226,
|
||||
method: 0x00040001,
|
||||
format: 'int16',
|
||||
},
|
||||
InputEnable8B: {
|
||||
target: 0x10010227,
|
||||
method: 0x00040001,
|
||||
format: 'int16',
|
||||
},
|
||||
InputEnable1C: {
|
||||
target: 0x10018220,
|
||||
method: 0x00040001,
|
||||
format: 'int16',
|
||||
},
|
||||
InputEnable2C: {
|
||||
target: 0x10018221,
|
||||
method: 0x00040001,
|
||||
format: 'int16',
|
||||
},
|
||||
InputEnable3C: {
|
||||
target: 0x10018222,
|
||||
method: 0x00040001,
|
||||
format: 'int16',
|
||||
},
|
||||
InputEnable4C: {
|
||||
target: 0x10018223,
|
||||
method: 0x00040001,
|
||||
format: 'int16',
|
||||
},
|
||||
InputEnable5C: {
|
||||
target: 0x10018224,
|
||||
method: 0x00040001,
|
||||
format: 'int16',
|
||||
},
|
||||
InputEnable6C: {
|
||||
target: 0x10018225,
|
||||
method: 0x00040001,
|
||||
format: 'int16',
|
||||
},
|
||||
InputEnable7C: {
|
||||
target: 0x10018226,
|
||||
method: 0x00040001,
|
||||
format: 'int16',
|
||||
},
|
||||
InputEnable8C: {
|
||||
target: 0x10018227,
|
||||
method: 0x00040001,
|
||||
format: 'int16',
|
||||
},
|
||||
InputEnable1D: {
|
||||
target: 0x10020220,
|
||||
method: 0x00040001,
|
||||
format: 'int16',
|
||||
},
|
||||
InputEnable2D: {
|
||||
target: 0x10020221,
|
||||
method: 0x00040001,
|
||||
format: 'int16',
|
||||
},
|
||||
InputEnable3D: {
|
||||
target: 0x10020222,
|
||||
method: 0x00040001,
|
||||
format: 'int16',
|
||||
},
|
||||
InputEnable4D: {
|
||||
target: 0x10020223,
|
||||
method: 0x00040001,
|
||||
format: 'int16',
|
||||
},
|
||||
InputEnable5D: {
|
||||
target: 0x10020224,
|
||||
method: 0x00040001,
|
||||
format: 'int16',
|
||||
},
|
||||
InputEnable6D: {
|
||||
target: 0x10020225,
|
||||
method: 0x00040001,
|
||||
format: 'int16',
|
||||
},
|
||||
InputEnable7D: {
|
||||
target: 0x10020226,
|
||||
method: 0x00040001,
|
||||
format: 'int16',
|
||||
},
|
||||
InputEnable8D: {
|
||||
target: 0x10020227,
|
||||
method: 0x00040001,
|
||||
format: 'int16',
|
||||
},
|
||||
InputGainA: {
|
||||
target: 0x10008206,
|
||||
method: 0x00040001,
|
||||
format: 'float',
|
||||
},
|
||||
InputGainB: {
|
||||
target: 0x10010206,
|
||||
method: 0x00040001,
|
||||
format: 'float',
|
||||
},
|
||||
InputGainC: {
|
||||
target: 0x10018206,
|
||||
method: 0x00040001,
|
||||
format: 'float',
|
||||
},
|
||||
InputGainD: {
|
||||
target: 0x10020206,
|
||||
method: 0x00040001,
|
||||
format: 'float',
|
||||
},
|
||||
SpeakerIDA: {
|
||||
target: 0x10008214,
|
||||
method: 0x00040001,
|
||||
format: 'int16',
|
||||
},
|
||||
SpeakerIDB: {
|
||||
target: 0x10010214,
|
||||
method: 0x00040001,
|
||||
format: 'int16',
|
||||
},
|
||||
SpeakerIDC: {
|
||||
target: 0x10018214,
|
||||
method: 0x00040001,
|
||||
format: 'int16',
|
||||
},
|
||||
SpeakerIDD: {
|
||||
target: 0x10020214,
|
||||
method: 0x00040001,
|
||||
format: 'int16',
|
||||
},
|
||||
SpeakerIDList: {
|
||||
target: 0x10010214,
|
||||
method: 0x00040005,
|
||||
format: 'stringArray',
|
||||
},
|
||||
OutputMode: {
|
||||
target: 0x10000111,
|
||||
method: 0x00040001,
|
||||
format: 'int16',
|
||||
},
|
||||
OutputModeList: {
|
||||
target: 0x10000111,
|
||||
method: 0x00040005,
|
||||
format: 'stringArray',
|
||||
},
|
||||
MuteA: {
|
||||
target: 0x10008205,
|
||||
method: 0x00040001,
|
||||
format: 'int8',
|
||||
},
|
||||
MuteB: {
|
||||
target: 0x10010205,
|
||||
method: 0x00040001,
|
||||
format: 'int8',
|
||||
},
|
||||
MuteC: {
|
||||
target: 0x10018205,
|
||||
method: 0x00040001,
|
||||
format: 'int8',
|
||||
},
|
||||
MuteD: {
|
||||
target: 0x10020205,
|
||||
method: 0x00040001,
|
||||
format: 'int8',
|
||||
},
|
||||
};
|
||||
|
Before Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 2.0 KiB |
@@ -1,108 +0,0 @@
|
||||
table {
|
||||
color: white;
|
||||
background-color: #323232;
|
||||
font-size: 14px;
|
||||
}
|
||||
.button {
|
||||
padding: 4px;
|
||||
height: 65px;
|
||||
border-radius: 4px;
|
||||
position: relative;
|
||||
text-align: right;
|
||||
margin: 2px;
|
||||
box-sizing: border-box;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.light-button {
|
||||
background: linear-gradient(0deg, #484848, #737373);
|
||||
outline: black 2px outset;
|
||||
border-top: #8b8b8b 2px solid;
|
||||
border-left: #8b8b8b 2px solid;
|
||||
min-width: 100px;
|
||||
}
|
||||
.dark-button {
|
||||
background: linear-gradient(0deg, #0e0e0e, #282828);
|
||||
outline: #737373 2px solid;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.mute {
|
||||
text-align: center;
|
||||
background-image: url('muteicon-on.png'), linear-gradient(0deg, #484848, #737373);
|
||||
background-position: 52px 13px, 0px 0px;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
.gain-box {
|
||||
background-color: #272727;
|
||||
height: 60px;
|
||||
width: 65px;
|
||||
margin: 2px;
|
||||
border: #656565 2px solid;
|
||||
outline: #111111 2px solid;
|
||||
text-align: right;
|
||||
}
|
||||
.gain-head {
|
||||
box-sizing: border-box;
|
||||
height: 12px;
|
||||
width: 100%;
|
||||
background: #686868;
|
||||
border: #1a1a1a 2px solid;
|
||||
outline: #656565 2px solid;
|
||||
margin-bottom: 27px;
|
||||
}
|
||||
.gain-box span {
|
||||
padding: 4px;
|
||||
}
|
||||
h3 {
|
||||
margin: 7px 0px 3px;
|
||||
margin-left: 12px;
|
||||
text-align: left;
|
||||
font-weight: normal;
|
||||
font-size: 22px;
|
||||
}
|
||||
h4 {
|
||||
text-align: left;
|
||||
font-size: 16px;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
.channel-input {
|
||||
position: absolute;
|
||||
left: 9px;
|
||||
top: 27px;
|
||||
border-right: white 1px solid;
|
||||
padding-right: 40px;
|
||||
text-align: left;
|
||||
line-height: 14px;
|
||||
}
|
||||
.channel-delay {
|
||||
position: absolute;
|
||||
left: 170px;
|
||||
top: 40px;
|
||||
}
|
||||
.power-1 {
|
||||
background: linear-gradient(0deg, #5a8127, #789b50);
|
||||
border: #506937 1px solid;
|
||||
}
|
||||
.indicate-1 {
|
||||
background: #00ff00;
|
||||
border: black 2px inset;
|
||||
}
|
||||
|
||||
.mute-1 {
|
||||
border-top: #772b26 2px solid;
|
||||
border-left: #772b26 2px solid;
|
||||
background-image: url('muteicon-mute.png'), linear-gradient(0deg, #b52714, #c4473e);
|
||||
}
|
||||
|
||||
@media screen and (min-width: 0px) and (max-width: 450px) {
|
||||
.hide-medium {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
@media screen and (min-width: 0px) and (max-width: 300px) {
|
||||
.hide-small {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
@@ -1,141 +0,0 @@
|
||||
<header>
|
||||
<h1><%= listName %></h1>
|
||||
<h2><%= data.oca.FirmwareRevision.parameters[0] %></h2>
|
||||
</header>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="button dark-button indicate-<%=data.oca.PwrOn.parameters[0]%>"></div>
|
||||
</td>
|
||||
<td width="250px" class="hide-small">
|
||||
<div class="button dark-button">
|
||||
<h4><%= data.oca.ModelDescription.parameters[0] %></h4><br>
|
||||
<span class="hide-medium"><%= data.oca.OutputModeList.parameters[data.oca.OutputMode.parameters[0]+1] %></span>
|
||||
</div>
|
||||
</td>
|
||||
<td class="hide-medium">
|
||||
<div class="button dark-button">
|
||||
<h4>ID</h4><br>
|
||||
<%= data.oca.SubNet.parameters[0] %>.<%= data.oca.DeviceId.parameters[0].toString().padStart(2, '0') %>
|
||||
</div>
|
||||
</td>
|
||||
<td width="95px"><div class="button dark-button power-<%=data.oca.PwrOn.parameters[0]%>"><h4>Power</h4><br>On</div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td class="hide-small">
|
||||
<div class="button light-button">
|
||||
<h4><%= data.oca.ChannelNameA.parameters[0] %></h4>
|
||||
<div class="channel-input">
|
||||
Input<br>
|
||||
<% if(data.oca.InputEnable1A.parameters[0]){ %> A1 <% } %>
|
||||
<% if(data.oca.InputEnable2A.parameters[0]){ %> A2 <% } %>
|
||||
<% if(data.oca.InputEnable3A.parameters[0]){ %> A3 <% } %>
|
||||
<% if(data.oca.InputEnable4A.parameters[0]){ %> A4 <% } %>
|
||||
<% if(data.oca.InputEnable5A.parameters[0]){ %> D1 <% } %>
|
||||
<% if(data.oca.InputEnable6A.parameters[0]){ %> D2 <% } %>
|
||||
<% if(data.oca.InputEnable7A.parameters[0]){ %> D3 <% } %>
|
||||
<% if(data.oca.InputEnable8A.parameters[0]){ %> D4 <% } %>
|
||||
</div>
|
||||
<div class="channel-delay">
|
||||
<%= data.oca.DelayA.parameters[0].toFixed(1) %>ms
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="hide-medium">
|
||||
<div class="gain-box">
|
||||
<div class="gain-head"></div>
|
||||
<span><%= data.oca.InputGainA.parameters[0].toFixed(1) %>db</span>
|
||||
</div>
|
||||
</td>
|
||||
<td><div class="button light-button mute mute-<%=data.oca.MuteA.parameters[0]%>"><h3>A</h3><%= data.oca.SpeakerIDList.parameters[data.oca.SpeakerIDA.parameters[0]] %></div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td class="hide-small">
|
||||
<div class="button light-button">
|
||||
<h4><%= data.oca.ChannelNameB.parameters[0] %></h4>
|
||||
<div class="channel-input">
|
||||
Input<br>
|
||||
<% if(data.oca.InputEnable1B.parameters[0]){ %> A1 <% } %>
|
||||
<% if(data.oca.InputEnable2B.parameters[0]){ %> A2 <% } %>
|
||||
<% if(data.oca.InputEnable3B.parameters[0]){ %> A3 <% } %>
|
||||
<% if(data.oca.InputEnable4B.parameters[0]){ %> A4 <% } %>
|
||||
<% if(data.oca.InputEnable5B.parameters[0]){ %> D1 <% } %>
|
||||
<% if(data.oca.InputEnable6B.parameters[0]){ %> D2 <% } %>
|
||||
<% if(data.oca.InputEnable7B.parameters[0]){ %> D3 <% } %>
|
||||
<% if(data.oca.InputEnable8B.parameters[0]){ %> D4 <% } %>
|
||||
</div>
|
||||
<div class="channel-delay">
|
||||
<%= data.oca.DelayB.parameters[0].toFixed(1) %>ms
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="hide-medium">
|
||||
<div class="gain-box">
|
||||
<div class="gain-head"></div>
|
||||
<span><%= data.oca.InputGainB.parameters[0].toFixed(1) %>db</span>
|
||||
</div>
|
||||
</td>
|
||||
<td><div class="button light-button mute mute-<%=data.oca.MuteB.parameters[0]%>"><h3>B</h3><%= data.oca.SpeakerIDList.parameters[data.oca.SpeakerIDB.parameters[0]] %></div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td class="hide-small">
|
||||
<div class="button light-button">
|
||||
<h4><%= data.oca.ChannelNameC.parameters[0] %></h4>
|
||||
<div class="channel-input">
|
||||
Input<br>
|
||||
<% if(data.oca.InputEnable1C.parameters[0]){ %> A1 <% } %>
|
||||
<% if(data.oca.InputEnable2C.parameters[0]){ %> A2 <% } %>
|
||||
<% if(data.oca.InputEnable3C.parameters[0]){ %> A3 <% } %>
|
||||
<% if(data.oca.InputEnable4C.parameters[0]){ %> A4 <% } %>
|
||||
<% if(data.oca.InputEnable5C.parameters[0]){ %> D1 <% } %>
|
||||
<% if(data.oca.InputEnable6C.parameters[0]){ %> D2 <% } %>
|
||||
<% if(data.oca.InputEnable7C.parameters[0]){ %> D3 <% } %>
|
||||
<% if(data.oca.InputEnable8C.parameters[0]){ %> D4 <% } %>
|
||||
</div>
|
||||
<div class="channel-delay">
|
||||
<%= data.oca.DelayC.parameters[0].toFixed(1) %>ms
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="hide-medium">
|
||||
<div class="gain-box">
|
||||
<div class="gain-head"></div>
|
||||
<span><%= data.oca.InputGainC.parameters[0].toFixed(1) %>db</span>
|
||||
</div>
|
||||
</td>
|
||||
<td><div class="button light-button mute mute-<%=data.oca.MuteC.parameters[0]%>"><h3>C</h3><%= data.oca.SpeakerIDList.parameters[data.oca.SpeakerIDC.parameters[0]] %></div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td class="hide-small">
|
||||
<div class="button light-button">
|
||||
<h4><%= data.oca.ChannelNameD.parameters[0] %></h4>
|
||||
<div class="channel-input">
|
||||
Input<br>
|
||||
<% if(data.oca.InputEnable1D.parameters[0]){ %> A1 <% } %>
|
||||
<% if(data.oca.InputEnable2D.parameters[0]){ %> A2 <% } %>
|
||||
<% if(data.oca.InputEnable3D.parameters[0]){ %> A3 <% } %>
|
||||
<% if(data.oca.InputEnable4D.parameters[0]){ %> A4 <% } %>
|
||||
<% if(data.oca.InputEnable5D.parameters[0]){ %> D1 <% } %>
|
||||
<% if(data.oca.InputEnable6D.parameters[0]){ %> D2 <% } %>
|
||||
<% if(data.oca.InputEnable7D.parameters[0]){ %> D3 <% } %>
|
||||
<% if(data.oca.InputEnable8D.parameters[0]){ %> D4 <% } %>
|
||||
</div>
|
||||
<div class="channel-delay">
|
||||
<%= data.oca.DelayD.parameters[0].toFixed(1) %>ms
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="hide-medium">
|
||||
<div class="gain-box">
|
||||
<div class="gain-head"></div>
|
||||
<span><%= data.oca.InputGainD.parameters[0].toFixed(1) %>db</span>
|
||||
</div>
|
||||
</td>
|
||||
<td><div class="button light-button mute mute-<%=data.oca.MuteD.parameters[0]%>"><h3>D</h3><%= data.oca.SpeakerIDList.parameters[data.oca.SpeakerIDD.parameters[0]] %></div></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 4.0 KiB |
@@ -1,5 +1,13 @@
|
||||
<h2>Connection Requirements</h2>
|
||||
<h2>Connection Requirements: Eos 3.2 and newer</h2>
|
||||
<h4>Browser: Setup → Device Settings → Network</h4>
|
||||
<ul>
|
||||
<li>Enable <em>Third Party OSC</em> on the network interface(s) you are using</li>
|
||||
<li>Ensure this Cue View device's port is set to <em>3037</em></li>
|
||||
</ul>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<h2>Connection Requirements: Eos 3.1 and earlier</h2>
|
||||
<h4>Shell/ECU → Network</h4>
|
||||
<ul>
|
||||
<li>Enable <em>✔ TCP OSC</em>. The TCP format should be "TCP Format for OSC 1.1 (SLIP)".</li>
|
||||
@@ -7,7 +15,7 @@
|
||||
</ul>
|
||||
If the "Third Party OSC" option is not available, Eos must be updated to 3.1 or newer.
|
||||
|
||||
<h4>System Settings → Show Control → OSC</h4>
|
||||
<h4>Browser: System Settings → Show Control → OSC</h4>
|
||||
<ul>
|
||||
<li>Enable <em>✔ OSC RX</em></li>
|
||||
<li>Enable <em>✔ OSC TX</em></li>
|
||||
|
||||
@@ -80,9 +80,12 @@ exports.data = function data(_device, osc) {
|
||||
} else if (match(addressParts, ['eos', 'out', 'event', 'cue', '*', '*', 'fire'])) {
|
||||
device.data.EOS.activeCue = addressParts[5];
|
||||
device.draw();
|
||||
device.update('activeCue', {
|
||||
uid: device.data.EOS.cueLists[addressParts[4]][addressParts[5]][0].uid,
|
||||
});
|
||||
const cues = device.data.EOS.cueLists[addressParts[4]][addressParts[5]];
|
||||
if (cues) {
|
||||
device.update('activeCue', {
|
||||
uid: cues[0].uid,
|
||||
});
|
||||
}
|
||||
} else if (match(addressParts, ['eos', 'out', 'notify', 'cue', '*', '*', '*', '*'])) {
|
||||
const cueList = addressParts[4];
|
||||
const cueNumber = osc.args[1];
|
||||
|
||||
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.8 KiB |
@@ -1,15 +1,17 @@
|
||||
<div id="<%= cueList.uniqueID %>">
|
||||
<% let cueKeys = allCues[cueList.uniqueID]; %>
|
||||
|
||||
<h3><%= cueList.displayName %></h3>
|
||||
<div id="<%= cueKeys.uniqueID %>">
|
||||
|
||||
<h3><%= workspace.displayName %> — <%= cueList.listName %></h3>
|
||||
<%
|
||||
let width = 100/cueList.cartColumns;
|
||||
let height = 600/(cueList.cartRows);
|
||||
let width = 100/cueKeys.cartColumns;
|
||||
let height = 600/(cueKeys.cartRows);
|
||||
%>
|
||||
|
||||
<div class="cart">
|
||||
|
||||
<% for(let r=0; r<cueList.cartRows; r++){ %>
|
||||
<% for(let c=0; c<cueList.cartColumns; c++){ %>
|
||||
<% for(let r=0; r<cueKeys.cartRows; r++){ %>
|
||||
<% for(let c=0; c<cueKeys.cartColumns; c++){ %>
|
||||
<% let style = `style="left:${width*c}%; top:${height*r}px; width:${width }%; height:${height}px;"`; %>
|
||||
|
||||
<div class="cartCueWrapper" <%= style %>><div class="cartCue cartBlank"></div></div>
|
||||
@@ -18,25 +20,27 @@
|
||||
<% } %>
|
||||
|
||||
|
||||
<% for(var c in cueList.cues){
|
||||
let cue = cueList.cues[c];
|
||||
<% for(let i=0; i<cueList.cues.length; i++){
|
||||
let cue = allCues[cueList.cues[i].uniqueID];
|
||||
|
||||
if(!cue.cartPosition){
|
||||
cue.cartPosition = [0, 0];
|
||||
}
|
||||
|
||||
|
||||
let row = cue.cartPosition[0]-1;
|
||||
let col = cue.cartPosition[1]-1;
|
||||
|
||||
let colPos = width*col;
|
||||
let rowPos = height*row;
|
||||
|
||||
if(col>=cueList.cartColumns || row>=cueList.cartRows){
|
||||
if(col>=cueKeys.cartColumns || row>=cueKeys.cartRows){
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
%>
|
||||
|
||||
<%= tileTemplate({cue: allCues[cue.uniqueID], allCues: allCues}) %>
|
||||
|
||||
<%= tileTemplate({cue: cueList.cues[i], allCues: allCues, workspace: workspace}) %>
|
||||
|
||||
<% } %>
|
||||
|
||||
|
||||
@@ -1,145 +1,206 @@
|
||||
<% let cueKeys = allCues[cue.uniqueID]; %>
|
||||
<% let playbackPosition = workspace.playbackPosition==cue.uniqueID ? "playback-position" : "" %>
|
||||
<tr class="q-<%= cue.colorName %> q-armed-<%= cue.armed %> <%= playbackPosition %>" id="<%= cue.uniqueID %>">
|
||||
<% let selected = workspace.selected.includes(cue.uniqueID) ? "selected": "" %>
|
||||
|
||||
<td></td> <!-- playhead/color indicator -->
|
||||
<% if(cueKeys && cueKeys.parent){ %>
|
||||
|
||||
<td><center>
|
||||
<% if(cue.broken){ %>
|
||||
<img src="./plugins/qlab/img/status_broken.png" height="18px">
|
||||
<tr class="q-<%= cueKeys.colorName %> q-armed-<%= cueKeys.armed %> <%= playbackPosition %> <%= selected %>" id="<%= cueKeys.uniqueID %>">
|
||||
|
||||
<% }else if(cue.running){ %>
|
||||
<img src="./plugins/qlab/img/status_running.png" height="18px">
|
||||
|
||||
<% }else if(cue.paused){ %>
|
||||
<img src="./plugins/qlab/img/status_paused.png" height="18px">
|
||||
|
||||
<% }else if(cue.loaded){ %>
|
||||
<img src="./plugins/qlab/img/status_loaded.png" height="18px">
|
||||
|
||||
<% }else if(cue.flagged){ %>
|
||||
<img src="./plugins/qlab/img/status_flagged.png" height="20px">
|
||||
|
||||
<% }else{ %>
|
||||
<!-- playhead/color indicator -->
|
||||
<td class="playhead"></td>
|
||||
|
||||
<% } %>
|
||||
</center></td>
|
||||
|
||||
<% if(cue.type == "Group" && cue.groupMode){ %>
|
||||
<td><img src="./plugins/qlab/img/v5/group-<%= cue.groupMode %>.png" height="20px"></td>
|
||||
|
||||
<% }else{ %>
|
||||
<td><img src="./plugins/qlab/img/<%= cue.type.toLowerCase().replace(' ','-') %>.png" height="20px"></td>
|
||||
|
||||
<% } %>
|
||||
<!-- status indicator -->
|
||||
<td><center>
|
||||
<% if(cueKeys.isBroken){ %>
|
||||
<img src="./plugins/qlab/img/status_broken.png" height="18px">
|
||||
|
||||
<% }else if(cueKeys.isRunning){ %>
|
||||
<img src="./plugins/qlab/img/status_running.png" height="18px">
|
||||
|
||||
<% }else if(cueKeys.isPaused){ %>
|
||||
<img src="./plugins/qlab/img/status_paused.png" height="18px">
|
||||
|
||||
<% }else if(cueKeys.isLoaded){ %>
|
||||
<img src="./plugins/qlab/img/status_loaded.png" height="18px">
|
||||
|
||||
<% }else if(cueKeys.isFlagged){ %>
|
||||
<img src="./plugins/qlab/img/status_flagged.png" height="20px">
|
||||
|
||||
<% }else{ %>
|
||||
|
||||
<% } %>
|
||||
</center></td>
|
||||
|
||||
|
||||
|
||||
|
||||
<td><center><%= cue.number || " " %></center></td>
|
||||
|
||||
|
||||
<% for(let i=0; i<cue.nestedGroupModes.length; i++){ %>
|
||||
|
||||
<% if(cue.cues && cue.cues.length==0 && i==cue.nestedGroupModes.length-1){ %>
|
||||
<td class="gMode-<%= cue.nestedGroupModes[i] %> gLeft gBot gTop group-arrow"></td>
|
||||
|
||||
<% }else if(cue.cues && i==cue.nestedGroupModes.length-1){ %>
|
||||
<td class="gMode-<%= cue.nestedGroupModes[i] %> gLeft gTop group-arrow"></td>
|
||||
|
||||
<% }else if(cue.nestedGroupPosition[i]<=0){ %>
|
||||
<% if(i<cue.nestedGroupModes.length-1){ %>
|
||||
<td class="gMode-<%= cue.nestedGroupModes[i] %> gLeft gBot"></td>
|
||||
|
||||
<% }else{ %>
|
||||
<td class="gMode-<%= cue.nestedGroupModes[i] %> gBot"></td>
|
||||
|
||||
<% } %>
|
||||
|
||||
<% }else if(i<cue.nestedGroupModes.length-1){ %>
|
||||
<td class="gMode-<%= cue.nestedGroupModes[i] %> gLeft"></td>
|
||||
|
||||
<% }else{ %>
|
||||
<td class="gMode-<%= cue.nestedGroupModes[i] %>"></td>
|
||||
|
||||
<% } %>
|
||||
|
||||
|
||||
<% } %>
|
||||
|
||||
|
||||
|
||||
<!-- end spacer cells -->
|
||||
|
||||
|
||||
<% if(cue.type=="Group"){ %>
|
||||
<% if(cue.cues.length==0){ %>
|
||||
<td id="cue-name" colspan="<%= 11-cue.nestedGroupModes.length %>" class="gMode-<%= cue.groupMode %> gTop gBot gRight"><%= cue.listName %></td>
|
||||
<!-- cue type icon -->
|
||||
<% if(cueKeys.type == "Group" && cueKeys.mode){ %>
|
||||
<td><img src="./plugins/qlab/img/v5/group-<%= cueKeys.mode %>.png" height="20px"></td>
|
||||
|
||||
<% }else{ %>
|
||||
<td id="cue-name" colspan="<%= 11-cue.nestedGroupModes.length %>" class="gMode-<%= cue.groupMode %> gTop gRight"><%= cue.listName %></td>
|
||||
<td><img src="./plugins/qlab/img/<%= cueKeys.type.toLowerCase().replace(' ','-') %>.png" height="20px"></td>
|
||||
|
||||
<% } %>
|
||||
|
||||
<% }else if(cue.nestedGroupPosition[1]==0){ %>
|
||||
<td colspan="<%= 11-cue.nestedGroupModes.length %>" class="cue-name gMode-<%= cue.nestedGroupModes[cue.nestedGroupModes.length-1] %> gBot gRight"><%= cue.listName %></td>
|
||||
|
||||
<% }else{ %>
|
||||
<td colspan="<%= 11-cue.nestedGroupModes.length %>" class="cue-name gMode-<%= cue.nestedGroupModes[cue.nestedGroupModes.length-1] %> gRight"><%= cue.listName %></td>
|
||||
|
||||
<% } %>
|
||||
|
||||
|
||||
<td class="q-time hide-medium"><%= cue.target %></td>
|
||||
<!-- cue number -->
|
||||
<td><center><%= cueKeys.number || " " %></center></td>
|
||||
|
||||
|
||||
<% let nextCue = cueKeys.cueInWorkspace.parent.cues[cueKeys.cueInWorkspace.sortIndex+1]; %>
|
||||
|
||||
<!-- spaces before name -->
|
||||
<% for(let i=0; i<cueKeys.parentKeys.length; i++){ %>
|
||||
<% let parent = cueKeys.parentKeys[i+1]; %>
|
||||
<% %>
|
||||
|
||||
<% if(cueKeys.type=="Group" && cueKeys.cues.length==0 && i==cueKeys.parentKeys.length-1){ %>
|
||||
<td class="gMode-<%= cueKeys.mode %> gLeft gTop gBot group-arrow"></td>
|
||||
|
||||
<% }else if(cueKeys.type=="Group" && i==cueKeys.parentKeys.length-1){ %>
|
||||
<td class="gMode-<%= cueKeys.mode %> gLeft gTop group-arrow"></td>
|
||||
|
||||
<%}else if(parent){%>
|
||||
|
||||
<% let parentCues = parent.cueInWorkspace.cues %>
|
||||
<% let lastCueInMe = parentCues[parentCues.length-1]%>
|
||||
|
||||
<% while(lastCueInMe.type=="Group" && lastCueInMe.cues.length){
|
||||
parentCues = lastCueInMe.cues;
|
||||
lastCueInMe = parentCues[parentCues.length-1];
|
||||
} %>
|
||||
|
||||
<% if(lastCueInMe.uniqueID == cueKeys.uniqueID){ %>
|
||||
<td class="gMode-<%= parent.mode %> gLeft gBot"></td>
|
||||
|
||||
<% }else{ %>
|
||||
<td class="gMode-<%= parent.mode %> gLeft"></td>
|
||||
|
||||
|
||||
<% } %>
|
||||
|
||||
|
||||
<% }else if(cueKeys.parentKeys[i]){ %>
|
||||
<% let nextCue2 = cueKeys.parentKeys[i].cues[cueKeys.cueInWorkspace.sortIndex+1]; %>
|
||||
|
||||
<% if(!nextCue2){ %>
|
||||
<td class="gMode-<%= cueKeys.parentKeys[i].mode %> gBot"></td>
|
||||
|
||||
<% }else{ %>
|
||||
<td></td>
|
||||
|
||||
<% } %>
|
||||
|
||||
|
||||
<% } %>
|
||||
|
||||
<% } %>
|
||||
|
||||
|
||||
|
||||
<!-- cue name -->
|
||||
|
||||
<% if(cue.type=="Group"){ %>
|
||||
|
||||
<% if(cue.cues && cue.cues.length==0){ %>
|
||||
<td id="cue-name" colspan="<%= 11-cueKeys.parentKeys.length %>" class="gMode-<%= cueKeys.mode %> gTop gBot gRight"><%= cueKeys.listName %></td>
|
||||
|
||||
<% }else{ %>
|
||||
<td id="cue-name" colspan="<%= 11-cueKeys.parentKeys.length %>" class="gMode-<%= cueKeys.mode %> gTop gRight"><%= cueKeys.listName %></td>
|
||||
|
||||
<% } %>
|
||||
|
||||
<% }else if(!nextCue){ %>
|
||||
<td colspan="<%= 11-cueKeys.parentKeys.length %>" class="cue-name gMode-<%= cueKeys.parent.mode %> gBot gRight"><%= cueKeys.listName %></td>
|
||||
|
||||
<% }else{ %>
|
||||
<td colspan="<%= 11-cueKeys.parentKeys.length %>" class="cue-name gMode-<%= cueKeys.parent.mode %> gRight"><%= cueKeys.listName %></td>
|
||||
|
||||
<% } %>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- cue target -->
|
||||
<% if(cueKeys.currentCueTarget){ %>
|
||||
<td class="q-target hide-medium"><%= allCues[cueKeys.currentCueTarget].number || allCues[cueKeys.currentCueTarget].listName %></td>
|
||||
|
||||
<% if(cue.preWait){ %>
|
||||
<td class="q-time hide-small"><%= elapsedTime(cue.preWait, cue.preWaitElapsed, "preWait", cue) %></td>
|
||||
<% }else{ %>
|
||||
<td class="q-target hide-medium"></td>
|
||||
|
||||
<% }else{ %>
|
||||
<td class="q-time q-gray-text hide-small">00:00.00</td>
|
||||
|
||||
<% } %>
|
||||
<% } %>
|
||||
|
||||
|
||||
|
||||
<% let cueTypesWithAction = ["Audio", "Mic", "Video", "Camera", "Text", "Light", "Fade", "Network", "MIDI File", "Timecode", "Wait"]; %>
|
||||
<% if((cue.type=="Group" && cue.groupMode==3) || cueTypesWithAction.indexOf(cue.type)>=0){ %>
|
||||
<td class="q-time hide-medium"><%= elapsedTime(cue.duration, cue.actionElapsed, "action", cue) %></td>
|
||||
<!-- cue preWait -->
|
||||
<% if(cueKeys.preWait){ %>
|
||||
<td class="q-time hide-small"><%= elapsedTime(cueKeys.preWait, cueKeys.preWaitElapsed, "preWait", cueKeys) %></td>
|
||||
|
||||
<% }else{ %>
|
||||
<td class="hide-medium"></td>
|
||||
<% }else{ %>
|
||||
<td class="q-time q-gray-text hide-small">00:00.00</td>
|
||||
|
||||
<% } %>
|
||||
<% } %>
|
||||
|
||||
|
||||
|
||||
<% if(cue.postWait){ %>
|
||||
<td class="q-time hide-medium"><%= elapsedTime(cue.postWait, cue.postWaitElapsed, "postWait", cue) %></td>
|
||||
<!-- cue duration -->
|
||||
<% let cueTypesWithAction = ["Audio", "Mic", "Video", "Camera", "Text", "Light", "Fade", "Network", "MIDI File", "Timecode", "Wait"]; %>
|
||||
<% if((cueKeys.type=="Group" && cueKeys.mode==3) || (cueKeys.type=="Group" && cueKeys.mode==6) || cueTypesWithAction.includes(cueKeys.type)){ %>
|
||||
<td class="q-time hide-medium"><%= elapsedTime(cueKeys.duration, cueKeys.actionElapsed, "action", cueKeys) %></td>
|
||||
|
||||
<% }else{ %>
|
||||
<td class="q-time q-gray-text hide-medium">00:00.00</td>
|
||||
<% }else{ %>
|
||||
<td class="hide-medium"></td>
|
||||
|
||||
<% } %>
|
||||
<% } %>
|
||||
|
||||
|
||||
<!-- cue postWait -->
|
||||
<% if(cueKeys.postWait){ %>
|
||||
<td class="q-time hide-medium"><%= elapsedTime(cueKeys.postWait, cueKeys.postWaitElapsed, "postWait", cueKeys) %></td>
|
||||
|
||||
<% }else{ %>
|
||||
<td class="q-time q-gray-text hide-medium">00:00.00</td>
|
||||
|
||||
<% } %>
|
||||
|
||||
|
||||
|
||||
<% if(cue.continueMode==2){ %>
|
||||
<td class="hide-small"><center><img src="plugins/qlab/img/auto_follow.png" height="20px"></center></td>
|
||||
<!-- cue continueMode -->
|
||||
<% if(cueKeys.continueMode==2){ %>
|
||||
<td class="hide-small"><center><img src="plugins/qlab/img/auto_follow.png" height="20px"></center></td>
|
||||
|
||||
<% }else if(cue.continueMode==1){ %>
|
||||
<td class="hide-small"><center><img src="plugins/qlab/img/auto_continue.png" height="20px"></center></td>
|
||||
<% }else if(cueKeys.continueMode==1){ %>
|
||||
<td class="hide-small"><center><img src="plugins/qlab/img/auto_continue.png" height="20px"></center></td>
|
||||
|
||||
<% }else{ %>
|
||||
<td class="hide-small"></td>
|
||||
<% }else{ %>
|
||||
<td class="hide-small"></td>
|
||||
|
||||
<% } %>
|
||||
<% } %>
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
<%
|
||||
function prettyFormatTime(seconds){
|
||||
|
||||
<% }else{ %>
|
||||
|
||||
<tr class="q-<%= cue.colorName %> q-armed-<%= cue.armed %> " id="<%= cue.uniqueID %>">
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td><center><%= cue.number || " " %></center></td>
|
||||
<td colspan="11" id="cue-name"><%= cue.listName %></td>
|
||||
<td class="q-time hide-medium"></td>
|
||||
<td class="q-time q-gray-text hide-small">00:00.00</td>
|
||||
<td class="hide-medium"></td>
|
||||
<td class="q-time q-gray-text hide-medium">00:00.00</td>
|
||||
<td class="hide-small"></td>
|
||||
</tr>
|
||||
|
||||
<% } %>
|
||||
|
||||
<%
|
||||
function prettyFormatTime(seconds){
|
||||
if(!seconds){
|
||||
return "00:00.00";
|
||||
}
|
||||
@@ -151,14 +212,14 @@
|
||||
return string.substring(startIndex, string.length-2)
|
||||
}
|
||||
|
||||
function elapsedTime(def, value, type, cue){
|
||||
function elapsedTime(def, value, type, cue){
|
||||
|
||||
if(type=="action" && cue.paused){
|
||||
if(type=="action" && cue.isPaused){
|
||||
value-=cue.preWait;
|
||||
}
|
||||
|
||||
let border, fill;
|
||||
if(cue.paused){
|
||||
if(cue.isPaused){
|
||||
border = "#f6e737";
|
||||
fill = "rgba(255, 240, 60, 0.7)";
|
||||
}else{
|
||||
@@ -171,7 +232,7 @@
|
||||
let percent = value/def*100;
|
||||
let bg = `style='background: black; background: linear-gradient(90deg, ${fill} ${percent}%, transparent ${percent}%);`;
|
||||
|
||||
if(cue.paused){
|
||||
if(cue.isPaused){
|
||||
bg+= "outline-color: "+border+";";
|
||||
bg+= "color: white;";
|
||||
}
|
||||
@@ -179,7 +240,7 @@
|
||||
|
||||
return `<div class='q-time-elapsed' ${bg}>${prettyFormatTime(Math.min(def, value))}</span>`;
|
||||
|
||||
}else if(type=="postWait" || type=="action"){
|
||||
}else if(type=="postWait" && cue.continueMode==0){
|
||||
return `<span class='q-gray-text'>${prettyFormatTime(def)}</span>`;
|
||||
|
||||
}else{
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<h3 id="<%= cueList.uniqueID %>"><%= workspace.displayName %> — <%= cueList.displayName %></h3>
|
||||
<h3 id="<%= cueList.uniqueID %>"><%= workspace.displayName %> — <%= cueList.listName %></h3>
|
||||
|
||||
<table cellspacing="0">
|
||||
<tr>
|
||||
<th width="1px" style="border-left: none; border-right: none;"></th>
|
||||
<th width="3px" style="border-left: none; border-right: none;"></th>
|
||||
<th width="20px" style="border-left: none; border-right: none;"></th>
|
||||
<th width="20px" style="border-left: none;"></th>
|
||||
<th width="55px">Number</th>
|
||||
<th width="25px" class="no-border">Name</th>
|
||||
<th width="25px" style="padding: 0px"></th>
|
||||
<th width="25px" class="no-border">Q</th>
|
||||
<th width="25px" class="no-border"></th>
|
||||
<th width="25px" class="no-border"></th>
|
||||
<th width="25px" class="no-border"></th>
|
||||
@@ -18,17 +18,17 @@
|
||||
<th width="25px" class="no-border"></th>
|
||||
<th class="no-border"></th>
|
||||
<th width="55px" class="hide-medium">Target</th>
|
||||
<th width="80px" class="hide-small"style="border-right: none;">Pre Wait</th>
|
||||
<th width="80px" class="hide-medium" style="border-left: none; border-right: none;">Action</th>
|
||||
<th width="80px" class="hide-medium" style="border-left: none; border-right: none;">Post Wait</th>
|
||||
<th width="80px" class="hide-small"style="border-right: none;">Pre-Wait</th>
|
||||
<th width="80px" class="hide-medium" style="border-left: none; border-right: none;">Duration</th>
|
||||
<th width="80px" class="hide-medium" style="border-left: none; border-right: none;">Post-Wait</th>
|
||||
<th width="20px" class="hide-small" style="border-left: none; border-right: none;">
|
||||
<img src="plugins/qlab/img/auto_continue_stubby.png" height="20px">
|
||||
</th>
|
||||
</tr>
|
||||
<tbody id="">
|
||||
|
||||
<% for(const cue_id in cueList.cues){ %>
|
||||
<%= displayCueRow(cueList.cues[cue_id]) %>
|
||||
<% for(let i=0; i<cueList.cues.length; i++){ %>
|
||||
<%= displayCueRow(cueList.cues[i]) %>
|
||||
<% } %>
|
||||
|
||||
</tbody>
|
||||
@@ -36,16 +36,13 @@
|
||||
|
||||
|
||||
<%
|
||||
|
||||
|
||||
|
||||
function displayCueRow(q){
|
||||
let html = rowTemplate({cue: allCues[q.uniqueID], allCues: allCues, workspace: workspace});
|
||||
let html = rowTemplate({cue: q, allCues: allCues, workspace: workspace});
|
||||
|
||||
if(q.cues){
|
||||
q.cues.forEach(q =>{
|
||||
html += displayCueRow(q);
|
||||
})
|
||||
for(let i=0; i<q.cues.length; i++){
|
||||
html += displayCueRow(q.cues[i]);
|
||||
}
|
||||
}
|
||||
return html;
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 542 B |
@@ -26,391 +26,362 @@ exports.config = {
|
||||
],
|
||||
};
|
||||
|
||||
let lastElapsedUpdate = Date.now();
|
||||
let interval = 5;
|
||||
let heartbeatCount = 0;
|
||||
|
||||
const valuesForKeysString =
|
||||
'["uniqueID","number","name","listName","isBroken","isRunning","isLoaded","isFlagged",' +
|
||||
'"type","children","preWait","postWait","currentDuration","colorName","continueMode",' +
|
||||
'"type","children","preWait","postWait","duration","colorName","continueMode",' +
|
||||
'"mode","parent","cartRows","cartColumns","cartPosition","displayName","preWaitElapsed",' +
|
||||
'"actionElapsed","postWaitElapsed","isPaused"]';
|
||||
'"actionElapsed","postWaitElapsed","isPaused","currentCueTarget","isRunning","armed","notes"]';
|
||||
|
||||
exports.ready = function ready(_device) {
|
||||
const device = _device;
|
||||
device.send(`/version`);
|
||||
device.send('/workspaces');
|
||||
device.data.workspaces = {};
|
||||
device.data.cueKeys = {};
|
||||
device.data.version = '';
|
||||
device.data.lastElapsedMessage = 0;
|
||||
device.data.ticks = 0;
|
||||
|
||||
device.templates = {
|
||||
cue: _.template(fs.readFileSync(path.join(__dirname, `cue.ejs`))),
|
||||
tile: _.template(fs.readFileSync(path.join(__dirname, `tile.ejs`))),
|
||||
cart: _.template(fs.readFileSync(path.join(__dirname, `cart.ejs`))),
|
||||
cuelist: _.template(fs.readFileSync(path.join(__dirname, `cuelist.ejs`))),
|
||||
};
|
||||
device.send(`/version`);
|
||||
device.send('/workspaces');
|
||||
};
|
||||
|
||||
exports.data = function data(_device, oscData) {
|
||||
const device = _device;
|
||||
|
||||
const oscAddressParts = oscData.address.split('/');
|
||||
oscAddressParts.shift();
|
||||
const msgAddr = oscData.address.split('/');
|
||||
msgAddr.shift();
|
||||
|
||||
if (match(oscAddressParts, ['reply', 'version'])) {
|
||||
const json = JSON.parse(oscData.args[0]);
|
||||
device.data.version = json.data;
|
||||
|
||||
this.deviceInfoUpdate(device, 'status', 'ok');
|
||||
} else if (match(oscAddressParts, ['reply', 'workspaces'])) {
|
||||
const json = JSON.parse(oscData.args[0]);
|
||||
device.data.workspaces = {};
|
||||
|
||||
json.data.forEach((wksp) => {
|
||||
device.data.workspaces[wksp.uniqueID] = {
|
||||
uniqueID: wksp.uniqueID,
|
||||
displayName: wksp.displayName,
|
||||
cueLists: {},
|
||||
cues: {},
|
||||
};
|
||||
device.send(`/workspace/${wksp.uniqueID}/connect`, device.fields.passcode);
|
||||
});
|
||||
|
||||
if (Object.keys(device.data.workspaces).length === 0) {
|
||||
device.data.permission = 'no workspaces';
|
||||
device.draw();
|
||||
}
|
||||
} else if (match(oscAddressParts, ['reply', 'workspace', '*', 'connect'])) {
|
||||
device.send(`/workspace/${oscAddressParts[2]}/updates`, [{ type: 'i', value: 1 }]);
|
||||
device.send(`/workspace/${oscAddressParts[2]}/cueLists`);
|
||||
} else if (match(oscAddressParts, ['reply', 'workspace', '*', 'cueLists'])) {
|
||||
this.deviceInfoUpdate(device, 'status', 'ok');
|
||||
const workspace = device.data.workspaces[oscAddressParts[2]];
|
||||
const json = JSON.parse(oscData.args[0]);
|
||||
|
||||
workspace.cueLists = {};
|
||||
workspace.cues = {};
|
||||
let json = [];
|
||||
try {
|
||||
json = JSON.parse(oscData.args[0]);
|
||||
} catch (err) {
|
||||
// a handful of messages don't respond with JSON
|
||||
}
|
||||
|
||||
if (Object.keys(json).length > 0) {
|
||||
if (json.status === 'denied') {
|
||||
device.data.permission = 'denied';
|
||||
device.draw();
|
||||
} else if (json.data) {
|
||||
device.data.permission = 'ok';
|
||||
|
||||
json.data.forEach((cueList) => {
|
||||
workspace.cueLists[cueList.uniqueID] = cueList;
|
||||
addCueToWorkspace(workspace, cueList);
|
||||
});
|
||||
|
||||
device.draw();
|
||||
|
||||
setTimeout(() => {
|
||||
json.data.forEach((ql) => {
|
||||
workspace.cueLists[ql.uniqueID] = ql;
|
||||
getValuesForKeys(device, json.workspace_id, ql);
|
||||
});
|
||||
}, 0);
|
||||
}
|
||||
} else if (
|
||||
match(oscAddressParts, ['reply', 'cue_id', '*', 'children']) ||
|
||||
match(oscAddressParts, ['reply', 'workspace', '*', 'cue_id', '*', 'children'])
|
||||
) {
|
||||
const json = JSON.parse(oscData.args[0]);
|
||||
const workspace = device.data.workspaces[json.workspace_id];
|
||||
const cueID = json.address.substring(55, 91);
|
||||
const cue = workspace.cues[cueID];
|
||||
|
||||
if (!_.isEqual(cue.cues, json.data)) {
|
||||
workspace.cueLists[cueID].cues = json.data;
|
||||
addCueToWorkspace(workspace, workspace.cueLists[cueID]);
|
||||
device.draw();
|
||||
getValuesForKeys(device, json.workspace_id, cue);
|
||||
}
|
||||
} else if (
|
||||
match(oscAddressParts, ['reply', 'cue_id', '*', 'valuesForKeys']) ||
|
||||
match(oscAddressParts, ['reply', 'workspace', '*', 'cue_id', '*', 'valuesForKeys'])
|
||||
) {
|
||||
const json = JSON.parse(oscData.args[0]);
|
||||
const cueValues = json.data;
|
||||
const workspace = device.data.workspaces[json.workspace_id];
|
||||
let cue = workspace.cues[cueValues.uniqueID];
|
||||
|
||||
if (!cue) {
|
||||
workspace.cues[cueValues.uniqueID] = {};
|
||||
cue = workspace.cues[cueValues.uniqueID];
|
||||
}
|
||||
|
||||
cue.uniqueID = cueValues.uniqueID;
|
||||
cue.number = cueValues.number;
|
||||
cue.name = cueValues.name;
|
||||
cue.listName = cueValues.listName;
|
||||
cue.displayName = cueValues.displayName;
|
||||
cue.broken = cueValues.isBroken;
|
||||
cue.running = cueValues.isRunning;
|
||||
cue.loaded = cueValues.isLoaded;
|
||||
cue.flagged = cueValues.isFlagged;
|
||||
cue.paused = cueValues.isPaused;
|
||||
cue.type = cueValues.type;
|
||||
// cue.cues = cueValues.children;
|
||||
cue.preWait = cueValues.preWait;
|
||||
cue.postWait = cueValues.postWait;
|
||||
cue.duration = cueValues.currentDuration;
|
||||
cue.colorName = cueValues.colorName;
|
||||
cue.continueMode = cueValues.continueMode;
|
||||
cue.groupMode = cueValues.mode;
|
||||
cue.parent = cueValues.parent;
|
||||
cue.cartRows = cueValues.cartRows;
|
||||
cue.cartColumns = cueValues.cartColumns;
|
||||
cue.cartPosition = cueValues.cartPosition;
|
||||
cue.preWaitElapsed = cueValues.preWaitElapsed;
|
||||
cue.actionElapsed = cueValues.actionElapsed;
|
||||
cue.postWaitElapsed = cueValues.postWaitElapsed;
|
||||
|
||||
// QLab 5 fix
|
||||
if (cueValues.type === 'Group' || cueValues.type === 'Cue List') {
|
||||
cue.cues = cueValues.children;
|
||||
} else {
|
||||
cue.cues = undefined;
|
||||
}
|
||||
|
||||
const nestedGroupModes = [];
|
||||
const nestedGroupPosition = [];
|
||||
|
||||
let obj = cue;
|
||||
let sum = 0;
|
||||
|
||||
if (obj.cues) {
|
||||
sum += obj.cues.length;
|
||||
}
|
||||
|
||||
while (obj.parent !== '[root group of cue lists]') {
|
||||
let pos = _.findIndex(workspace.cues[obj.parent].cues, {
|
||||
uniqueID: obj.uniqueID,
|
||||
});
|
||||
pos = Math.abs(pos - workspace.cues[obj.parent].cues.length) - 1;
|
||||
|
||||
if (obj.cues === undefined) {
|
||||
sum += pos;
|
||||
if (device.data.workspaces[json.workspace_id]) {
|
||||
device.data.workspaces[json.workspace_id].permission = 'denied';
|
||||
}
|
||||
|
||||
nestedGroupPosition.unshift(sum);
|
||||
|
||||
if (obj.cues) {
|
||||
sum += pos;
|
||||
nestedGroupModes.unshift(obj.groupMode);
|
||||
} else {
|
||||
nestedGroupModes.unshift(workspace.cues[obj.parent].groupMode);
|
||||
}
|
||||
|
||||
obj = workspace.cues[obj.parent];
|
||||
return;
|
||||
}
|
||||
|
||||
cue.nestedGroupModes = nestedGroupModes;
|
||||
cue.nestedGroupPosition = nestedGroupPosition;
|
||||
|
||||
device.update('updateCueData', {
|
||||
cue,
|
||||
allCues: workspace.cues,
|
||||
workspace,
|
||||
});
|
||||
} else if (match(oscAddressParts, ['reply', 'cue_id', '*', 'preWaitElapsed'])) {
|
||||
const oscArgs = JSON.parse(oscData.args[0]);
|
||||
if (oscArgs.status !== 'error') {
|
||||
const workspace = device.data.workspaces[oscArgs.workspace_id];
|
||||
if (workspace) {
|
||||
const cue = workspace.cues[oscArgs.address.substring(55, 91)];
|
||||
|
||||
if (cue) {
|
||||
cue.preWaitElapsed = oscArgs.data;
|
||||
lastElapsedUpdate = Date.now();
|
||||
|
||||
device.update('updateCueData', {
|
||||
cue,
|
||||
allCues: workspace.cues,
|
||||
workspace,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (match(oscAddressParts, ['reply', 'cue_id', '*', 'actionElapsed'])) {
|
||||
const oscArgs = JSON.parse(oscData.args[0]);
|
||||
if (oscArgs.status !== 'error') {
|
||||
const workspace = device.data.workspaces[oscArgs.workspace_id];
|
||||
if (workspace) {
|
||||
const cue = workspace.cues[oscArgs.address.substring(55, 91)];
|
||||
|
||||
if (cue) {
|
||||
cue.actionElapsed = oscArgs.data;
|
||||
lastElapsedUpdate = Date.now();
|
||||
|
||||
device.update('updateCueData', {
|
||||
cue,
|
||||
allCues: workspace.cues,
|
||||
workspace,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (match(oscAddressParts, ['reply', 'cue_id', '*', 'postWaitElapsed'])) {
|
||||
const oscArgs = JSON.parse(oscData.args[0]);
|
||||
if (oscArgs.status !== 'error') {
|
||||
const workspace = device.data.workspaces[oscArgs.workspace_id];
|
||||
if (workspace) {
|
||||
const cue = workspace.cues[oscArgs.address.substring(55, 91)];
|
||||
|
||||
if (cue) {
|
||||
cue.postWaitElapsed = oscArgs.data;
|
||||
lastElapsedUpdate = Date.now();
|
||||
|
||||
device.update('updateCueData', {
|
||||
cue,
|
||||
allCues: workspace.cues,
|
||||
workspace,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (match(oscAddressParts, ['update', 'workspace', '*', 'cue_id', '*'])) {
|
||||
const workspace = device.data.workspaces[oscAddressParts[2]];
|
||||
|
||||
if (workspace) {
|
||||
const cueLists = Object.keys(workspace.cueLists);
|
||||
const cueID = oscAddressParts[4];
|
||||
|
||||
if (cueID !== '[root group of cue lists') {
|
||||
if (cueLists.includes(cueID)) {
|
||||
device.send(`/workspace/${workspace.uniqueID}/cue_id/${cueID}/children`);
|
||||
}
|
||||
|
||||
device.send(`/workspace/${oscAddressParts[2]}/cue_id/${cueID}/valuesForKeys`, [
|
||||
{ type: 's', value: valuesForKeysString },
|
||||
]);
|
||||
}
|
||||
}
|
||||
} else if (match(oscAddressParts, ['update', 'workspace', '*'])) {
|
||||
// occurs when cue lists are reordered or a list is deleted
|
||||
device.send(`/workspace/${oscAddressParts[2]}/cueLists`);
|
||||
} else if (match(oscAddressParts, ['update', 'workspace', '*', 'dashboard'])) {
|
||||
// this workspace might be new, let's check
|
||||
if (device.data.workspaces[oscAddressParts[2]] === undefined) {
|
||||
if (json.status === 'error') {
|
||||
device.send('/workspaces');
|
||||
return;
|
||||
}
|
||||
} else if (match(oscAddressParts, ['update', 'workspace', '*', 'cueList', '*', 'playbackPosition'])) {
|
||||
const workspace = device.data.workspaces[oscAddressParts[2]];
|
||||
}
|
||||
|
||||
if (workspace) {
|
||||
const cue = workspace.cues[oscData.args[0]];
|
||||
if (oscData.address === '/reply/workspaces') {
|
||||
for (let i = 0; i < json.data.length; i++) {
|
||||
device.data.workspaces[json.data[i].uniqueID] = {
|
||||
version: json.data[i].version,
|
||||
displayName: json.data[i].displayName,
|
||||
port: json.data[i].port,
|
||||
udpReplyPort: json.data[i].udpReplyPort,
|
||||
cueLists: [],
|
||||
selected: [],
|
||||
};
|
||||
device.data.version = json.data[i].version;
|
||||
device.data.workspaces[json.data[i].uniqueID].permission = 'ok';
|
||||
device.send(`/workspace/${json.data[i].uniqueID}/connect`, device.fields.passcode);
|
||||
}
|
||||
|
||||
if (cue) {
|
||||
workspace.playbackPosition = oscData.args[0] ? cue.uniqueID : '';
|
||||
device.update('updatePlaybackPosition', { cue });
|
||||
}
|
||||
}
|
||||
} else if (match(oscAddressParts, ['update', 'workspace', '*', 'disconnect'])) {
|
||||
delete device.data.workspaces[oscAddressParts[2]];
|
||||
if (Object.keys(device.data.workspaces).length === 0) {
|
||||
device.data.permission = 'no workspaces';
|
||||
}
|
||||
this.deviceInfoUpdate(device, 'status', 'ok');
|
||||
device.draw();
|
||||
} else if (match(oscAddressParts, ['reply', 'thump'])) {
|
||||
// intermittent connection check even if nothing's happening
|
||||
} else {
|
||||
// console.log(address)
|
||||
} else if (/reply\/workspace\/.*\/connect/.test(oscData.address)) {
|
||||
if (json.data === 'badpass') {
|
||||
device.data.workspaces[json.workspace_id].permission = 'badpass';
|
||||
} else {
|
||||
device.data.workspaces[json.workspace_id].permission = 'ok';
|
||||
device.send(`/workspace/${msgAddr[2]}/cueLists`);
|
||||
device.send(`/workspace/${msgAddr[2]}/updates`, [{ type: 'i', value: 1 }]);
|
||||
}
|
||||
} else if (/reply\/workspace\/.*\/cueLists/.test(oscData.address)) {
|
||||
insertChildCues(device, device.data.workspaces[msgAddr[2]].cueLists, json.data, '[root group of cue lists]');
|
||||
} else if (/reply\/cue_id\/.*\/valuesForKeys/.test(oscData.address)) {
|
||||
const keyValues = json.data;
|
||||
let cue = device.data.cueKeys[msgAddr[2]];
|
||||
|
||||
if (cue === undefined) {
|
||||
device.data.cueKeys[msgAddr[2]] = {};
|
||||
cue = device.data.cueKeys[msgAddr[2]];
|
||||
}
|
||||
cue.uniqueID = keyValues.uniqueID;
|
||||
cue.number = keyValues.number;
|
||||
cue.listName = keyValues.listName;
|
||||
cue.isBroken = keyValues.isBroken;
|
||||
cue.isRunning = keyValues.isRunning;
|
||||
cue.isLoaded = keyValues.isLoaded;
|
||||
cue.isFlagged = keyValues.isFlagged;
|
||||
cue.type = keyValues.type;
|
||||
cue.cues = keyValues.children;
|
||||
cue.preWait = keyValues.preWait;
|
||||
cue.postWait = keyValues.postWait;
|
||||
cue.duration = keyValues.duration;
|
||||
cue.colorName = keyValues.colorName;
|
||||
cue.continueMode = keyValues.continueMode;
|
||||
cue.mode = keyValues.mode;
|
||||
cue.parent = keyValues.parent;
|
||||
cue.cartRows = keyValues.cartRows;
|
||||
cue.cartColumns = keyValues.cartColumns;
|
||||
cue.cartPosition = keyValues.cartPosition;
|
||||
cue.displayName = keyValues.displayName;
|
||||
cue.preWaitElapsed = keyValues.preWaitElapsed;
|
||||
cue.actionElapsed = keyValues.actionElapsed;
|
||||
cue.postWaitElapsed = keyValues.postWaitElapsed;
|
||||
cue.isPaused = keyValues.isPaused;
|
||||
cue.currentCueTarget = keyValues.currentCueTarget;
|
||||
cue.armed = keyValues.armed;
|
||||
cue.notes = keyValues.notes;
|
||||
|
||||
if (keyValues.isRunning) {
|
||||
device.data.lastElapsedMessage = device.data.ticks;
|
||||
}
|
||||
|
||||
if (cue.parent !== '[root group of cue lists]') {
|
||||
cue.parent = device.data.cueKeys[cue.parent];
|
||||
}
|
||||
|
||||
if (cue.type === 'Cue List' || cue.type === 'Group' || cue.type === 'Cart') {
|
||||
if (device.data.cueKeys[msgAddr[2]].cueInWorkspace && cue.cues) {
|
||||
insertChildCues(
|
||||
device,
|
||||
device.data.cueKeys[msgAddr[2]].cueInWorkspace.cues,
|
||||
[...keyValues.children],
|
||||
device.data.cueKeys[msgAddr[2]].cueInWorkspace
|
||||
);
|
||||
}
|
||||
device.draw();
|
||||
}
|
||||
|
||||
if (cue.type !== 'Cue List' && cue.type !== 'Cart') {
|
||||
device.update('updateCueRow', { cue, workspace: device.data.workspaces[json.workspace_id] });
|
||||
}
|
||||
} else if (/reply\/cue_id\/(.*)\/(.*)Elapsed/.test(oscData.address)) {
|
||||
const workspace = device.data.workspaces[json.workspace_id];
|
||||
let cueID;
|
||||
let keyName;
|
||||
device.data.lastElapsedMessage = device.data.ticks;
|
||||
|
||||
if (workspace?.version.startsWith('5.')) {
|
||||
const addrParts = json.address.split('/');
|
||||
cueID = addrParts[4];
|
||||
keyName = addrParts[5];
|
||||
} else {
|
||||
const addrParts = json.address.split('/');
|
||||
cueID = addrParts[2];
|
||||
keyName = addrParts[3];
|
||||
}
|
||||
|
||||
device.data.cueKeys[cueID][keyName] = json.data;
|
||||
|
||||
device.update('updateCueRow', { cue: device.data.cueKeys[cueID], workspace });
|
||||
} else if (/reply\/workspace\/.*\/selectedCues/.test(oscData.address)) {
|
||||
const workspace = device.data.workspaces[msgAddr[2]];
|
||||
if (!workspace) {
|
||||
return;
|
||||
}
|
||||
workspace.selected = [];
|
||||
for (let i = 0; i < json.data.length; i++) {
|
||||
workspace.selected.push(json.data[i].uniqueID);
|
||||
}
|
||||
device.update('updatePlaybackAndSelected', { workspace: device.data.workspaces[json.workspace_id] });
|
||||
} else if (/update\/workspace\/.*\/cue_id\/.*/.test(oscData.address)) {
|
||||
device.send(`/cue_id/${msgAddr[4]}/valuesForKeys`, [{ type: 's', value: valuesForKeysString }]);
|
||||
} else if (/update\/workspace\/.*\/cueList\/.*\/playbackPosition/.test(oscData.address)) {
|
||||
const workspace = device.data.workspaces[msgAddr[2]];
|
||||
if (workspace) {
|
||||
workspace.playbackPosition = oscData.args[0];
|
||||
device.update('updatePlaybackAndSelected', { workspace: device.data.workspaces[msgAddr[2]] });
|
||||
}
|
||||
} else if (/update\/workspace\/.*\/dashboard/.test(oscData.address)) {
|
||||
device.send(`/workspace/${msgAddr[2]}/selectedCues`);
|
||||
device.send(`/cue_id/active/preWaitElapsed`);
|
||||
}
|
||||
};
|
||||
|
||||
exports.update = function update(device, doc, updateType, data) {
|
||||
if (updateType === 'updateCueData') {
|
||||
exports.update = function update(device, _doc, updateType, data) {
|
||||
const doc = _doc;
|
||||
if (updateType === 'updateCueRow') {
|
||||
const $elem = doc.getElementById(data.cue.uniqueID);
|
||||
|
||||
if ($elem) {
|
||||
if (data.cue.type === 'Cue List') {
|
||||
$elem.outerHTML = `<h3>${data.workspace.displayName} — ${data.cue.name}</h3>`;
|
||||
} else if (data.cue.type === 'Cart') {
|
||||
$elem.outerHTML = device.templates.cart({
|
||||
tileTemplate: device.templates.tile,
|
||||
cueList: data.cue,
|
||||
allCues: data.workspace.cues,
|
||||
if (data.cue.parent.type === 'Cart') {
|
||||
$elem.outerHTML = device.templates.tile({
|
||||
allCues: device.data.cueKeys,
|
||||
cue: data.cue,
|
||||
workspace: data.workspace,
|
||||
});
|
||||
} else if (data.cue.cartPosition && data.cue.cartPosition[0] !== 0) {
|
||||
// checking that the parent cue is a cart cue
|
||||
const parentCue = data.workspace.cues[data.cue.parent];
|
||||
if (parentCue && parentCue.type === 'Cart') {
|
||||
$elem.outerHTML = device.templates.tile(data);
|
||||
} else {
|
||||
$elem.outerHTML = device.templates.cue(data);
|
||||
}
|
||||
} else {
|
||||
$elem.outerHTML = device.templates.cue(data);
|
||||
$elem.outerHTML = device.templates.cue({
|
||||
allCues: device.data.cueKeys,
|
||||
cue: data.cue,
|
||||
workspace: data.workspace,
|
||||
});
|
||||
}
|
||||
}
|
||||
} else if (updateType === 'updatePlaybackPosition') {
|
||||
Array.from(doc.getElementsByClassName('playback-position')).forEach(($elem, index, array) => {
|
||||
$elem.classList.remove('playback-position');
|
||||
} else if (updateType === 'updatePlaybackAndSelected') {
|
||||
Array.from(doc.querySelectorAll('.selected')).forEach(($el) => {
|
||||
$el.classList.remove('selected');
|
||||
});
|
||||
Array.from(doc.querySelectorAll('.playback-position')).forEach(($el) => {
|
||||
$el.classList.remove('playback-position');
|
||||
});
|
||||
|
||||
const $elem = doc.getElementById(data.cue.uniqueID);
|
||||
$elem.classList.add('playback-position');
|
||||
$elem.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
for (let i = 0; i < data.workspace.selected.length; i++) {
|
||||
const $elem = doc.getElementById(data.workspace.selected[i]);
|
||||
if ($elem) {
|
||||
$elem.classList.add('selected');
|
||||
}
|
||||
}
|
||||
|
||||
const $playheadInfo = doc.getElementById('playhead-information');
|
||||
const $playheadName = doc.getElementById('playhead-name');
|
||||
const $playheadNotes = doc.getElementById('playhead-notes');
|
||||
|
||||
if (data.workspace.playbackPosition) {
|
||||
const $cueRow = doc.getElementById(data.workspace.playbackPosition);
|
||||
if ($cueRow) {
|
||||
$cueRow.classList.add('playback-position');
|
||||
$cueRow.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
}
|
||||
|
||||
const cue = device.data.cueKeys[data.workspace.playbackPosition];
|
||||
if (cue && $playheadName) {
|
||||
$playheadName.setAttribute('class', `playhead-name cartColor-${cue.colorName} playhead-disarmed`);
|
||||
$playheadInfo.classList.add('playhead-active');
|
||||
if (cue.number) {
|
||||
$playheadName.innerHTML = `${cue.number} • ${cue.displayName}`;
|
||||
} else {
|
||||
$playheadName.innerHTML = cue.displayName;
|
||||
}
|
||||
if (cue.notes) {
|
||||
$playheadNotes.innerHTML = cue.notes;
|
||||
} else {
|
||||
$playheadNotes.innerHTML = '<span style="color:#5C5C5C">Notes</span>';
|
||||
}
|
||||
if (!cue.armed) {
|
||||
$playheadName.classList.add('playhead-disarmed');
|
||||
} else {
|
||||
$playheadName.classList.remove('playhead-disarmed');
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$playheadName.setAttribute('class', `playhead-name`);
|
||||
$playheadName.innerHTML = '<span style="color:#747574">[no cue on standby]</span>';
|
||||
$playheadNotes.innerHTML = '';
|
||||
$playheadInfo.classList.remove('playhead-active');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
function addCueToWorkspace(_workspace, cue) {
|
||||
const workspace = _workspace;
|
||||
workspace.cues[cue.uniqueID] = cue;
|
||||
workspace.cues[cue.uniqueID].nestedGroupModes = [];
|
||||
workspace.cues[cue.uniqueID].nestedGroupPosition = [];
|
||||
|
||||
if (cue.cues) {
|
||||
// this cue has children so add them as well
|
||||
cue.cues.forEach((childCue) => {
|
||||
addCueToWorkspace(workspace, childCue);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function getValuesForKeys(device, workspaceID, cue) {
|
||||
device.send(`/workspace/${workspaceID}/cue_id/${cue.uniqueID}/valuesForKeys`, [
|
||||
{ type: 's', value: valuesForKeysString },
|
||||
]);
|
||||
if (cue.cues) {
|
||||
cue.cues.forEach((childCue) => {
|
||||
getValuesForKeys(device, workspaceID, childCue);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function match(testArray, patternArray) {
|
||||
let out = true;
|
||||
if (testArray.length !== patternArray.length) {
|
||||
return false;
|
||||
}
|
||||
patternArray.forEach((patternPart, i) => {
|
||||
if (testArray[i] !== patternPart && patternPart !== '*') {
|
||||
out = false;
|
||||
}
|
||||
});
|
||||
return out;
|
||||
}
|
||||
|
||||
exports.heartbeat = function heartbeat(device) {
|
||||
heartbeatCount++;
|
||||
|
||||
if (Date.now() - lastElapsedUpdate > 300) {
|
||||
interval = 24;
|
||||
} else {
|
||||
interval = 1;
|
||||
}
|
||||
|
||||
if (heartbeatCount % 20 === 0 && device.data.workspaces && Object.keys(device.data.workspaces).length === 0) {
|
||||
device.send(`/version`);
|
||||
device.send('/workspaces');
|
||||
}
|
||||
|
||||
if (heartbeatCount % 16 === 0) {
|
||||
exports.heartbeat = function heartbeat(_device) {
|
||||
const device = _device;
|
||||
device.data.ticks++;
|
||||
if (device.data.ticks % 10 === 0) {
|
||||
device.send(`/thump`);
|
||||
}
|
||||
|
||||
if (heartbeatCount % interval === 0 && device.data.workspaces && Object.keys(device.data.workspaces).length > 0) {
|
||||
if (device.data.ticks - device.data.lastElapsedMessage < 5) {
|
||||
device.send(`/cue_id/active/preWaitElapsed`);
|
||||
device.send(`/cue_id/active/actionElapsed`);
|
||||
device.send(`/cue_id/active/postWaitElapsed`);
|
||||
device.send(`/cue_id/active/actionElapsed`);
|
||||
}
|
||||
};
|
||||
|
||||
function insertChildCues(_device, _oldCues, newCues, _parent) {
|
||||
const device = _device;
|
||||
const newIDs = _.keyBy(newCues, 'uniqueID');
|
||||
const oldCues = _oldCues;
|
||||
const parent = _parent;
|
||||
|
||||
if (!oldCues) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (let i = 0; i < oldCues.length; i++) {
|
||||
const oldCue = oldCues[i];
|
||||
|
||||
if (!newIDs[oldCue.uniqueID]) {
|
||||
oldCues.splice(i, 1);
|
||||
i--;
|
||||
}
|
||||
|
||||
const indexOfOldCueInNew = _.findIndex(newCues, (o) => o.uniqueID === oldCue.uniqueID);
|
||||
|
||||
if (indexOfOldCueInNew >= 0) {
|
||||
const newCue = newCues[indexOfOldCueInNew];
|
||||
oldCues[i].armed = newCue.armed;
|
||||
oldCues[i].colorName = newCue.colorName;
|
||||
oldCues[i].colorNameLive = newCue['colorName/live'];
|
||||
|
||||
oldCues[i].flagged = newCue.flagged;
|
||||
oldCues[i].listName = newCue.listName;
|
||||
oldCues[i].name = newCue.name;
|
||||
oldCues[i].number = newCue.number;
|
||||
oldCues[i].type = newCue.type;
|
||||
oldCues[i].sortIndex = indexOfOldCueInNew;
|
||||
oldCues[i].parent = parent;
|
||||
|
||||
newCue.used = true;
|
||||
|
||||
let keys = device.data.cueKeys[oldCues[i].uniqueID];
|
||||
if (!keys) {
|
||||
device.data.cueKeys[oldCues[i].uniqueID] = {};
|
||||
keys = device.data.cueKeys[oldCues[i].uniqueID];
|
||||
}
|
||||
|
||||
keys.cueInWorkspace = oldCues[i];
|
||||
|
||||
if (oldCues[i].type === 'Group' || oldCues[i].type === 'Cue List' || oldCues[i].type === 'Cart') {
|
||||
insertChildCues(device, oldCues[i].cues, newCue.cues, oldCues[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
for (let i = 0; i < newCues.length; i++) {
|
||||
const newCue = newCues[i];
|
||||
if (newCue.used !== true) {
|
||||
const newIndex = oldCues.push({
|
||||
armed: newCue.armed,
|
||||
colorName: newCue.colorName,
|
||||
colorNameLive: newCue['colorName/live'],
|
||||
flagged: newCue.flagged,
|
||||
listName: newCue.listName,
|
||||
name: newCue.name,
|
||||
number: newCue.number,
|
||||
type: newCue.type,
|
||||
uniqueID: newCue.uniqueID,
|
||||
sortIndex: i,
|
||||
parent,
|
||||
});
|
||||
|
||||
const freshCue = oldCues[newIndex - 1];
|
||||
|
||||
let keys = device.data.cueKeys[freshCue.uniqueID];
|
||||
if (!keys) {
|
||||
device.data.cueKeys[freshCue.uniqueID] = {};
|
||||
keys = device.data.cueKeys[freshCue.uniqueID];
|
||||
}
|
||||
|
||||
if (freshCue.parent === '[root group of cue lists]') {
|
||||
keys.parentKeys = [];
|
||||
} else {
|
||||
keys.parentKeys = [...device.data.cueKeys[freshCue.parent.uniqueID].parentKeys];
|
||||
keys.parentKeys.push(device.data.cueKeys[freshCue.parent.uniqueID]);
|
||||
}
|
||||
|
||||
device.send(`/cue_id/${newCue.uniqueID}/valuesForKeys`, [{ type: 's', value: valuesForKeysString }]);
|
||||
|
||||
keys.cueInWorkspace = freshCue;
|
||||
|
||||
if (freshCue.type === 'Group' || freshCue.type === 'Cue List' || oldCues[i].type === 'Cart') {
|
||||
freshCue.cues = [];
|
||||
insertChildCues(device, freshCue.cues, newCue.cues, freshCue);
|
||||
}
|
||||
}
|
||||
}
|
||||
oldCues.sort((a, b) => a.sortIndex - b.sortIndex);
|
||||
}
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
body {
|
||||
margin-bottom: 200px !important;
|
||||
}
|
||||
table {
|
||||
background-color: #323232;
|
||||
border: 0px;
|
||||
@@ -33,61 +36,60 @@ td img {
|
||||
}
|
||||
|
||||
tr:nth-child(even) {
|
||||
background: #323232;
|
||||
background: #2d2d2d;
|
||||
}
|
||||
tr:nth-child(odd) {
|
||||
background: #2c2c2c;
|
||||
background: #262626;
|
||||
}
|
||||
|
||||
tr:nth-child(even).q-red {
|
||||
background: linear-gradient(to top, #2c2c2c, #4c3130 1px);
|
||||
}
|
||||
tr:nth-child(odd).q-red {
|
||||
background: linear-gradient(to top, #323232, #513635 1px);
|
||||
background: linear-gradient(to top, #262626, #49302f 1px);
|
||||
}
|
||||
.q-red td:first-of-type {
|
||||
padding-left: 5px;
|
||||
border-left: 5px #ff4242 solid;
|
||||
tr:nth-child(even).q-red {
|
||||
background: linear-gradient(to top, #2d2c2d, #513635 1px);
|
||||
}
|
||||
.q-red td.playhead {
|
||||
background: linear-gradient(to right, #ff4242 55%, transparent 55%);
|
||||
}
|
||||
|
||||
tr:nth-child(odd).q-orange {
|
||||
background: linear-gradient(to top, #262626, #443526 1px);
|
||||
}
|
||||
tr:nth-child(even).q-orange {
|
||||
background: linear-gradient(to top, #2c2c2c, #4b3e2a 1px);
|
||||
background: linear-gradient(to top, #2d2c2d, #4a3b2c 1px);
|
||||
}
|
||||
tr:nth-child(odd).q-orange {
|
||||
background: linear-gradient(to top, #323232, #514330 1px);
|
||||
.q-orange td.playhead {
|
||||
background: linear-gradient(to right, #ffa500 55%, transparent 55%);
|
||||
}
|
||||
.q-orange td:first-of-type {
|
||||
padding-left: 5px;
|
||||
border-left: 5px #ffa500 solid;
|
||||
|
||||
tr:nth-child(odd).q-green {
|
||||
background: linear-gradient(to top, #262626, #2d3d27 1px);
|
||||
}
|
||||
tr:nth-child(even).q-green {
|
||||
background: linear-gradient(to top, #2c2c2c, #2d452d 1px);
|
||||
background: linear-gradient(to top, #2d2c2d, #32422e 1px);
|
||||
}
|
||||
tr:nth-child(odd).q-green {
|
||||
background: linear-gradient(to top, #323232, #324b33 1px);
|
||||
.q-green td.playhead {
|
||||
background: linear-gradient(to right, #01d52f 55%, transparent 55%);
|
||||
}
|
||||
.q-green td:first-of-type {
|
||||
padding-left: 5px;
|
||||
border-left: 5px #01d52f solid;
|
||||
|
||||
tr:nth-child(odd).q-blue {
|
||||
background: linear-gradient(to top, #262626, #292d40 1px);
|
||||
}
|
||||
tr:nth-child(even).q-blue {
|
||||
background: linear-gradient(to top, #2c2c2c, #323647 1px);
|
||||
background: linear-gradient(to top, #2d2c2d, #2f3346 1px);
|
||||
}
|
||||
tr:nth-child(odd).q-blue {
|
||||
background: linear-gradient(to top, #323232, #363b4b 1px);
|
||||
.q-blue td.playhead {
|
||||
background: linear-gradient(to right, #536de0 55%, transparent 55%);
|
||||
}
|
||||
.q-blue td:first-of-type {
|
||||
padding-left: 5px;
|
||||
border-left: 5px #536de0 solid;
|
||||
|
||||
tr:nth-child(odd).q-purple {
|
||||
background: linear-gradient(to top, #262626, #342639 1px);
|
||||
}
|
||||
tr:nth-child(even).q-purple {
|
||||
background: linear-gradient(to top, #2c2c2c, #39273d 1px);
|
||||
background: linear-gradient(to top, #2d2c2d, #382c3f 1px);
|
||||
}
|
||||
tr:nth-child(odd).q-purple {
|
||||
background: linear-gradient(to top, #323232, #433147 1px);
|
||||
}
|
||||
.q-purple td:first-of-type {
|
||||
padding-left: 5px;
|
||||
border-left: 5px #a601c0 solid;
|
||||
.q-purple td.playhead {
|
||||
background: linear-gradient(to right, #a601c0 55%, transparent 55%);
|
||||
}
|
||||
|
||||
tr.q-armed-false td {
|
||||
@@ -96,13 +98,22 @@ tr.q-armed-false td {
|
||||
}
|
||||
|
||||
tr.playback-position {
|
||||
background-image: none !important;
|
||||
background: #1557da !important;
|
||||
color: white !important;
|
||||
background: #444 !important;
|
||||
color: white;
|
||||
}
|
||||
tr.playback-position td.playhead {
|
||||
padding: 0px;
|
||||
}
|
||||
tr.playback-position td.playhead::before {
|
||||
content: url(img/playhead.png);
|
||||
}
|
||||
tr.playback-position .q-gray-text {
|
||||
color: white !important;
|
||||
}
|
||||
tr.selected {
|
||||
background: #1557da !important;
|
||||
color: white !important;
|
||||
}
|
||||
|
||||
.gLeft {
|
||||
height: 24px;
|
||||
@@ -140,22 +151,19 @@ tr.playback-position .q-gray-text {
|
||||
border-radius: 6px;
|
||||
}
|
||||
.gMode-1 {
|
||||
border-color: #5a5a87;
|
||||
border-color: #48477f;
|
||||
}
|
||||
.gMode-2 {
|
||||
border-color: #5a5a87;
|
||||
border-color: #48477f;
|
||||
}
|
||||
.gMode-3 {
|
||||
border-color: #429242;
|
||||
border-color: #43a424;
|
||||
}
|
||||
.gMode-4 {
|
||||
border-color: #925fc0;
|
||||
}
|
||||
.gMode-4 {
|
||||
border-color: #925fc0;
|
||||
border-color: #7f26a5;
|
||||
}
|
||||
.gMode-6 {
|
||||
border-color: #d05b15;
|
||||
border-color: #ee6a21;
|
||||
}
|
||||
.gMode-,
|
||||
.gMode-0 {
|
||||
@@ -172,6 +180,12 @@ tr.playback-position .q-gray-text {
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
}
|
||||
.q-target {
|
||||
text-align: center;
|
||||
font-size: 12px;
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
}
|
||||
.q-gray-text {
|
||||
color: #424242;
|
||||
}
|
||||
@@ -193,6 +207,10 @@ tr.playback-position .q-gray-text {
|
||||
box-sizing: border-box;
|
||||
padding: 3px;
|
||||
}
|
||||
.cartCueWrapper.selected .cartCue {
|
||||
border-color: #89b4db;
|
||||
box-shadow: #89b4db 0px 0px 2px 3px;
|
||||
}
|
||||
.cartCue {
|
||||
height: 100%;
|
||||
box-sizing: border-box;
|
||||
@@ -209,27 +227,27 @@ tr.playback-position .q-gray-text {
|
||||
right: 13px;
|
||||
top: 13px;
|
||||
}
|
||||
.cartColor-red {
|
||||
border-color: #ff4242;
|
||||
background-color: #9b3726;
|
||||
div.cartColor-red {
|
||||
border-color: #e7443a;
|
||||
background-color: #942f27;
|
||||
}
|
||||
.cartColor-orange {
|
||||
border-color: #ffa500;
|
||||
background-color: #ad6026;
|
||||
div.cartColor-orange {
|
||||
border-color: #f18f28;
|
||||
background-color: #a95023;
|
||||
}
|
||||
.cartColor-green {
|
||||
border-color: #01d52f;
|
||||
background-color: #397f27;
|
||||
div.cartColor-green {
|
||||
border-color: #4ebf32;
|
||||
background-color: #397824;
|
||||
}
|
||||
.cartColor-blue {
|
||||
border-color: #536de0;
|
||||
background-color: #304893;
|
||||
div.cartColor-blue {
|
||||
border-color: #3a54cf;
|
||||
background-color: #25378a;
|
||||
}
|
||||
.cartColor-purple {
|
||||
border-color: #a601c0;
|
||||
background-color: #592d74;
|
||||
div.cartColor-purple {
|
||||
border-color: #7e25a5;
|
||||
background-color: #4c2269;
|
||||
}
|
||||
.cartColor-none {
|
||||
div.cartColor-none {
|
||||
border-color: #95929f;
|
||||
background-color: #3b3b3b;
|
||||
}
|
||||
@@ -243,6 +261,53 @@ tr.playback-position .q-gray-text {
|
||||
box-shadow: 0px 0px 3px 3px #88b3db, inset 0px 0px 5px #88b3db;
|
||||
}
|
||||
|
||||
#playhead-information {
|
||||
width: 80%;
|
||||
height: 120px;
|
||||
position: fixed;
|
||||
bottom: 30px;
|
||||
left: 10%;
|
||||
padding: 16px;
|
||||
box-sizing: border-box;
|
||||
|
||||
background-color: #2e2d2d;
|
||||
border: #424242 3px solid;
|
||||
border-radius: 4px;
|
||||
box-shadow: black 0px 0px 20px 5px;
|
||||
}
|
||||
#playhead-information.playhead-active {
|
||||
border-color: #4cbe34;
|
||||
}
|
||||
.playhead-name {
|
||||
width: 100%;
|
||||
padding: 6px 12px;
|
||||
box-sizing: border-box;
|
||||
margin-bottom: 12px;
|
||||
|
||||
background-color: #434343;
|
||||
border: #434343 1px solid;
|
||||
font-size: 18px;
|
||||
color: white;
|
||||
border-radius: 3px;
|
||||
}
|
||||
.playhead-disarmed {
|
||||
background: url('img/disarmed-pattern-light.png');
|
||||
background-attachment: fixed;
|
||||
}
|
||||
#playhead-notes {
|
||||
width: 100%;
|
||||
padding: 6px 8px;
|
||||
box-sizing: border-box;
|
||||
height: 36px;
|
||||
|
||||
border: #5c5b5b 1px solid;
|
||||
font-size: 18px;
|
||||
color: #9a9a99;
|
||||
border-radius: 3px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
@media screen and (min-width: 0px) and (max-width: 750px) {
|
||||
.hide-medium {
|
||||
display: none;
|
||||
|
||||
@@ -3,26 +3,42 @@
|
||||
<h2>QLab <%= data.version || "" %></h2>
|
||||
</header>
|
||||
|
||||
|
||||
|
||||
<% const workspaceKeys = Object.keys(data.workspaces); %>
|
||||
|
||||
<% if(workspaceKeys.length==0){ %>
|
||||
<h3>QLab is open but there isn't an open Workspace</h3>
|
||||
<% } %>
|
||||
|
||||
|
||||
<% if(data.permission=="ok"){
|
||||
for(const workspace_id in data.workspaces){
|
||||
const workspace = data.workspaces[workspace_id];
|
||||
for(const cueList_id in workspace.cueLists){
|
||||
const ql = workspace.cueLists[cueList_id]; %>
|
||||
|
||||
<% if(ql.type=="Cue List"){ %>
|
||||
<%= templates.cuelist({cueList: ql, allCues: workspace.cues, rowTemplate: templates.cue, workspace: workspace}) %>
|
||||
<% }else if(ql.type=="Cart"){ %>
|
||||
<%= templates.cart({cueList: ql, allCues: workspace.cues, tileTemplate: templates.tile}) %>
|
||||
<% } %>
|
||||
<% for(let i=0; i<workspaceKeys.length; i++){ %>
|
||||
<% const workspace = data.workspaces[workspaceKeys[i]]; %>
|
||||
|
||||
<% }}}else if(data.permission=="no workspaces"){ %>
|
||||
<% if(workspace.permission=="ok"){ %>
|
||||
|
||||
<h3>QLab is launched but there are no open Workspaces</h3>
|
||||
<% for(let j=0; j<workspace.cueLists.length; j++){ %>
|
||||
<% const cueList = workspace.cueLists[j]; %>
|
||||
|
||||
<% }else if(data.permission=="denied"){ %>
|
||||
<% if(cueList.type=="Cue List"){ %>
|
||||
<%= templates.cuelist({cueList: cueList, allCues: data.cueKeys, rowTemplate: templates.cue, workspace: workspace}) %>
|
||||
<% }else if(cueList.type=="Cart"){ %>
|
||||
<%= templates.cart({cueList: cueList, allCues: data.cueKeys, tileTemplate: templates.tile, workspace: workspace}) %>
|
||||
<% } %>
|
||||
|
||||
<h3>Incorrect Passcode or OSC Access Permissions</h3>
|
||||
<button href="https://qlab.app/docs/v5/fundamentals/workspace-settings#the-osc-access-tab">QLab Documentation: OSC Access Tab</button>
|
||||
<% } %>
|
||||
|
||||
<% }else{ %>
|
||||
|
||||
<h3><%= workspace.displayName %> — <u>Incorrect Passcode or OSC Access Permissions</u></h3>
|
||||
<button href="https://qlab.app/docs/v5/fundamentals/workspace-settings#the-osc-access-tab">QLab Documentation: OSC Access Tab</button>
|
||||
<h1> </h1>
|
||||
<% } %>
|
||||
|
||||
<% } %>
|
||||
|
||||
<div id="playhead-information">
|
||||
<div id="playhead-name" class="playhead-name"><span style="color:#747574">[no cue on standby]</span></div>
|
||||
<div id="playhead-notes"></div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
<%
|
||||
|
||||
let height = 0;
|
||||
let width = 0;
|
||||
let left = 0;
|
||||
let top = 0;
|
||||
let cueKeys = allCues[cue.uniqueID];
|
||||
let parent = allCues[cue.parent];
|
||||
|
||||
if(cueKeys.parent){
|
||||
width = 100/cueKeys.parent.cartColumns;
|
||||
height = 600/cueKeys.parent.cartRows;
|
||||
|
||||
if(cue.parent){
|
||||
width = 100/allCues[cue.parent].cartColumns;
|
||||
height = 600/allCues[cue.parent].cartRows;
|
||||
|
||||
top = (cue.cartPosition[0]-1)*height;
|
||||
left = (cue.cartPosition[1]-1)*width;
|
||||
top = (cueKeys.cartPosition[0]-1)*height;
|
||||
left = (cueKeys.cartPosition[1]-1)*width;
|
||||
}
|
||||
|
||||
let style = `style="left:${left}%; top:${top}px; width:${width }%; height:${height}px;"`;
|
||||
@@ -21,17 +21,21 @@
|
||||
<div id="<%= cue.uniqueID %>" class="cartCueWrapper" <%= style %> >
|
||||
|
||||
<div class="cartCueIcon">
|
||||
<% if(cue.broken){ %>
|
||||
<% if(cueKeys.isBroken){ %>
|
||||
<img src="plugins/qlab/img/status_broken_white.png" height="18px">
|
||||
<% }else if(cue.running){ %>
|
||||
<% }else if(cueKeys.isRunning){ %>
|
||||
<img src="plugins/qlab/img/pause_circled.png" height="24px">
|
||||
<% }else{ %>
|
||||
<img src="plugins/qlab/img/play_circled.png" height="24px">
|
||||
<% } %>
|
||||
</div>
|
||||
|
||||
<div class="cartCue cartColor-<%= cue.colorName %>">
|
||||
<p><%= cue.number %> • <%= cue.displayName %></p>
|
||||
<div class="cartCue cartColor-<%= cueKeys.colorName %>">
|
||||
<p>
|
||||
<%= cueKeys.number %>
|
||||
<% if(cueKeys.number){ %> • <% } %>
|
||||
<%= cueKeys.displayName %>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
Before Width: | Height: | Size: 713 B After Width: | Height: | Size: 2.3 KiB |
@@ -55,10 +55,7 @@ exports.data = function data(_device, buf) {
|
||||
universe.priority = buf.readUInt8(108);
|
||||
universe.cid = buf.toString('hex', 22, 38);
|
||||
universe.slots = buf.slice(126);
|
||||
|
||||
if (buf.readUInt8(125) !== 0) {
|
||||
universe.startCode = buf.readUInt8(125);
|
||||
}
|
||||
universe.startCode = buf.readUInt8(125);
|
||||
|
||||
device.data.source = buf.toString('utf8', 44, 108);
|
||||
device.displayName = `${device.data.source} sACN`;
|
||||
@@ -70,12 +67,12 @@ exports.data = function data(_device, buf) {
|
||||
universe.slotElems = [];
|
||||
universe.slotElemsSet = false;
|
||||
|
||||
if (universe.priority > 0) {
|
||||
if (universe.priority > 0 && universe.startCode === 0) {
|
||||
device.draw();
|
||||
device.update('elementCache');
|
||||
}
|
||||
}
|
||||
if (universe.priority > 0) {
|
||||
if (universe.priority > 0 && universe.startCode === 0) {
|
||||
device.update('universeData', {
|
||||
universeIndex,
|
||||
universe,
|
||||
@@ -115,7 +112,7 @@ exports.update = function update(_device, doc, updateType, updateData) {
|
||||
} else if (data.startCode === 0xcc) {
|
||||
$code.textContent = 'RDM';
|
||||
}
|
||||
} else {
|
||||
} else if (data.universe.startCode === 0) {
|
||||
device.draw();
|
||||
device.update('elementCache');
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ class Channel {
|
||||
this.rx_rf_lvl = 0;
|
||||
this.rf_antenna = 0;
|
||||
this.tx_type = 0;
|
||||
this.rx_graph_bars = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -21,6 +21,10 @@ exports.ready = function ready(_device) {
|
||||
const device = _device;
|
||||
device.data.channelCount = 0;
|
||||
device.data.channels = [{}, new Channel(), new Channel(), new Channel(), new Channel()];
|
||||
|
||||
device.send('< GET 0 ALL >');
|
||||
device.send('< SET 0 METER_RATE 00100 >');
|
||||
device.send('< SAMPLE 0 AUDIO_LVL>');
|
||||
};
|
||||
|
||||
exports.data = function data(_device, message) {
|
||||
@@ -31,6 +35,8 @@ exports.data = function data(_device, message) {
|
||||
return;
|
||||
}
|
||||
|
||||
// console.log(msgStr);
|
||||
|
||||
msgStr = msgStr.slice(2).slice(0, -1);
|
||||
const msgs = msgStr.split('><');
|
||||
|
||||
@@ -84,23 +90,23 @@ exports.data = function data(_device, message) {
|
||||
exports.update = function update(device, doc, updateType, data) {
|
||||
for (let i = 1; i < data.channels.length; i++) {
|
||||
const channel = data.channels[i];
|
||||
|
||||
const $rf = doc.getElementById(`ch-${i}-rf`);
|
||||
if ($rf) {
|
||||
$rf.style.height = 90 - (channel.rx_rf_lvl + 90) * 2;
|
||||
}
|
||||
|
||||
const $audio = doc.getElementById(`ch-${i}-audio`);
|
||||
const $audioText = doc.getElementById(`ch-${i}-audio-text`);
|
||||
if ($audio) {
|
||||
$audio.style.height = 90 - channel.audio_lvl * 2;
|
||||
}
|
||||
if ($audioText) {
|
||||
$audioText.textContent = channel.audio_lvl;
|
||||
}
|
||||
|
||||
const $rfA = doc.getElementById(`ch-${i}-a`);
|
||||
const $rfB = doc.getElementById(`ch-${i}-b`);
|
||||
let rfClass = '';
|
||||
|
||||
if ($rfA) {
|
||||
if (channel.rf_antenna.charAt(0) === 'A') {
|
||||
$rfA.style.color = '#53c3c3';
|
||||
rfClass = 'color-1';
|
||||
} else {
|
||||
$rfA.style.color = '#333';
|
||||
}
|
||||
@@ -108,10 +114,32 @@ exports.update = function update(device, doc, updateType, data) {
|
||||
if ($rfB) {
|
||||
if (channel.rf_antenna.charAt(1) === 'B') {
|
||||
$rfB.style.color = '#53c3c3';
|
||||
rfClass = 'color-2';
|
||||
} else {
|
||||
$rfB.style.color = '#333';
|
||||
}
|
||||
}
|
||||
|
||||
const $rf = doc.getElementById(`ch-${i}-rf`);
|
||||
const $rfGraph = doc.getElementById(`ch-${i}-graph`);
|
||||
const $rfText = doc.getElementById(`ch-${i}-rf-text`);
|
||||
const rfHeight = 90 - (channel.rx_rf_lvl + 90) * 2;
|
||||
if ($rf) {
|
||||
$rf.style.height = rfHeight;
|
||||
}
|
||||
if ($rfGraph) {
|
||||
if ($rfGraph.childElementCount > 115) {
|
||||
$rfGraph.removeChild($rfGraph.firstElementChild);
|
||||
}
|
||||
$rfGraph.insertAdjacentHTML(
|
||||
'beforeend',
|
||||
`<div class="rf-graph-bar ${rfClass}" style="height: ${channel.rx_rf_lvl + 100}px;"></div>`
|
||||
);
|
||||
channel.rx_graph_bars++;
|
||||
}
|
||||
if ($rfText) {
|
||||
$rfText.textContent = channel.rx_rf_lvl;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ table td {
|
||||
border-radius: 2px;
|
||||
}
|
||||
.batt-knob.green {
|
||||
background-color: greenyellow;
|
||||
background-color: #adff2f;
|
||||
}
|
||||
.batt-bar {
|
||||
height: 26px;
|
||||
@@ -99,3 +99,25 @@ small {
|
||||
small small {
|
||||
color: #444;
|
||||
}
|
||||
|
||||
.rf-graph {
|
||||
height: 80px;
|
||||
vertical-align: bottom;
|
||||
text-align: left;
|
||||
}
|
||||
.rf-graph-bar {
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
width: 1px;
|
||||
height: 1px;
|
||||
background: #383943;
|
||||
display: inline-block;
|
||||
}
|
||||
.color-1 {
|
||||
background: #292662;
|
||||
border-top: #554ed4 1px solid;
|
||||
}
|
||||
.color-2 {
|
||||
background: #283636;
|
||||
border-top: #50c3c3 1px solid;
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
id="ch-<%= i %>-rf"
|
||||
style="height: <%= 90- ((ch.rx_rf_lvl + 90) * 2) %>"></div>
|
||||
</div>
|
||||
<small><%= ch.rx_rf_lvl %><br /><small>dBm</small></small>
|
||||
<small><span id="ch-<%= i %>-rf-text"><%= ch.rx_rf_lvl %></span><br /><small>dBm</small></small>
|
||||
</td>
|
||||
<td style="width: 40px">
|
||||
<div class="rf-indicator-wrapper"> </div>
|
||||
@@ -33,9 +33,9 @@
|
||||
<div
|
||||
class="bar"
|
||||
id="ch-<%= i %>-audio"
|
||||
style="height: <%= 90- (ch.audio_lvl * 2) %>"></div>
|
||||
style="height: <%= 90- (ch.rx_rf_lvl * 2) %>"></div>
|
||||
</div>
|
||||
<small><%= ch.audio_lvl %><br /><small>dBFS</small></small>
|
||||
<small><span id="ch-<%= i %>-audio-text"><%= ch.audio_lvl %></span><br /><small>dBFS</small></small>
|
||||
</td>
|
||||
<td style="width: 40px">
|
||||
<div class="rf-indicator-wrapper"> </div>
|
||||
@@ -43,7 +43,12 @@
|
||||
<div class="bar-wrapper pink">
|
||||
<div class="bar" style="height: <%= 60- (ch.audio_gain * 1.4) %>"></div>
|
||||
</div>
|
||||
<small><%= ch.audio_gain %><br /><small>dB</small></small>
|
||||
<small id=""><%= ch.audio_gain %><br /><small>dB</small></small>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" id="ch-<%= i %>-graph" class="rf-graph">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.8 KiB |
@@ -91,6 +91,8 @@ window.init = function init() {
|
||||
const deviceID = e.srcElement.id;
|
||||
if (e.srcElement.id !== 'device-list') {
|
||||
VIEW.switchDevice(deviceID);
|
||||
} else {
|
||||
VIEW.switchDevice(undefined);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -125,22 +127,6 @@ window.init = function init() {
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
document.getElementById('device-list-col').onclick = function deviceListClick(e) {
|
||||
try {
|
||||
document.querySelector('#device-list .active-device').classList.remove('active-device');
|
||||
ipcRenderer.send('disableDeviceDropdown', '');
|
||||
} catch (err) {
|
||||
// console.log(err)
|
||||
}
|
||||
try {
|
||||
document.getElementsByClassName('active-device-outline')[0].classList.remove('active-device-outline');
|
||||
} catch (err) {
|
||||
// console.log(err)
|
||||
}
|
||||
|
||||
VIEW.switchDevice();
|
||||
};
|
||||
};
|
||||
|
||||
ipcRenderer.on('setActiveDevicePinned', (event, message) => {
|
||||
|
||||
@@ -78,7 +78,10 @@ a {
|
||||
#device-list {
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
height: calc(100% - 387px);
|
||||
padding: 0px 10px;
|
||||
overflow-x: hidden;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
#device-list div {
|
||||
pointer-events: none;
|
||||
@@ -182,6 +185,15 @@ a {
|
||||
#device-settings #device-settings-port {
|
||||
width: 70px;
|
||||
}
|
||||
#network-indicator-dot {
|
||||
position: absolute;
|
||||
left: 250px;
|
||||
bottom: 8px;
|
||||
background: #00ff00;
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
/* SECOND COL */
|
||||
#all-devices {
|
||||
@@ -190,11 +202,20 @@ a {
|
||||
background-color: rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
.device-pin {
|
||||
position: absolute;
|
||||
right: 45px;
|
||||
top: 4px;
|
||||
height: 20px;
|
||||
padding: inherit;
|
||||
}
|
||||
.device-traffic-signal {
|
||||
position: absolute;
|
||||
right: 15px;
|
||||
top: 4px;
|
||||
height: 20px;
|
||||
padding: inherit;
|
||||
opacity: 0.3;
|
||||
transition: opacity 0.1s ease-in-out;
|
||||
}
|
||||
.device-wrapper {
|
||||
box-sizing: border-box;
|
||||
@@ -349,3 +370,20 @@ select.button:focus {
|
||||
body :not(input):not(select):not(textarea) {
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar {
|
||||
/* background-color: black; */
|
||||
width: 12px;
|
||||
}
|
||||
::-webkit-scrollbar-track,
|
||||
::-webkit-scrollbar-corner {
|
||||
background-color: rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
::-webkit-scrollbar-thumb {
|
||||
background-color: #6b6b6b;
|
||||
border-radius: 16px;
|
||||
border: 3px solid #2b2b2b;
|
||||
}
|
||||
::-webkit-scrollbar-button {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 401 KiB After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 216 KiB After Width: | Height: | Size: 125 KiB |
|
After Width: | Height: | Size: 236 B |
@@ -44,8 +44,10 @@ function registerDevice(newDevice, discoveryMethod) {
|
||||
lastDrawn: 0,
|
||||
lastHeartbeat: 0,
|
||||
lastMessage: 0,
|
||||
sendQueue: [],
|
||||
heartbeatInterval: PLUGINS.all[newDevice.type].heartbeatInterval,
|
||||
heartbeatTimeout: PLUGINS.all[newDevice.type].heartbeatTimeout,
|
||||
trafficSignal: VIEW.trafficSignal,
|
||||
draw() {
|
||||
VIEW.draw(this);
|
||||
},
|
||||
@@ -127,10 +129,16 @@ function initDeviceConnection(id) {
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
}
|
||||
device.trafficSignal(device);
|
||||
device.lastMessage = Date.now();
|
||||
});
|
||||
device.send = (address, args) => {
|
||||
device.connection.send({ address, args });
|
||||
const addr = address;
|
||||
const arg = args;
|
||||
device.sendQueue.push({ address: addr, args: arg });
|
||||
};
|
||||
device.sendNow = (data) => {
|
||||
device.connection.send(data);
|
||||
};
|
||||
} else if (plugins[type].config.connectionType === 'TCPsocket') {
|
||||
device.connection = new net.Socket();
|
||||
@@ -155,10 +163,14 @@ function initDeviceConnection(id) {
|
||||
// log("SOCK IN", message);
|
||||
plugins[type].data(device, message);
|
||||
device.lastMessage = Date.now();
|
||||
device.trafficSignal(device);
|
||||
infoUpdate(device, 'status', 'ok');
|
||||
});
|
||||
device.send = (data) => {
|
||||
// log("SOCK OUT", data);
|
||||
device.sendQueue.push(data);
|
||||
};
|
||||
device.sendNow = (data) => {
|
||||
device.connection.write(data);
|
||||
};
|
||||
} else if (plugins[type].config.connectionType === 'UDPsocket') {
|
||||
@@ -170,11 +182,15 @@ function initDeviceConnection(id) {
|
||||
device.connection.on('message', (msg, info) => {
|
||||
plugins[type].data(device, msg);
|
||||
device.lastMessage = Date.now();
|
||||
device.trafficSignal(device);
|
||||
infoUpdate(device, 'status', 'ok');
|
||||
});
|
||||
});
|
||||
|
||||
device.send = (data) => {
|
||||
device.sendQueue.push(data);
|
||||
};
|
||||
device.sendNow = (data) => {
|
||||
device.connection.send(Buffer.from(data), device.port, device.addresses[0], (err) => {
|
||||
// console.log(err);
|
||||
});
|
||||
@@ -188,6 +204,7 @@ function initDeviceConnection(id) {
|
||||
device.connection.on('message', (msg, info) => {
|
||||
plugins[type].data(device, msg);
|
||||
device.lastMessage = Date.now();
|
||||
device.trafficSignal(device);
|
||||
infoUpdate(device, 'status', 'ok');
|
||||
});
|
||||
});
|
||||
@@ -202,6 +219,7 @@ function initDeviceConnection(id) {
|
||||
|
||||
device.connection.on('connected', () => {
|
||||
infoUpdate(device, 'status', 'ok');
|
||||
device.trafficSignal(device);
|
||||
plugins[type].ready(device);
|
||||
});
|
||||
|
||||
@@ -226,8 +244,14 @@ module.exports.deleteActive = function deleteActive() {
|
||||
);
|
||||
|
||||
if (choice) {
|
||||
if (device.plugin.connectionType === 'TCPsocket') {
|
||||
if (device.plugin.config.connectionType === 'TCPsocket') {
|
||||
device.connection.destroy();
|
||||
} else if (device.plugin.config.connectionType === 'UDPsocket') {
|
||||
device.connection.close();
|
||||
} else if (device.plugin.config.connectionType === 'multicast') {
|
||||
device.connection.close();
|
||||
} else if (device.plugin.config.connectionType.startsWith('osc')) {
|
||||
device.connection.close();
|
||||
}
|
||||
VIEW.removeDeviceFromList(device);
|
||||
delete devices[device.id];
|
||||
@@ -324,9 +348,27 @@ function heartbeat() {
|
||||
}
|
||||
d.lastHeartbeat = Date.now();
|
||||
}
|
||||
|
||||
if (d.sendQueue.length > 0 && d.sendNow) {
|
||||
d.sendNow(d.sendQueue[0]);
|
||||
d.sendQueue.shift();
|
||||
}
|
||||
});
|
||||
}
|
||||
setInterval(heartbeat, 100);
|
||||
setInterval(heartbeat, 50);
|
||||
|
||||
function networkTick() {
|
||||
Object.keys(devices).forEach((deviceID) => {
|
||||
const d = devices[deviceID];
|
||||
|
||||
if (d.sendQueue.length > 0 && d.sendNow) {
|
||||
d.sendNow(d.sendQueue[0]);
|
||||
d.sendQueue.shift();
|
||||
d.trafficSignal(d);
|
||||
}
|
||||
});
|
||||
}
|
||||
setInterval(networkTick, 10);
|
||||
|
||||
function isDeviceAlreadyAdded(newDevice) {
|
||||
let deviceAlreadyAdded = false;
|
||||
|
||||
@@ -126,29 +126,15 @@ function searchBonjour(pluginType, pluginConfig) {
|
||||
}
|
||||
});
|
||||
|
||||
if (pluginConfig.searchOptions.validateResponse) {
|
||||
if (pluginConfig.searchOptions.validateResponse(e.fqdn)) {
|
||||
DEVICE.registerDevice(
|
||||
{
|
||||
type: pluginType,
|
||||
defaultName: e.name,
|
||||
port: e.port,
|
||||
addresses: validAddresses,
|
||||
},
|
||||
'fromSearch'
|
||||
);
|
||||
}
|
||||
} else {
|
||||
DEVICE.registerDevice(
|
||||
{
|
||||
type: pluginType,
|
||||
defaultName: e.name,
|
||||
port: e.port,
|
||||
addresses: validAddresses,
|
||||
},
|
||||
'fromSearch'
|
||||
);
|
||||
}
|
||||
DEVICE.registerDevice(
|
||||
{
|
||||
type: pluginType,
|
||||
defaultName: e.name,
|
||||
port: e.port,
|
||||
addresses: validAddresses,
|
||||
},
|
||||
'fromSearch'
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -162,6 +162,10 @@ function switchDevice(id) {
|
||||
if (id === undefined) {
|
||||
document.getElementById('refresh-device-button').disabled = true;
|
||||
document.getElementById('device-settings-table').style.display = 'none';
|
||||
const $activeDevice = document.querySelector('.active-device');
|
||||
if ($activeDevice) {
|
||||
$activeDevice.classList.remove('active-device');
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -171,7 +175,10 @@ function switchDevice(id) {
|
||||
const $deviceWrapper = document.getElementById(`device-${i}`);
|
||||
|
||||
if (!$deviceWrapper) {
|
||||
const html = `<div class="col device-wrapper" id="device-${i}"><img id="device-${i}-pinned" class="device-pin" src="src/assets/img/outline_push_pin_white_18dp.png"><iframe id="device-${i}-draw-area" class="draw-area"></iframe></div>`;
|
||||
let html = `<div class="col device-wrapper" id="device-${i}">`;
|
||||
html += `<img id="device-${i}-pinned" class="device-pin" src="src/assets/img/outline_push_pin_white_18dp.png">`;
|
||||
html += `<img id="device-${i}-traffic" class="device-traffic-signal" src="src/assets/img/outline_link_white_18dp.png">`;
|
||||
html += `<iframe id="device-${i}-draw-area" class="draw-area"></iframe></div>`;
|
||||
document.getElementById('all-devices').insertAdjacentHTML('afterbegin', html);
|
||||
}
|
||||
|
||||
@@ -305,6 +312,16 @@ module.exports.selectNextDevice = function selectNextDevice() {
|
||||
switchDevice(keys[prevIndex]);
|
||||
};
|
||||
|
||||
module.exports.trafficSignal = function trafficSignal(device) {
|
||||
const $signal = document.querySelector(`#device-${device.id} .device-traffic-signal`);
|
||||
if ($signal) {
|
||||
$signal.style.opacity = 1;
|
||||
setTimeout(() => {
|
||||
$signal.style.opacity = 0.3;
|
||||
}, 50);
|
||||
}
|
||||
};
|
||||
|
||||
function populatePluginLists() {
|
||||
let typeSelect = '';
|
||||
let addSelect = '<option value="" disabled selected hidden> + </option>';
|
||||
|
||||