summaryrefslogtreecommitdiff
path: root/static/audio.js
diff options
context:
space:
mode:
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();
+ }
+}