nodeskini 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -0
- package/client/archive/bundle.js +11528 -0
- package/client/archive/golem.html +60 -0
- package/client/archive/golemClient.js +595 -0
- package/client/archive/golembundle.js +11634 -0
- package/client/archive/sequencer.html +43 -0
- package/client/archive/sequenceurClient.js +815 -0
- package/client/archive/stylegolem.css +158 -0
- package/client/archive/stylesequenceur.css +204 -0
- package/client/clientListe/Sortable-master/.circleci/config.yml +33 -0
- package/client/clientListe/Sortable-master/.editorconfig +15 -0
- package/client/clientListe/Sortable-master/.github/ISSUE_TEMPLATE/bug-report.md +73 -0
- package/client/clientListe/Sortable-master/.github/ISSUE_TEMPLATE/custom-template.md +48 -0
- package/client/clientListe/Sortable-master/.github/ISSUE_TEMPLATE/feature-request.md +41 -0
- package/client/clientListe/Sortable-master/.jshintrc +25 -0
- package/client/clientListe/Sortable-master/.testcaferc.json +7 -0
- package/client/clientListe/Sortable-master/CONTRIBUTING.md +26 -0
- package/client/clientListe/Sortable-master/LICENSE +21 -0
- package/client/clientListe/Sortable-master/README.md +813 -0
- package/client/clientListe/Sortable-master/Sortable.js +3709 -0
- package/client/clientListe/Sortable-master/Sortable.min.js +2 -0
- package/client/clientListe/Sortable-master/Sortable.min.old.js +2 -0
- package/client/clientListe/Sortable-master/Sortable.min.old.old.js +2 -0
- package/client/clientListe/Sortable-master/babel.config.js +27 -0
- package/client/clientListe/Sortable-master/bower.json +30 -0
- package/client/clientListe/Sortable-master/entry/entry-complete.js +8 -0
- package/client/clientListe/Sortable-master/entry/entry-core.js +19 -0
- package/client/clientListe/Sortable-master/entry/entry-defaults.js +19 -0
- package/client/clientListe/Sortable-master/index.html +460 -0
- package/client/clientListe/Sortable-master/modular/sortable.complete.esm.js +3701 -0
- package/client/clientListe/Sortable-master/modular/sortable.core.esm.js +3698 -0
- package/client/clientListe/Sortable-master/modular/sortable.esm.js +3699 -0
- package/client/clientListe/Sortable-master/package-lock.json +5704 -0
- package/client/clientListe/Sortable-master/package.json +56 -0
- package/client/clientListe/Sortable-master/plugins/AutoScroll/AutoScroll.js +270 -0
- package/client/clientListe/Sortable-master/plugins/AutoScroll/README.md +80 -0
- package/client/clientListe/Sortable-master/plugins/AutoScroll/index.js +1 -0
- package/client/clientListe/Sortable-master/plugins/MultiDrag/MultiDrag.js +617 -0
- package/client/clientListe/Sortable-master/plugins/MultiDrag/README.md +96 -0
- package/client/clientListe/Sortable-master/plugins/MultiDrag/index.js +1 -0
- package/client/clientListe/Sortable-master/plugins/OnSpill/OnSpill.js +79 -0
- package/client/clientListe/Sortable-master/plugins/OnSpill/README.md +60 -0
- package/client/clientListe/Sortable-master/plugins/OnSpill/index.js +1 -0
- package/client/clientListe/Sortable-master/plugins/README.md +178 -0
- package/client/clientListe/Sortable-master/plugins/Swap/README.md +55 -0
- package/client/clientListe/Sortable-master/plugins/Swap/Swap.js +90 -0
- package/client/clientListe/Sortable-master/plugins/Swap/index.js +1 -0
- package/client/clientListe/Sortable-master/scripts/banner.js +8 -0
- package/client/clientListe/Sortable-master/scripts/build.js +17 -0
- package/client/clientListe/Sortable-master/scripts/esm-build.js +28 -0
- package/client/clientListe/Sortable-master/scripts/minify.js +11 -0
- package/client/clientListe/Sortable-master/scripts/test-compat.js +30 -0
- package/client/clientListe/Sortable-master/scripts/test.js +21 -0
- package/client/clientListe/Sortable-master/scripts/umd-build.js +15 -0
- package/client/clientListe/Sortable-master/src/Animation.js +175 -0
- package/client/clientListe/Sortable-master/src/BrowserInfo.js +12 -0
- package/client/clientListe/Sortable-master/src/EventDispatcher.js +57 -0
- package/client/clientListe/Sortable-master/src/PluginManager.js +87 -0
- package/client/clientListe/Sortable-master/src/Sortable.js +1971 -0
- package/client/clientListe/Sortable-master/src/utils.js +556 -0
- package/client/clientListe/Sortable-master/st/app.js +224 -0
- package/client/clientListe/Sortable-master/st/iframe/frame.html +32 -0
- package/client/clientListe/Sortable-master/st/iframe/index.html +49 -0
- package/client/clientListe/Sortable-master/st/logo.png +0 -0
- package/client/clientListe/Sortable-master/st/og-image.png +0 -0
- package/client/clientListe/Sortable-master/st/prettify/prettify.css +1 -0
- package/client/clientListe/Sortable-master/st/prettify/prettify.js +46 -0
- package/client/clientListe/Sortable-master/st/prettify/run_prettify.js +64 -0
- package/client/clientListe/Sortable-master/st/saucelabs.svg +1 -0
- package/client/clientListe/Sortable-master/st/theme.css +254 -0
- package/client/clientListe/Sortable-master/tests/Sortable.compat.test.js +39 -0
- package/client/clientListe/Sortable-master/tests/Sortable.test.js +386 -0
- package/client/clientListe/Sortable-master/tests/dual-list.html +34 -0
- package/client/clientListe/Sortable-master/tests/empty-list.html +30 -0
- package/client/clientListe/Sortable-master/tests/filter.html +27 -0
- package/client/clientListe/Sortable-master/tests/handles.html +27 -0
- package/client/clientListe/Sortable-master/tests/nested.html +67 -0
- package/client/clientListe/Sortable-master/tests/single-list.html +25 -0
- package/client/clientListe/Sortable-master/tests/style.css +18 -0
- package/client/clientListe/clientListe.html +148 -0
- package/client/clientListe/clientListe.js +1508 -0
- package/client/clientListe/clientListebundle.js +13164 -0
- package/client/clientListe/images/poubelle.png +0 -0
- package/client/clientListe/images/start.png +0 -0
- package/client/clientListe/images/stop.png +0 -0
- package/client/clientListe/images/submit.png +0 -0
- package/client/clientListe/sortable-theme-bootstrap.css +90 -0
- package/client/configurateur/configReact.js +273 -0
- package/client/configurateur/configReactbundle.js +295 -0
- package/client/configurateur/configurateur.css +95 -0
- package/client/configurateur/configurateur.html +48 -0
- package/client/configurateur/lib/jexcel.css +755 -0
- package/client/configurateur/lib/jexcel.js +14970 -0
- package/client/configurateur/lib/jsuites.css +2801 -0
- package/client/configurateur/lib/jsuites.js +11822 -0
- package/client/configurateur/lib/react-dom.production.min.js +239 -0
- package/client/configurateur/lib/react.production.min.js +32 -0
- package/client/configurateur/src/configReact.js +247 -0
- package/client/controleur/clientcontroleur.js +536 -0
- package/client/controleur/clientcontroleur.test.js +282 -0
- package/client/controleur/controleur.html +51 -0
- package/client/controleur/controleurbundle.js +565 -0
- package/client/controleur/stylecontroleur.css +236 -0
- package/client/controleurHH/controleurHH.html +71 -0
- package/client/controleurHH/controleurHH.js +252 -0
- package/client/controleurHH/styles/index.css +320 -0
- package/client/controleurHH/styles/material.css +11552 -0
- package/client/parametrage/paramReact.js +473 -0
- package/client/parametrage/paramReactbundle.js +500 -0
- package/client/parametrage/parametrage.css +111 -0
- package/client/parametrage/parametrage.html +163 -0
- package/client/parametrage/src/paramReact.js +459 -0
- package/client/score/hash.js +83 -0
- package/client/score/p5.min.js +3 -0
- package/client/score/parto1.js +1171 -0
- package/client/score/parto1bundle.js +1181 -0
- package/client/score/processing.min.js +431 -0
- package/client/score/score.html +15 -0
- package/client/score/score.js +34 -0
- package/client/simulateurListe/simulateurFork.js +750 -0
- package/client/simulateurListe/simulateurFork.mjs +681 -0
- package/client/simulateurListe/simulateurForkSansReorg.js +569 -0
- package/client/simulateurListe/simulateurListe.js +628 -0
- package/myReact/archive/Nodeemitvaluedlocal1.hh.js +52 -0
- package/myReact/archive/abort-parNode.js +79 -0
- package/myReact/archive/abroNode.js +169 -0
- package/myReact/archive/abroNode2.js +80 -0
- package/myReact/archive/atom.compile.hh.js +51 -0
- package/myReact/archive/await-countNode.js +67 -0
- package/myReact/archive/await-nowvalNode.js +44 -0
- package/myReact/archive/callHH.js +96 -0
- package/myReact/archive/emit-if2.hh.compiled.js +113 -0
- package/myReact/archive/every1Node.js +35 -0
- package/myReact/archive/if-runNode.js +74 -0
- package/myReact/archive/if1Node.js +43 -0
- package/myReact/archive/makeawait.js +0 -0
- package/myReact/archive/myReact.old.js +684 -0
- package/myReact/archive/orchestration.js +281 -0
- package/myReact/archive/orchestration1.js +132 -0
- package/myReact/archive/orchestration1.xml +465 -0
- package/myReact/archive/orchestration2.js +161 -0
- package/myReact/archive/orchestrationHH.mano.js +280 -0
- package/myReact/archive/orchestrationHHTest.js +428 -0
- package/myReact/archive/orchestrationHHTest.xml +234 -0
- package/myReact/archive/orchestrationHHTestRun.js +104 -0
- package/myReact/archive/orchestrationHHTestRun.xml +34 -0
- package/myReact/archive/orchestrationTest0.js +178 -0
- package/myReact/archive/orchestrationTest1.js +181 -0
- package/myReact/archive/orchestrationTest2.js +281 -0
- package/myReact/archive/run3pointsNode.js +59 -0
- package/myReact/archive/runNode.js +123 -0
- package/myReact/archive/runNode2.js +91 -0
- package/myReact/archive/testAwait1.js +141 -0
- package/myReact/archive/testAwait1.xml +86 -0
- package/myReact/archive/testEvery1.js +122 -0
- package/myReact/archive/testEvery1.xml +79 -0
- package/myReact/archive/testHH1.js +135 -0
- package/myReact/archive/testHH1.xml +86 -0
- package/myReact/archive/testHH1revu.js +104 -0
- package/myReact/archive/testHH2.js +122 -0
- package/myReact/archive/testHH2.xml +79 -0
- package/myReact/archive/testHH3.js +130 -0
- package/myReact/archive/testHH3.xml +86 -0
- package/myReact/archive/testHHabort.js +121 -0
- package/myReact/archive/testHHabort.xml +83 -0
- package/myReact/archive/testMakeawait.js +202 -0
- package/myReact/archive/testRun1.js +168 -0
- package/myReact/archive/testRun1.xml +142 -0
- package/myReact/archive/titi.js +28 -0
- package/myReact/archive/titi.xml +110 -0
- package/myReact/archive/toto.js +73 -0
- package/myReact/archive/toto.xml +198 -0
- package/myReact/archive/trap-await-parallelNode.js +123 -0
- package/myReact/inutiles/hiver2022.xml +804 -0
- package/myReact/inutiles/hopeNode.xml +459 -0
- package/myReact/inutiles/mars2022.xml +871 -0
- package/myReact/inutiles/mystique1.xml +318 -0
- package/myReact/inutiles/mystiqueOSC.xml +277 -0
- package/myReact/inutiles/opus5Node.xml +1271 -0
- package/myReact/inutiles/opus5NodeLinux.xml +1241 -0
- package/myReact/inutiles/orchestrationHH.xml +541 -0
- package/myReact/inutiles/orchestrationHH2.xml +547 -0
- package/myReact/inutiles/testHH.xml +95 -0
- package/myReact/inutiles/trouveLaPercuTenor.xml +349 -0
- package/myReact/myReact.js +744 -0
- package/myReact/myReact.min.js +1 -0
- package/myReact/orchestrationHH.js +311 -0
- package/myReact/orchestrationHH.mjs +436 -0
- package/myReact/orchestrationHH.mjs.map +1 -0
- package/package.json +46 -0
- package/serveur/OSCandMidi.mjs +361 -0
- package/serveur/computeScore.mjs +415 -0
- package/serveur/controleDAW.mjs +1149 -0
- package/serveur/defaultSession.csv +2 -0
- package/serveur/defaultSkiniParametres.js +119 -0
- package/serveur/gameOSC.mjs +96 -0
- package/serveur/groupeClientsSons.mjs +1014 -0
- package/serveur/ipConfig.json +24 -0
- package/serveur/ipConfig127.json +19 -0
- package/serveur/ipConfig75.json +17 -0
- package/serveur/ipConfigBH.json +19 -0
- package/serveur/ipConfigLocal.json +19 -0
- package/serveur/midiConfig.json +26 -0
- package/serveur/midiConfigBH.json +26 -0
- package/serveur/midiConfigVoid.json +3 -0
- package/serveur/midimix.mjs +570 -0
- package/serveur/saveParam.mjs +159 -0
- package/serveur/skiniParametres.good.js +132 -0
- package/serveur/skiniParametres.js +106 -0
- package/serveur/utilsHHSkini.hh.js +64 -0
- package/serveur/utilsSkini.mjs +137 -0
- package/serveur/websocketServer.mjs +2052 -0
- package/serveur/workerInterfaceZ.mjs +327 -0
- package/serveur/workerSynchro.mjs +49 -0
- package/skini.mjs +141 -0
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
// Refactor du fichier original
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
const ipConfig = require('../../serveur/ipConfig');
|
|
5
|
+
|
|
6
|
+
let ws;
|
|
7
|
+
const id = Math.floor((Math.random() * 1000000) + 1);
|
|
8
|
+
|
|
9
|
+
let par;
|
|
10
|
+
let nbeLignesPad, nbeColonesPad;
|
|
11
|
+
let etatScrutateurs = [];
|
|
12
|
+
|
|
13
|
+
const debug = false;
|
|
14
|
+
const debug1 = true;
|
|
15
|
+
const automateEncours = true;
|
|
16
|
+
|
|
17
|
+
const msg = { type: "configuration" };
|
|
18
|
+
|
|
19
|
+
const COLORS = {
|
|
20
|
+
BLEU: "padBoutonBleu",
|
|
21
|
+
DEFAULT: "padBouton",
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
function resetSequenceur() {
|
|
25
|
+
ws.send(JSON.stringify({ type: "resetSequenceur" }));
|
|
26
|
+
}
|
|
27
|
+
window.resetSequenceur = resetSequenceur;
|
|
28
|
+
|
|
29
|
+
function creationPad() {
|
|
30
|
+
const place = document.getElementById("listBoutonsLiens");
|
|
31
|
+
place.innerHTML = '';
|
|
32
|
+
|
|
33
|
+
// Première ligne
|
|
34
|
+
const emHeader = document.createElement("a");
|
|
35
|
+
emHeader.className = "texteSon";
|
|
36
|
+
emHeader.innerHTML = "-";
|
|
37
|
+
place.appendChild(emHeader);
|
|
38
|
+
|
|
39
|
+
for (let j = 0; j < nbeColonesPad; j++) {
|
|
40
|
+
const button = document.createElement("button");
|
|
41
|
+
button.dataset.colone = j;
|
|
42
|
+
button.className = "numColone";
|
|
43
|
+
button.innerHTML = j;
|
|
44
|
+
button.addEventListener("click", () => clickColoneBouton(j));
|
|
45
|
+
place.appendChild(button);
|
|
46
|
+
}
|
|
47
|
+
place.appendChild(document.createElement("br"));
|
|
48
|
+
|
|
49
|
+
// Le PAD
|
|
50
|
+
let compteurBouton = 0;
|
|
51
|
+
for (let i = 0; i < nbeLignesPad; i++) {
|
|
52
|
+
const rowLabel = document.createElement("a");
|
|
53
|
+
rowLabel.className = "texteSon";
|
|
54
|
+
rowLabel.innerHTML = i;
|
|
55
|
+
place.appendChild(rowLabel);
|
|
56
|
+
|
|
57
|
+
for (let j = 0; j < nbeColonesPad; j++) {
|
|
58
|
+
const button = document.createElement("button");
|
|
59
|
+
button.id = `padBouton${compteurBouton++}`;
|
|
60
|
+
button.dataset.ligne = i;
|
|
61
|
+
button.dataset.colone = j;
|
|
62
|
+
button.className = COLORS.DEFAULT;
|
|
63
|
+
button.addEventListener("click", () => clickPadBouton(button.id));
|
|
64
|
+
place.appendChild(button);
|
|
65
|
+
}
|
|
66
|
+
place.appendChild(document.createElement("br"));
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// Etat des scrutateurs
|
|
70
|
+
etatScrutateurs = Array(nbeColonesPad).fill(0);
|
|
71
|
+
const scrutHeader = document.createElement("a");
|
|
72
|
+
scrutHeader.className = "texteSon";
|
|
73
|
+
scrutHeader.innerHTML = "-";
|
|
74
|
+
place.appendChild(scrutHeader);
|
|
75
|
+
|
|
76
|
+
for (let j = 0; j < nbeColonesPad; j++) {
|
|
77
|
+
const button = document.createElement("button");
|
|
78
|
+
button.className = "etatScrut";
|
|
79
|
+
button.id = `etatScrut${j}`;
|
|
80
|
+
button.innerHTML = "-";
|
|
81
|
+
place.appendChild(button);
|
|
82
|
+
}
|
|
83
|
+
place.appendChild(document.createElement("br"));
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
function setPadButton(son, groupe, status) {
|
|
87
|
+
if (groupe === 255) {
|
|
88
|
+
let id = parseInt(son);
|
|
89
|
+
for (let j = 0; j < nbeLignesPad; j++) {
|
|
90
|
+
const button = document.getElementById(`padBouton${id}`);
|
|
91
|
+
if (!button) return console.error("ERR setAllPad: bouton undefined", id);
|
|
92
|
+
button.className = status ? COLORS.BLEU : COLORS.DEFAULT;
|
|
93
|
+
id += nbeColonesPad;
|
|
94
|
+
}
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
if (groupe >= par.nbeDeGroupesClients || son >= nbeColonesPad) {
|
|
99
|
+
return console.error("ERR: setPadButton out of bounds", { son, groupe });
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
const index = parseInt(son) + groupe * nbeColonesPad;
|
|
103
|
+
const button = document.getElementById(`padBouton${index}`);
|
|
104
|
+
if (button) {
|
|
105
|
+
button.className = status ? COLORS.BLEU : COLORS.DEFAULT;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
function clickColoneBouton(colone) {
|
|
110
|
+
let id = parseInt(colone);
|
|
111
|
+
let status;
|
|
112
|
+
|
|
113
|
+
for (let j = 0; j < nbeLignesPad; j++) {
|
|
114
|
+
const button = document.getElementById(`padBouton${id}`);
|
|
115
|
+
if (!button) return console.error("ERR clickColoneBouton: bouton undefined", id);
|
|
116
|
+
|
|
117
|
+
const isActive = button.className === COLORS.BLEU;
|
|
118
|
+
status = !isActive;
|
|
119
|
+
button.className = status ? COLORS.BLEU : COLORS.DEFAULT;
|
|
120
|
+
|
|
121
|
+
ws.send(JSON.stringify({
|
|
122
|
+
type: "putInMatriceDesPossibles",
|
|
123
|
+
clients: j,
|
|
124
|
+
sons: colone,
|
|
125
|
+
status
|
|
126
|
+
}));
|
|
127
|
+
id += nbeColonesPad;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
window.clickColoneBouton = clickColoneBouton;
|
|
131
|
+
|
|
132
|
+
function clickPadBouton(padBoutonId) {
|
|
133
|
+
const button = document.getElementById(padBoutonId);
|
|
134
|
+
const isActive = button.className === COLORS.BLEU;
|
|
135
|
+
const status = !isActive;
|
|
136
|
+
button.className = status ? COLORS.BLEU : COLORS.DEFAULT;
|
|
137
|
+
|
|
138
|
+
ws.send(JSON.stringify({
|
|
139
|
+
type: "putInMatriceDesPossibles",
|
|
140
|
+
clients: button.dataset.ligne,
|
|
141
|
+
sons: button.dataset.colone,
|
|
142
|
+
status
|
|
143
|
+
}));
|
|
144
|
+
}
|
|
145
|
+
exports.clickPadBouton = clickPadBouton;
|
|
146
|
+
|
|
147
|
+
function updateAllPad(status) {
|
|
148
|
+
if (!automateEncours) return alert("WARNING: Nothing to update");
|
|
149
|
+
|
|
150
|
+
let id = 0;
|
|
151
|
+
for (let j = 0; j < nbeLignesPad; j++) {
|
|
152
|
+
for (let i = 0; i < nbeColonesPad; i++) {
|
|
153
|
+
const button = document.getElementById(`padBouton${id++}`);
|
|
154
|
+
if (!button) return console.error("updateAllPad: undefined button", id);
|
|
155
|
+
button.className = status ? COLORS.BLEU : COLORS.DEFAULT;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
ws.send(JSON.stringify({
|
|
160
|
+
type: status ? "setAllMatriceDesPossibles" : "ResetMatriceDesPossibles",
|
|
161
|
+
}));
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
window.resetAllPad = () => updateAllPad(false);
|
|
165
|
+
window.setAllPad = () => updateAllPad(true);
|
|
166
|
+
|
|
167
|
+
function cleanQueues() {
|
|
168
|
+
ws.send(JSON.stringify({ type: "cleanQueues" }));
|
|
169
|
+
}
|
|
170
|
+
window.cleanQueues = cleanQueues;
|
|
171
|
+
|
|
172
|
+
function getNbeDeSpectateurs() {
|
|
173
|
+
ws.send(JSON.stringify({ type: "getGroupesClientLength" }));
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
function initialisation() {
|
|
177
|
+
document.getElementById("MessageDuServeur").style.display = "inline";
|
|
178
|
+
document.getElementById("listBoutonsLiens").style.display = "block";
|
|
179
|
+
initServerListener();
|
|
180
|
+
setInterval(getNbeDeSpectateurs, 1000);
|
|
181
|
+
}
|
|
182
|
+
exports.initialisation = initialisation;
|
|
183
|
+
|
|
184
|
+
function initControleur(serverHostname) {
|
|
185
|
+
initWSSocket(serverHostname);
|
|
186
|
+
initialisation();
|
|
187
|
+
}
|
|
188
|
+
window.initControleur = initControleur;
|
|
189
|
+
|
|
190
|
+
window.onbeforeunload = () => {
|
|
191
|
+
msg.type = "closeSpectateur";
|
|
192
|
+
msg.text = "DISCONNECT_SPECTATEUR";
|
|
193
|
+
ws.send(JSON.stringify(msg));
|
|
194
|
+
ws.close();
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
window.checkSession = () => {
|
|
198
|
+
msg.type = "checkSession";
|
|
199
|
+
ws.send(JSON.stringify(msg));
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
function initWSSocket(host) {
|
|
203
|
+
ws = new WebSocket(`ws://${host}:${ipConfig.websocketServeurPort}`);
|
|
204
|
+
|
|
205
|
+
if (debug1) console.log("WebSocket initialized at", host);
|
|
206
|
+
|
|
207
|
+
ws.onopen = () => {
|
|
208
|
+
ws.send(JSON.stringify({ type: "startSpectateur", text: "controleur", id }));
|
|
209
|
+
};
|
|
210
|
+
|
|
211
|
+
ws.onmessage = ({ data }) => {
|
|
212
|
+
const msgRecu = JSON.parse(data);
|
|
213
|
+
if (debug) console.log("WS Message Received:", msgRecu);
|
|
214
|
+
|
|
215
|
+
switch (msgRecu.type) {
|
|
216
|
+
case "DAWTableNotReady":
|
|
217
|
+
alert(msgRecu.text);
|
|
218
|
+
document.getElementById("buttonStartAutomate").style.display = "inline";
|
|
219
|
+
document.getElementById("buttonStopAutomate").style.display = "none";
|
|
220
|
+
break;
|
|
221
|
+
|
|
222
|
+
case "etatDeLaFileAttente":
|
|
223
|
+
const texte = msgRecu.value?.map((v, i) => v.length ? `[${i}:${v[1]}]` : " ").join(" ") || " ";
|
|
224
|
+
document.getElementById("FileAttente").innerHTML = texte;
|
|
225
|
+
break;
|
|
226
|
+
|
|
227
|
+
case "groupesClientLength":
|
|
228
|
+
document.getElementById("tailleDesGroupes").innerHTML = msgRecu.longueurs.map(n => `[${n}]`).join("");
|
|
229
|
+
break;
|
|
230
|
+
|
|
231
|
+
case "sessionLoaded":
|
|
232
|
+
document.getElementById("MessageDuServeur").innerHTML = `Session loaded: ${msgRecu.fileName}`;
|
|
233
|
+
break;
|
|
234
|
+
|
|
235
|
+
case "message":
|
|
236
|
+
if (debug) console.log(msgRecu.text);
|
|
237
|
+
break;
|
|
238
|
+
|
|
239
|
+
case "resetMatriceDesPossibles":
|
|
240
|
+
updateAllPad(false);
|
|
241
|
+
break;
|
|
242
|
+
|
|
243
|
+
case "setInMatrix":
|
|
244
|
+
setPadButton(msgRecu.son, msgRecu.groupe, msgRecu.status);
|
|
245
|
+
break;
|
|
246
|
+
|
|
247
|
+
case "setControlerPadSize":
|
|
248
|
+
nbeLignesPad = msgRecu.nbeDeGroupesClients;
|
|
249
|
+
nbeColonesPad = msgRecu.nbeDeGroupesSons + 1;
|
|
250
|
+
creationPad();
|
|
251
|
+
break;
|
|
252
|
+
|
|
253
|
+
case "setTickAutomate":
|
|
254
|
+
document.getElementById("MessageDuServeur").innerHTML = `Tick: ${msgRecu.tick}`;
|
|
255
|
+
break;
|
|
256
|
+
|
|
257
|
+
case "skiniParametres":
|
|
258
|
+
par = msgRecu.value;
|
|
259
|
+
break;
|
|
260
|
+
|
|
261
|
+
case "synchroSkini":
|
|
262
|
+
const synchro = document.getElementById('synchro');
|
|
263
|
+
synchro.style.display = (synchro.style.display === "none") ? "inline" : "none";
|
|
264
|
+
break;
|
|
265
|
+
|
|
266
|
+
default:
|
|
267
|
+
if (debug1) console.log("Unrecognized message", msgRecu);
|
|
268
|
+
}
|
|
269
|
+
};
|
|
270
|
+
|
|
271
|
+
ws.onerror = (event) => {
|
|
272
|
+
if (debug) console.log("WebSocket error:", event);
|
|
273
|
+
};
|
|
274
|
+
|
|
275
|
+
ws.onclose = () => {
|
|
276
|
+
if (debug1) console.log("WebSocket closed");
|
|
277
|
+
};
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
function initServerListener() {
|
|
281
|
+
// Placeholder for potential future server event listeners
|
|
282
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
<html>
|
|
2
|
+
<head>
|
|
3
|
+
<link rel="stylesheet" type="text/css" href="./client/controleur/stylecontroleur.css">
|
|
4
|
+
<meta charset="UTF-8" name="viewport"
|
|
5
|
+
content="width=device-width, height=device-height, shrink-to-fit=yes, intial-scale=1" />
|
|
6
|
+
<script type='text/javascript' src='./client/controleur/controleurbundle.js'></script>
|
|
7
|
+
</head>
|
|
8
|
+
|
|
9
|
+
<body onload="initControleur(window.location.hostname);">
|
|
10
|
+
<div class="wrapper">
|
|
11
|
+
<div id="listBoutonsLiens" class="listBoutonsPad" style="display:none"></div>
|
|
12
|
+
</div>
|
|
13
|
+
<div class="boutonsCommande">
|
|
14
|
+
<button id="buttonAll" class="button" onclick="setAllPad();">ALL</button>
|
|
15
|
+
<button id="buttonReset" class="button" onclick="resetAllPad()">RESET</button>
|
|
16
|
+
<button id="buttonReset" class="button" onclick="cleanQueues();">CLEANQ</button>
|
|
17
|
+
<!-- <button id="buttonLoadDAW" class="button" onclick="loadDAW(1);">ORCH</button> -->
|
|
18
|
+
<!--
|
|
19
|
+
<button id="buttonLoadDAW2" class="button" onclick="loadDAW(2);">ORCH2</button>
|
|
20
|
+
<button id="buttonLoadDAW3" class="button" onclick="loadDAW(3);">ORCH3</button>
|
|
21
|
+
-->
|
|
22
|
+
<!-- <button id="buttonStopAutomate" class="button buttonStopAutomate" style="display:none" onclick="stopAutomate();">AUT
|
|
23
|
+
OFF</button>
|
|
24
|
+
<button id="buttonStartAutomate" class="button buttonStartAutomate" onclick="startAutomate();">AUT ON</button> -->
|
|
25
|
+
<!--
|
|
26
|
+
<button id="buttonResetSequenceur" class="button button1" onclick="resetSequenceur();">RAZ SEQ</button>
|
|
27
|
+
-->
|
|
28
|
+
<button id="buttonLoadSession" class="button" onclick="checkSession();">CHECK</button>
|
|
29
|
+
<input id="buttonClose" class="button button2" type="button" value="CLOSE" onclick="self.close();">
|
|
30
|
+
|
|
31
|
+
</div>
|
|
32
|
+
|
|
33
|
+
<div class="info-spectateur">
|
|
34
|
+
<em class="info-spectateur">Groupes:</em>
|
|
35
|
+
<span id="tailleDesGroupes"></span>
|
|
36
|
+
</div>
|
|
37
|
+
|
|
38
|
+
<div class="info-spectateur" style="display:none">
|
|
39
|
+
<em class="info-spectateur">Scrutateurs:</em>
|
|
40
|
+
<span id="propositionScrutateur"></span>
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
<div class="info-spectateur">
|
|
44
|
+
<em class="info-spectateur">FIFO:</em>
|
|
45
|
+
<span id="FileAttente"></span>
|
|
46
|
+
</div>
|
|
47
|
+
<div class="info-spectateur"><span id="MessageDuServeur"></span></div>
|
|
48
|
+
<i class="info-spectateur" id="synchro">@</i>
|
|
49
|
+
</body>
|
|
50
|
+
|
|
51
|
+
</html>
|