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