web seeking
This patch adds the ability to seek forwards or backwards in a song through the web controls.
This commit is contained in:
parent
2eb16793ca
commit
c17126553f
|
@ -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>
|
||||
|
|
|
@ -24,3 +24,13 @@ function next()
|
|||
{
|
||||
control("next");
|
||||
}
|
||||
|
||||
function forward()
|
||||
{
|
||||
control("forward");
|
||||
}
|
||||
|
||||
function rewind()
|
||||
{
|
||||
control("rewind");
|
||||
}
|
||||
|
|
|
@ -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":
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 1.7 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.7 KiB |
Loading…
Reference in New Issue