update resources/syncplay.lua - fixed play/pause
This commit is contained in:
parent
1a3b56c140
commit
1fc34a088a
@ -188,11 +188,12 @@ end
|
|||||||
|
|
||||||
function playfile()
|
function playfile()
|
||||||
local errormsg
|
local errormsg
|
||||||
|
local input = vlc.object.input()
|
||||||
|
local playstate
|
||||||
|
playstate, errormsg = get_play_state()
|
||||||
|
|
||||||
if input then
|
if playstate == "paused" then
|
||||||
common.hotkey("key-pause")
|
vlc.playlist.pause()
|
||||||
else
|
|
||||||
errormsg = noinput
|
|
||||||
end
|
end
|
||||||
|
|
||||||
return errormsg
|
return errormsg
|
||||||
@ -201,11 +202,12 @@ end
|
|||||||
|
|
||||||
function pausefile()
|
function pausefile()
|
||||||
local errormsg
|
local errormsg
|
||||||
|
local input = vlc.object.input()
|
||||||
|
local playstate
|
||||||
|
playstate, errormsg = get_play_state()
|
||||||
|
|
||||||
if input then
|
if playstate == "playing" then
|
||||||
common.hotkey("key-play")
|
vlc.playlist.pause()
|
||||||
else
|
|
||||||
errormsg = noinput
|
|
||||||
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