diff --git a/components/video/PauseMenu.bs b/components/video/PauseMenu.bs index cd8bf6f39..dc3a4fc15 100644 --- a/components/video/PauseMenu.bs +++ b/components/video/PauseMenu.bs @@ -9,6 +9,7 @@ sub init() m.videoPlayPause = m.top.findNode("videoPlayPause") m.top.observeField("visible", "onVisibleChanged") + m.top.observeField("hasFocus", "onFocusChanged") m.top.observeField("playbackState", "onPlaybackStateChanged") m.top.observeField("itemTitleText", "onItemTitleTextChanged") @@ -73,6 +74,20 @@ sub onVisibleChanged() m.inactivityTimer.control = "stop" end sub +' onFocusChanged: Handler for changes to the focus of this pause menu. +' +sub onFocusChanged() + if m.top.hasfocus + focusedButton = m.optionControls.getChild(m.focusedButtonIndex) + if focusedButton.focus + m.optionControls.setFocus(true) + return + end if + + m.videoControls.setFocus(true) + end if +end sub + ' inactiveCheck: Checks if the time since last keypress is greater than or equal to the allowed inactive time of the pause menu. ' sub inactiveCheck() diff --git a/components/video/PauseMenu.xml b/components/video/PauseMenu.xml index 33e4e7789..899165927 100644 --- a/components/video/PauseMenu.xml +++ b/components/video/PauseMenu.xml @@ -24,5 +24,6 @@ + \ No newline at end of file diff --git a/components/video/VideoPlayerView.brs b/components/video/VideoPlayerView.brs index 39ce72ecd..b59dbdd72 100644 --- a/components/video/VideoPlayerView.brs +++ b/components/video/VideoPlayerView.brs @@ -99,6 +99,7 @@ sub handleHideAction(resume as boolean) m.chapterList.visible = false m.pauseMenu.showChapterList = false m.chapterList.setFocus(false) + m.pauseMenu.hasFocus = false m.pauseMenu.setFocus(false) m.top.setFocus(true) if resume @@ -115,6 +116,7 @@ sub handleChapterListAction() m.chapterMenu.jumpToItem = getCurrentChapterIndex() + m.pauseMenu.hasFocus = false m.pauseMenu.setFocus(false) m.chapterMenu.setFocus(true) end sub @@ -561,6 +563,7 @@ function onKeyEvent(key as string, press as boolean) as boolean m.chapterList.visible = false m.pauseMenu.showChapterList = false m.chapterMenu.setFocus(false) + m.pauseMenu.hasFocus = true m.pauseMenu.setFocus(true) return true end if @@ -608,6 +611,7 @@ function onKeyEvent(key as string, press as boolean) as boolean if not m.LoadMetaDataTask.isIntro ' Show pause menu, but don't pause video m.pauseMenu.visible = true + m.pauseMenu.hasFocus = true m.pauseMenu.setFocus(true) return true end if @@ -627,6 +631,7 @@ function onKeyEvent(key as string, press as boolean) as boolean ' Pause video and show pause menu m.top.control = "pause" m.pauseMenu.visible = true + m.pauseMenu.hasFocus = true m.pauseMenu.setFocus(true) return true end if