Skip to content

Commit d95cb89

Browse files
author
maurinElectroTextile
committed
BUGFIX : permissionStatus.state
1 parent a88e86c commit d95cb89

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

docs/js/e256_config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const PROJECT = "ETEXTILE-SYNTH";
88
const NAME = "MAPPING-APP";
99
const VERSION = "1.0.24";
1010

11-
const DEBUG = true;
11+
const DEBUG = true; ///////////////////////////////
1212

1313
var current_controleur = { "id": null };
1414
var previous_controleur = { "id": null };

docs/js/e256_midi_io.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,11 @@ function midi_msg_builder(midi_msg_type) {
179179

180180
async function MIDIsetup() {
181181
navigator.permissions.query({name: "midi"}).then((permissionStatus) => {
182-
if (permissionStatus.state === "granted") {
182+
//console.log(permissionStatus.state);
183+
if (permissionStatus.state === "prompt") {
183184
navigator.requestMIDIAccess({ sysex: true }).then(onMIDISuccess);
184185
}
185-
if (permissionStatus.state === "prompt") {
186+
if (permissionStatus.state === "denied") {
186187
alert_msg("no_midi_support", "This browser does not support MIDI!", "danger");
187188
}
188189
});
@@ -287,7 +288,7 @@ function onMIDIMessage(midiMsg) {
287288
case P_CHANGE:
288289
switch (status.channel) {
289290
case MIDI_VERBOSITY_CHANNEL:
290-
//console.log("RECEIVED: " + VERBOSITY_CODES[msg.data1]);
291+
console.log("RECEIVED: " + VERBOSITY_CODES[msg.data1]);
291292
switch (msg.data1) {
292293

293294
case MATRIX_RAW_MODE_DONE:

0 commit comments

Comments
 (0)