update resources/syncplay.lua - fixed play/pause
This commit is contained in:
parent
1a3b56c140
commit
1fc34a088a
@ -24,7 +24,7 @@ local notimplemented = "not-implemented"
|
|||||||
local unknowncommand = "unknown-command"
|
local unknowncommand = "unknown-command"
|
||||||
|
|
||||||
function get_args (argument, argcount)
|
function get_args (argument, argcount)
|
||||||
local argarray = {}
|
local argarray = {}
|
||||||
local index
|
local index
|
||||||
local i
|
local i
|
||||||
local argbuffer
|
local argbuffer
|
||||||
@ -188,11 +188,12 @@ end
|
|||||||
|
|
||||||
function playfile()
|
function playfile()
|
||||||
local errormsg
|
local errormsg
|
||||||
|
local input = vlc.object.input()
|
||||||
if input then
|
local playstate
|
||||||
common.hotkey("key-pause")
|
playstate, errormsg = get_play_state()
|
||||||
else
|
|
||||||
errormsg = noinput
|
if playstate == "paused" then
|
||||||
|
vlc.playlist.pause()
|
||||||
end
|
end
|
||||||
|
|
||||||
return errormsg
|
return errormsg
|
||||||
@ -201,11 +202,12 @@ end
|
|||||||
|
|
||||||
function pausefile()
|
function pausefile()
|
||||||
local errormsg
|
local errormsg
|
||||||
|
local input = vlc.object.input()
|
||||||
if input then
|
local playstate
|
||||||
common.hotkey("key-play")
|
playstate, errormsg = get_play_state()
|
||||||
else
|
|
||||||
errormsg = noinput
|
if playstate == "playing" then
|
||||||
|
vlc.playlist.pause()
|
||||||
end
|
end
|
||||||
|
|
||||||
return errormsg
|
return errormsg
|
||||||
@ -213,6 +215,7 @@ end
|
|||||||
|
|
||||||
function playpausefile()
|
function playpausefile()
|
||||||
local errormsg
|
local errormsg
|
||||||
|
local input = vlc.object.input()
|
||||||
|
|
||||||
if input then
|
if input then
|
||||||
vlc.playlist.pause()
|
vlc.playlist.pause()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user