This commit is contained in:
Erhard 2017-08-04 14:26:45 +02:00
commit 6408ca40e4
2 changed files with 30 additions and 1 deletions

View File

@ -59,3 +59,28 @@ Production
For production deployment Apache (or other webservers like nginx, lighttpd etc.) should be used.
For Apache a sample configuration is provided in the folder `apache` which can be adapted.
Please keep in mind that you may have to adjust the path to the sound files in your apache config in order to enable local playback on the clients.
Usage
=====
Users can browse the webinterface, search for sounds and play them on the remote server or their local browser.
Additionally to the normal point and click usage there are also several keyboard shortcuts available.
Keyboard shortcuts
------------------
- Navigation items, input fields and sound buttons can be selected by using tab and shift+tab
- esc clears the search field
- enter plays the selected sound
- ctrl+k and ctrl+c kill all sounds
- ctrl+x switches between local and remote playback
- ctrl+enter kills sounds before the selected gets played
Live version
============
A list of sound requests and already added sounds can be found here: https://pad.wiai.de/p/soundboardTodos

View File

@ -1,7 +1,7 @@
import os
import subprocess
from flask import Flask, render_template, request, redirect, url_for
from flask import Flask, render_template, request, redirect, url_for, send_from_directory
import config
@ -49,3 +49,7 @@ def index(sound=None, text=None, video=None):
subprocess.Popen(["pkill", "-f", "omxplayer"])
return render_template("index.html", sounds=sounds)
@app.route("/sounds/<path:name>")
def sounds(name):
return send_from_directory(config.path, name)