diff --git a/simpledemo.html b/simpledemo.html index efc17dd..799b90d 100644 --- a/simpledemo.html +++ b/simpledemo.html @@ -1,327 +1,548 @@ - String html = ""; - html += ""; - html += ""; - html += "Web UI | " + version + ""; - html += ""; - html += ""; - html += ""; - html += "
"; + + + + + + API Demo (on [IP here]) + + + + +
- html += "

Welcome to

"; - html += "

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

"; - html += "

" + version + "

"; +

Welcome to

+

[FRIENDLY NAME HERE]

+

[VERSION STRING HERE]

- 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 += "
"; + +
+
+

+ +

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Playing + [html += audioPlaying ? "yes" : "no"] +
Volume[" + String(currentVolume) + "/" + String(maxVolume) + "]
Muted + [html += muted ? "yes" : "no"] +
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 + "
Resource language (for TTS)" + pbInfo.tts_language + "
+
+
+
+
+

+ +

+
+
+ + + + + + + + + + + + + + + + + + + + + + + +
Version" + version + "
Friendly name" + configuration.getString(PREFERENCES_KEY_FRIENDLY_NAME, " + ") + " +
Save & Restore state + html += configuration.getBool(PREFERENCES_KEY_RESTORE_OLD_STATE, false) ? "yes" : "no +
Save & Restore playing state (default no) + html += configuration.getBool(PREFERENCES_KEY_RESTORE_PLAYING, false) ? "yes" : "no +
WiFi SSID" + configuration.getString(PREFERENCES_KEY_WIFI_SSID, "") + "
+
+
+
+
- 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 += "
"; + + + +
+ +
+

+ +

+
+
+ + + + + + + + + + + + + + + +
Playing + html += audioPlaying ? "yes" : "no +
Volume" + String(currentVolume) + "/" + String(maxVolume) + "% +
Muted + html += muted ? "yes" : "no +
+
+
+ + + + +
+
+
+
+ + +
+
+
- // 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 += "
"; + +
+

+ +

+
+
+ +

Demo for playing a specific playlist on the SD card over the API.

+
+ + "; - 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 += "
"; + +
+

+ +

+
+
+

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.

+ + + + + + + +
Balance (range -16 | +16)" + String(balanceLevel) + "
+
+
+ + +
+
+
- // FRIENDLY NAME Collapsible - html += "
"; - html += "

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

"; - html += "
"; - html += "
"; - html += " Work in progress"; - 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
+
+
+ + +
+
+
+ +
+
+
+ +
+
+
- // WiFi CONFIGURATION Collapsible - html += "
"; - html += "

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

"; - html += "
"; - html += "
"; - html += " Work in progress"; - html += "
"; - html += "
"; - html += "
"; + +
+

+ +

+
+
+
+ " + configuration.getString(PREFERENCES_KEY_FRIENDLY_NAME) + " + -> + + +
+
+
+
- // SAVE AND RESTORE Collapsible - html += "
"; - html += "

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

"; - html += "
"; - html += "
"; - html += " Work in progress"; - html += "
"; - html += "
"; - html += "
"; + +
+

+ +

+
+
+

Demo for changing the wifi SSID and PSK (= Pre-Shared Key; well-known as 'Password' or 'Key'). There's no need to + give both - if you just wanna change the password - do it!

+

After doing this, you have to go down to the restart collapsible. There, restart the NetSpeaker and it should connect + to the configured WiFi.

+

If anything is wrong (either SSID or PSK wrong/typo, or the wifi's not available), the NetSpeaker opens an HotSpot + with the SSID " + apSSID + " and the PSK " + apPSK + "!

+
+ SSID + + PSK + + "; - html += " "; - html += "
"; - html += "
"; - html += " "; - html += "
"; - html += "
"; - html += "
"; + +
+

+ +

+
+
+

Restoring the old/last state can be toggeled on or off over the API. Doing so can have many reasons, one could be + that you wanted to build a device always playing some startup sound, or so.

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

+ +

+
+
+ +
+
+
+
+ + + +
+ + + + \ No newline at end of file