From dbbae1ec7b24da7ec9bbad0f789fd57e1cb751e8 Mon Sep 17 00:00:00 2001 From: BlueFox Date: Tue, 26 Mar 2024 10:53:24 +0100 Subject: [PATCH] Added simpledemo; needs to be refactored as it's just copied from the C source of the NetSpeaker project; from https://git.privacynerd.de/NetSpeaker/NetSpeaker/src/commit/bedbc33f48ff28fd2e7ca4a408081b384cfcb612 --- simpledemo.html | 327 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 327 insertions(+) create mode 100644 simpledemo.html diff --git a/simpledemo.html b/simpledemo.html new file mode 100644 index 0000000..efc17dd --- /dev/null +++ b/simpledemo.html @@ -0,0 +1,327 @@ + String html = ""; + html += ""; + html += ""; + html += "Web UI | " + version + ""; + html += ""; + html += ""; + html += ""; + html += "
"; + + html += "

Welcome to

"; + html += "

" + configuration.getString(PREFERENCES_KEY_FRIENDLY_NAME, "NetSpeaker") + "

"; + html += "

" + version + "

"; + + html += "
"; + + // informations accordion + html += "
"; + html += "
"; + html += "

"; + html += " "; + html += "

"; + html += "
"; + html += "
"; + html += " "; + html += " "; + html += " "; + html += " "; + html += " "; + html += " "; + html += " "; + html += " "; + html += " "; + html += " "; + html += " "; + html += " "; + html += " "; + html += " "; + html += " "; + html += " "; + html += " "; + html += " "; + html += " "; + html += " "; + html += " "; + html += " "; + html += " "; + html += " "; + html += " "; + html += " "; + html += " "; + html += " "; + html += " "; + html += " "; + html += " "; + html += " "; + html += " "; + html += " "; + html += " "; + html += " "; + html += " "; + html += " "; + html += " "; + html += " "; + html += " "; + html += " "; + html += " "; + html += " "; + html += " "; + html += " "; + html += " "; + html += " "; + html += " "; + html += " "; + html += " "; + html += "
Playing"; + html += audioPlaying ? "yes" : "no"; + html += "
Volume" + String(currentVolume) + "/" + String(maxVolume) + "%
Muted"; + html += muted ? "yes" : "no"; + html += "
Equalizer Low" + String(eqLow) + "dB
Equalizer Mid" + String(eqMid) + "dB
Equalizer High" + String(eqHigh) + "dB
Balance (range -16 | +16)" + String(balanceLevel) + "
Path to playlist" + currentPlaylist + "
Index in playlist (starting from 0)" + String(currentPlaylistPosition) + "
Resource path" + pbInfo.resourcePath + "
Resource type" + pbInfo.type + "
Resource title" + pbInfo.title + "
Resource album" + pbInfo.album + "
Resource artist" + pbInfo.artist + "
Resource track number" + pbInfo.track + "
Resource year" + pbInfo.year + "
Resource genre" + pbInfo.genre + "
"; + html += "
"; + html += "
"; + html += "
"; + html += "
"; + html += "

"; + html += " "; + html += "

"; + html += "
"; + html += "
"; + html += " "; + html += " "; + html += " "; + html += " "; + html += " "; + html += " "; + html += " "; + html += " "; + html += " "; + html += " "; + html += " "; + html += " "; + html += " "; + html += " "; + html += " "; + html += "
Version" + version + "
Friendly name" + configuration.getString(PREFERENCES_KEY_FRIENDLY_NAME, "") + "
Save & Restore state"; + html += configuration.getBool(PREFERENCES_KEY_RESTORE_OLD_STATE, false) ? "yes" : "no"; + html += "
Save & Restore playing state (default no)"; + html += configuration.getBool(PREFERENCES_KEY_RESTORE_PLAYING, false) ? "yes" : "no"; + html += "
WiFi SSID" + configuration.getString(PREFERENCES_KEY_WIFI_SSID, "") + "
"; + html += "
"; + html += "
"; + html += "
"; + html += "
"; + + html += "
"; + + /* ---------------------------- + -- API FUNCTIONS ACCODRION -- + ---------------------------- */ + html += "
"; + // PLAYBACK Collapsible + html += "
"; + html += "

"; + html += " "; + html += "

"; + html += "
"; + html += "
"; + html += " "; + html += " "; + html += " "; + html += " "; + html += " "; + html += " "; + html += " "; + html += " "; + html += " "; + html += "
Playing"; + html += audioPlaying ? "yes" : "no"; + html += "
Volume" + String(currentVolume) + "/" + String(maxVolume) + "%
Muted"; + html += muted ? "yes" : "no"; + html += "
"; + html += "
"; + html += " "; + html += " "; + html += " "; + html += " "; + html += "
"; + html += "


"; + html += " "; + html += " "; + html += "
"; + html += "
"; + html += "
"; + + // PLAYLIST Collapsible + html += "
"; + html += "

"; + html += " "; + html += "

"; + html += "
"; + html += "
"; + html += " Work in progress"; + html += "
"; + html += "
"; + html += "
"; + + // BALANCE Collapsible + html += "
"; + html += "

"; + html += " "; + html += "

"; + html += "
"; + html += "
"; + html += "

The Audio library used maps -16 to most right and 16 to most left. Don't be confused by the appearently wrong direction the slider moves the balance to right and left.

"; + html += " "; + html += " "; + html += " "; + html += "
Balance (range -16 | +16)" + String(balanceLevel) + "
"; + html += "

"; + html += " "; + html += "
"; + html += "
"; + html += "
"; + + // EQUALIZER Collapsible + html += "
"; + html += "

"; + html += " "; + html += "

"; + html += "
"; + html += "
"; + html += " "; + html += " "; + html += " "; + html += " "; + html += " "; + html += " "; + html += " "; + html += " "; + html += " "; + html += "
Equalizer Low (-40dB to 6dB)" + String(eqLow) + "dB
Equalizer Mid (-40dB to 6dB)" + String(eqMid) + "dB
Equalizer High (-40dB to 6dB)" + String(eqHigh) + "dB
"; + html += "

"; + html += " "; + html += "


"; + html += " "; + html += "


"; + html += " "; + html += "
"; + html += "
"; + html += "
"; + + // FRIENDLY NAME Collapsible + html += "
"; + html += "

"; + html += " "; + html += "

"; + html += "
"; + html += "
"; + html += " Work in progress"; + html += "
"; + html += "
"; + html += "
"; + + // WiFi CONFIGURATION Collapsible + html += "
"; + html += "

"; + html += " "; + html += "

"; + html += "
"; + html += "
"; + html += " Work in progress"; + html += "
"; + html += "
"; + html += "
"; + + // SAVE AND RESTORE Collapsible + html += "
"; + html += "

"; + html += " "; + html += "

"; + html += "
"; + html += "
"; + html += " Work in progress"; + html += "
"; + html += "
"; + html += "
"; + + // RESTART Collapsible + html += "
"; + html += "

"; + html += " "; + html += "

"; + html += "
"; + html += "
"; + html += " "; + html += "
"; + html += "
"; + html += "
"; + + html += "
"; + html += ""; + html += ""; +