From 18ad758ccbc0e5aca14302be335015455a0b5372 Mon Sep 17 00:00:00 2001 From: Marak Date: Sun, 17 Apr 2022 12:37:19 -0400 Subject: [PATCH] Adds guard if `navigator.requestMIDIAccess` missing #74 --- ReadMe.md | 2 +- TODO.txt | 11 +++++++++++ desktop/apps/EASTER-EGG.txt | 2 ++ desktop/apps/desktop.midi/desktop.midi.js | 7 ++++++- 4 files changed, 20 insertions(+), 2 deletions(-) diff --git a/ReadMe.md b/ReadMe.md index 9a51c1a..e7d3a81 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -41,7 +41,7 @@ Once you've loaded Buddy Pond you can type the following commands to get help: Type `/help` in any chat window to get help. -**BuddyScript Commands** +**`BuddyScript` Commands** Type `/bs` in any chat window to see `BuddyScript` commands. diff --git a/TODO.txt b/TODO.txt index 3dc5634..c9e2d49 100644 --- a/TODO.txt +++ b/TODO.txt @@ -2,10 +2,21 @@ For contributions, please first see: https://github.com/Marak/buddypond/issues We have many issues open and welcomed for first time contributors! +- add merlin welcome message ( server-side ) +- port dicey to server + +- add mission impossible music to minesweeper + - add console can send /bs without login - ability to set globe and maps as wallpaper? - ability to set any app as wallpaper? +- add super mario bros sound fx and gif when you get GBP +- add anonymous geo location in message ( same permissions as flag? ) + +- paint loses context / has bug with disabled send after local save +- paint and sound recorder and mirror apps should have drop down select for context output + BuddyScript v1 X - enable /paint, \paint style commands ( easiest to type and remember ) diff --git a/desktop/apps/EASTER-EGG.txt b/desktop/apps/EASTER-EGG.txt index 8233ec1..9b90a80 100644 --- a/desktop/apps/EASTER-EGG.txt +++ b/desktop/apps/EASTER-EGG.txt @@ -67,6 +67,7 @@ Ideas for community apps: - MIDI Controller - https://medium.com/swinginc/playing-with-midi-in-javascript-b6999f2913c3 - https://developer.mozilla.org/en-US/docs/Web/API/MIDIAccess + - https://medium.com/@keybaudio/virtual-midi-devices-on-macos-a45cdbdffdaf - Sound FX Board - Use midi fighter button pad with sound fx @@ -87,3 +88,4 @@ Ideas for community apps: + diff --git a/desktop/apps/desktop.midi/desktop.midi.js b/desktop/apps/desktop.midi/desktop.midi.js index 413fecd..fcc04de 100644 --- a/desktop/apps/desktop.midi/desktop.midi.js +++ b/desktop/apps/desktop.midi/desktop.midi.js @@ -20,7 +20,11 @@ desktop.app.midi.load = function loadmidiGames (params, next) { function init() { logText("Initializing MIDI..."); - navigator.requestMIDIAccess().then( onSuccess, onFailure ); //get midi access + if (!navigator.requestMIDIAccess) { + alert('Could not connect to Web MIDI API.\nTry Opera or Chrome?\n') + } else { + navigator.requestMIDIAccess().then( onSuccess, onFailure ); //get midi access + } } function onSuccess( access ) { @@ -41,6 +45,7 @@ desktop.app.midi.load = function loadmidiGames (params, next) { function onFailure( err ) { logText("MIDI Init Error. Error code: " + err.code); + alert('Web MIDI Initialization error. Please see console logs.') } function handleMIDIMessage(event){