Commit da9e9a60 authored by Akash Mehrotra's avatar Akash Mehrotra Committed by Rémi Denis-Courmont

Added Force pause, force resume Updated pl_pause to behave as in oldhttp

Signed-off-by: default avatarRémi Denis-Courmont <remi@remlab.net>
parent cbad172f
......@@ -26,9 +26,15 @@ status.xml:
> play playlist item <id>. If <id> is omitted, play last active item:
?command=pl_play&id=<id>
> toggle pause. If current state was 'stop', play item <id>:
> toggle pause. If current state was 'stop', play item <id>, if no <id> specified, play current item. If no current item, play 1st item in the playlist:
?command=pl_pause&id=<id>
> resume playback if paused, else do nothing
?command=pl_forceresume
> pause playback, do nothing if already paused
?command=pl_forcepause
> stop playback:
?command=pl_stop
......
......@@ -59,7 +59,23 @@ elseif command == "pl_play" then
vlc.playlist.goto(id)
end
elseif command == "pl_pause" then
vlc.playlist.pause()
if vlc.playlist.status() == "stopped" then
if id == -1 then
vlc.playlist.play()
else
vlc.playlist.goto(id)
end
else
vlc.playlist.pause()
end
elseif command == "pl_forcepause" then
if vlc.playlist.status() == "playing" then
vlc.playlist.pause()
end
elseif command == "pl_forceresume" then
if vlc.playlist.status() == "paused" then
vlc.playlist.pause()
end
elseif command == "pl_stop" then
vlc.playlist.stop()
elseif command == "pl_next" then
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment