summaryrefslogtreecommitdiff
path: root/static/audio.js
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2011-08-08 00:11:01 +0200
committerJon Bergli Heier <snakebite@jvnv.net>2011-08-08 00:11:01 +0200
commit97d7c9014855449fe04162308feac66a35e007ea (patch)
tree8133c59cb0f066d992f434109818dd771e73f544 /static/audio.js
Initial commit.
app.py - WSGI application and handlers. config.py - Config helper class. directory.py - Directory and file helper classes. events.py - zeromq event publisher and subscriber. recode.py - Codecs and stuff static/ - Web interface
Diffstat (limited to 'static/audio.js')
-rw-r--r--static/audio.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/static/audio.js b/static/audio.js
new file mode 100644
index 0000000..6eaec56
--- /dev/null
+++ b/static/audio.js
@@ -0,0 +1,19 @@
+function Audio() {
+ this.audio = document.getElementById('audio');
+
+ this.set_src = function(src) {
+ this.audio.setAttribute('src', src);
+ }
+
+ this.play = function() {
+ this.audio.play();
+ }
+
+ this.pause = function() {
+ this.audio.pause();
+ }
+
+ this.stop = function() {
+ this.audio.stop();
+ }
+}