Close dialog when casting a video (#85)
* Close dialog when casting a video * Refactor, and fix issue with keyboard dialog * Changelog
This commit is contained in:
1 parent
4433514975
commit
3223fbd8f2
7 files changed
+24
-11
No files matched your search
@@ -22,6 +22,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
- Added launch argument `clearPlayletLibUrls`
|
- Added launch argument `clearPlayletLibUrls`
|
||||||
- If the dev menu is used to load a custom Playlet lib url, but the lib does not have a functionality to revert back, `curl -d '' "http://$ROKU_DEV_TARGET:8060/launch/dev?clearPlayletLibUrls=true"` can be used to remove the custom lib, and revert to using default.
|
- If the dev menu is used to load a custom Playlet lib url, but the lib does not have a functionality to revert back, `curl -d '' "http://$ROKU_DEV_TARGET:8060/launch/dev?clearPlayletLibUrls=true"` can be used to remove the custom lib, and revert to using default.
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Issue where a dialog remains on screen when a video was cast from web app
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
- SponsorBlock segments are not skipped by default, except for sponsor segments
|
- SponsorBlock segments are not skipped by default, except for sponsor segments
|
||||||
|
|||||||
@@ -116,6 +116,12 @@ end function
|
|||||||
function OnWebServerCommand()
|
function OnWebServerCommand()
|
||||||
if m.serverTask.command.StartsWith("play:")
|
if m.serverTask.command.StartsWith("play:")
|
||||||
sender = m.videoContainer.sender ?? m.currentFocued
|
sender = m.videoContainer.sender ?? m.currentFocued
|
||||||
|
if m.videoContainer.fullscreen
|
||||||
|
dialog = m.top.getScene().dialog
|
||||||
|
if dialog <> invalid
|
||||||
|
dialog.close = true
|
||||||
|
end if
|
||||||
|
end if
|
||||||
PlayVideo(m.serverTask.command.Mid(5), { sender: sender })
|
PlayVideo(m.serverTask.command.Mid(5), { sender: sender })
|
||||||
end if
|
end if
|
||||||
end function
|
end function
|
||||||
|
|||||||
@@ -38,6 +38,5 @@ function OnFocusChanged()
|
|||||||
end function
|
end function
|
||||||
|
|
||||||
function OnkeyEvent(key as string, press as boolean) as boolean
|
function OnkeyEvent(key as string, press as boolean) as boolean
|
||||||
settingsScreen = m.top.getScene().findNode("SettingsScreen")
|
return m.top.settings@.OnkeyEvent(key, press)
|
||||||
return settingsScreen@.OnkeyEvent(key, press)
|
|
||||||
end function
|
end function
|
||||||
@@ -34,6 +34,5 @@ function OnDialogButtonSelected()
|
|||||||
end function
|
end function
|
||||||
|
|
||||||
function OnkeyEvent(key as string, press as boolean) as boolean
|
function OnkeyEvent(key as string, press as boolean) as boolean
|
||||||
settingsScreen = m.top.getScene().findNode("SettingsScreen")
|
return m.top.settings@.OnkeyEvent(key, press)
|
||||||
return settingsScreen@.OnkeyEvent(key, press)
|
|
||||||
end function
|
end function
|
||||||
@@ -47,8 +47,7 @@ function OnFocusChanged()
|
|||||||
end function
|
end function
|
||||||
|
|
||||||
function OnkeyEvent(key as string, press as boolean) as boolean
|
function OnkeyEvent(key as string, press as boolean) as boolean
|
||||||
settingsScreen = m.top.getScene().findNode("SettingsScreen")
|
return m.top.settings@.OnkeyEvent(key, press)
|
||||||
return settingsScreen@.OnkeyEvent(key, press)
|
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function OnOptionsChanged()
|
function OnOptionsChanged()
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ function Init()
|
|||||||
m.top.observeField("focusedChild", "OnFocusChanged")
|
m.top.observeField("focusedChild", "OnFocusChanged")
|
||||||
m.top.observeField("value", "OnValueChanged")
|
m.top.observeField("value", "OnValueChanged")
|
||||||
m.top.observeField("settings", "OnSettingsScreen")
|
m.top.observeField("settings", "OnSettingsScreen")
|
||||||
|
m.keyboardWasClosedByButton = false
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function OnSettingsScreen()
|
function OnSettingsScreen()
|
||||||
@@ -23,8 +24,7 @@ function OnValueChanged()
|
|||||||
end function
|
end function
|
||||||
|
|
||||||
function OnkeyEvent(key as string, press as boolean) as boolean
|
function OnkeyEvent(key as string, press as boolean) as boolean
|
||||||
settingsScreen = m.top.getScene().findNode("SettingsScreen")
|
return m.top.settings@.OnkeyEvent(key, press)
|
||||||
return settingsScreen@.OnkeyEvent(key, press)
|
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function ShowEditKeyboard()
|
function ShowEditKeyboard()
|
||||||
@@ -45,10 +45,15 @@ function OnButtonSelected(event as object)
|
|||||||
if buttonSelected = 0
|
if buttonSelected = 0
|
||||||
m.top.value = keyboard.text
|
m.top.value = keyboard.text
|
||||||
end if
|
end if
|
||||||
|
m.keyboardWasClosedByButton = true
|
||||||
keyboard.close = true
|
keyboard.close = true
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function OnKeyboardClosed()
|
function OnKeyboardClosed() as void
|
||||||
settingsScreen = m.top.getScene().findNode("SettingsScreen")
|
' The keyboard was closed by something else (like cast from web app)
|
||||||
settingsScreen@.MenuNavigate(-1)
|
' In this case, we do nothing, since the focus might be moved to the video player
|
||||||
|
if not m.keyboardWasClosedByButton
|
||||||
|
return
|
||||||
|
end if
|
||||||
|
m.top.settings@.MenuNavigate(-1)
|
||||||
end function
|
end function
|
||||||
@@ -55,6 +55,7 @@ function CloseVideo(setFocus = true as boolean)
|
|||||||
videoContainer.sender.SetFocus(true)
|
videoContainer.sender.SetFocus(true)
|
||||||
end if
|
end if
|
||||||
end if
|
end if
|
||||||
|
videoContainer.sender = invalid
|
||||||
SponsorBlockNotifcationSetVisible(false)
|
SponsorBlockNotifcationSetVisible(false)
|
||||||
end function
|
end function
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user