OAVp5.hints#
variableoav-p5OAVp5.hints
The list of cards oav-p5 has shown or would have shown so far (a blocked microphone, no Web MIDI, an error in your callback), each with what, why and what to press.
Each situation is said once per page. The list holds them all, including the ones the page did not show because hints=off is set, so it is the place to look when a sketch does something odd and nothing is on screen: console.log(OAVp5.hints).
- Type
Array<Object>
Starts empty and only grows. Each item is { id, kind, what, why, next }: id names the situation ('micDenied', 'chopOut:lag'), kind is 'error', 'warn' or 'info', and what, why, next are the three lines of the card in the browser's language.
Notes
- A card that went away because the situation ended (the microphone came on) stays in the list.
Examples
function setup() {
createCanvas(400, 300);
lag(1); // an unnamed lag() outside draw(): oav-p5 has something to say
}
function draw() {
background(20);
fill(255);
text(OAVp5.hints.length + ' card(s) so far', 20, 30);
text(OAVp5.hints.map((h) => h.kind + ': ' + h.what).join('\n'), 20, 60);
}Related
hintsWhether oav-p5 shows its explaining cards beside the 🎹 (blocked microphone, no Web MIDI, an error in your callback):onoroff.OAVp5.check()Runs the 🩺 check-up: the version, page, browser, microphone, MIDI, sound, drums, recording, wiring and hints, as a card to screenshot and as an object.debugPrints[oav-p5 debug]lines in the console about clicks, the 🎹 button and loading, for finding out why the 🎹 does not respond.