web seeking

This patch adds the ability to seek forwards or backwards in a song
through the web controls.
This commit is contained in:
Bryan Schumaker 2010-12-27 22:07:24 -05:00
parent 2eb16793ca
commit c17126553f
5 changed files with 20 additions and 0 deletions

View File

@ -75,6 +75,9 @@ function stop2()
<td><img id="button" src="images/play.png" onclick="play2();" /></td>
<td><img src="images/stop.png" onclick="stop2();" /></td>
<td><img src="images/next.png" onclick="next();" /></td>
</tr><tr>
<td><img src="images/rewind.png" onclick="rewind();" /></td>
<td><img src="images/forward.png" onclick="forward();" /></td>
</tr></table>
</body>

10
html/controls.js vendored
View File

@ -24,3 +24,13 @@ function next()
{
control("next");
}
function forward()
{
control("forward");
}
function rewind()
{
control("rewind");
}

View File

@ -11,7 +11,10 @@ pause = controls.pause
stop = controls.stop
next = controls.next
attrs = libsaria.sources.get_attrs
playing = controls.playing
forward = controls.seek_forward
rewind = controls.seek_backward
def to_html(wfile, args):
action = args["a"]
@ -24,6 +27,10 @@ def to_html(wfile, args):
ret = stop()
elif action == "next":
ret = next()
elif action == "forward":
ret = forward()
elif action == "rewind":
ret = rewind()
elif action == "version":
ret = ocarina.__vers__
elif action == "uptime":

BIN
html/images/forward.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
html/images/rewind.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB