mirror of
https://github.com/jellyfin/jellyfin-roku.git
synced 2024-11-23 22:29:43 +00:00
Update API docs
This commit is contained in:
parent
3c86a43dee
commit
47ed258ee6
@ -570,6 +570,14 @@ sub bufferCheck(msg)
|
||||
|
||||
end sub
|
||||
|
||||
' stateAllowsPauseMenu: Check if current video state allows showing the pause menu
|
||||
'
|
||||
' @return {boolean} indicating if video state allows the pause menu to show
|
||||
function stateAllowsPauseMenu() as boolean
|
||||
validStates = ["playing", "paused", "stopped"]
|
||||
return inArray(validStates, m.top.state)
|
||||
end function
|
||||
|
||||
function onKeyEvent(key as string, press as boolean) as boolean
|
||||
|
||||
' Keypress handler while user is inside the chapter menu
|
||||
@ -622,6 +630,9 @@ function onKeyEvent(key as string, press as boolean) as boolean
|
||||
|
||||
if key = "down" and not m.top.trickPlayBar.visible
|
||||
if not m.LoadMetaDataTask.isIntro
|
||||
' Don't allow user to open menu prior to video loading
|
||||
if not stateAllowsPauseMenu() then return true
|
||||
|
||||
m.pauseMenu.visible = true
|
||||
m.pauseMenu.hasFocus = true
|
||||
m.pauseMenu.setFocus(true)
|
||||
@ -630,6 +641,9 @@ function onKeyEvent(key as string, press as boolean) as boolean
|
||||
|
||||
else if key = "up" and not m.top.trickPlayBar.visible
|
||||
if not m.LoadMetaDataTask.isIntro
|
||||
' Don't allow user to open menu prior to video loading
|
||||
if not stateAllowsPauseMenu() then return true
|
||||
|
||||
m.pauseMenu.visible = true
|
||||
m.pauseMenu.hasFocus = true
|
||||
m.pauseMenu.setFocus(true)
|
||||
@ -638,6 +652,9 @@ function onKeyEvent(key as string, press as boolean) as boolean
|
||||
|
||||
else if key = "OK" and not m.top.trickPlayBar.visible
|
||||
if not m.LoadMetaDataTask.isIntro
|
||||
' Don't allow user to open menu prior to video loading
|
||||
if not stateAllowsPauseMenu() then return true
|
||||
|
||||
' Show pause menu, but don't pause video
|
||||
m.pauseMenu.visible = true
|
||||
m.pauseMenu.hasFocus = true
|
||||
@ -651,6 +668,10 @@ function onKeyEvent(key as string, press as boolean) as boolean
|
||||
' Disable pause menu for intro videos
|
||||
if not m.LoadMetaDataTask.isIntro
|
||||
if key = "play" and not m.top.trickPlayBar.visible
|
||||
|
||||
' Don't allow user to open menu prior to video loading
|
||||
if not stateAllowsPauseMenu() then return true
|
||||
|
||||
' If video is paused, resume it and don't show pause menu
|
||||
if m.top.state = "paused"
|
||||
m.top.control = "resume"
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user