Bug fix
This commit is contained in:
1 parent
7f7564f66b
commit
cf74af04ec
5 files changed
+15
-12
No files matched your search
@@ -5,7 +5,6 @@ function Init()
|
||||
m.rowList = m.top.FindNode("rowList")
|
||||
m.top.ObserveField("rowItemSelected", "OnHomeGridScreenVideoSelected")
|
||||
m.top.ObserveField("focus", "OnFocusChange")
|
||||
m.top.ObserveField("playvideo", "OnPlayVideoCommand")
|
||||
m.top.ObserveField("refresh", "OnRefresh")
|
||||
|
||||
m.top.focus = true
|
||||
@@ -114,11 +113,6 @@ function OnHomeGridScreenVideoSelected(event as object) as void
|
||||
PlayVideo(videoId, m.top)
|
||||
end function
|
||||
|
||||
function OnPlayVideoCommand()
|
||||
videoId = m.top.playvideo
|
||||
PlayVideo(videoId)
|
||||
end function
|
||||
|
||||
function OnkeyEvent(key as string, press as boolean) as boolean
|
||||
if press = false
|
||||
return false
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
<field id="jumpToRowItem" type="intarray" alias="RowList.jumpToRowItem" />
|
||||
<field id="escape" type="string" alwaysNotify="true" />
|
||||
<field id="focus" type="boolean" alwaysNotify="true" />
|
||||
<field id="playvideo" type="string" alwaysNotify="true" />
|
||||
<field id="refresh" type="boolean" alwaysNotify="true" />
|
||||
</interface>
|
||||
<children>
|
||||
|
||||
@@ -28,6 +28,8 @@ function Init()
|
||||
m.navBar.ObserveField("escapeIndex", "OnNavBarEscape")
|
||||
m.navBar.ObserveField("focusIndex", "OnNavIndexChange")
|
||||
|
||||
m.currentFocued = m.homeGridScreen
|
||||
|
||||
InitWebServer()
|
||||
end function
|
||||
|
||||
@@ -42,19 +44,23 @@ end function
|
||||
function OnSearchScreenEscape()
|
||||
m.navBar.SetFocus(true)
|
||||
m.navBar.focusIndex = 0
|
||||
m.currentFocued = m.navBar
|
||||
end function
|
||||
|
||||
function OnHomeGridScreenEscape()
|
||||
m.navBar.SetFocus(true)
|
||||
m.navBar.focusIndex = 1
|
||||
m.currentFocued = m.navBar
|
||||
end function
|
||||
|
||||
function OnNavBarEscape()
|
||||
index = m.navBar.escapeIndex
|
||||
if index = 0
|
||||
m.searchScreen.focus = true
|
||||
m.currentFocued = m.searchScreen
|
||||
else if index = 1
|
||||
m.homeGridScreen.focus = true
|
||||
m.currentFocued = m.homeGridScreen
|
||||
else if index = 2
|
||||
m.settingsScreen.focus = true
|
||||
end if
|
||||
@@ -86,7 +92,8 @@ end function
|
||||
|
||||
function OnWebServerCommand()
|
||||
if m.serverTask.command.StartsWith("play:")
|
||||
PlayVideo(m.serverTask.command.Mid(5))
|
||||
sender = m.videoContainer.sender ?? m.currentFocued
|
||||
PlayVideo(m.serverTask.command.Mid(5), sender)
|
||||
end if
|
||||
end function
|
||||
|
||||
@@ -104,13 +111,15 @@ end function
|
||||
function LaunchArgumentsReceived()
|
||||
? "LaunchArgumentsReceived" m.top.launchArgs
|
||||
if m.top.launchArgs <> invalid and m.top.launchArgs.contentId <> invalid
|
||||
PlayVideo(m.top.launchArgs.contentId, m.homeGridScreen)
|
||||
sender = m.videoContainer.sender ?? m.currentFocued
|
||||
PlayVideo(m.top.launchArgs.contentId, sender)
|
||||
end if
|
||||
end function
|
||||
|
||||
function InputArgumentsReceived()
|
||||
? "InputArgumentsReceived" m.top.inputArgs
|
||||
if m.top.inputArgs <> invalid and m.top.inputArgs.contentId <> invalid
|
||||
PlayVideo(m.top.inputArgs.contentId)
|
||||
sender = m.videoContainer.sender ?? m.currentFocued
|
||||
PlayVideo(m.top.inputArgs.contentId, sender)
|
||||
end if
|
||||
end function
|
||||
@@ -2,7 +2,7 @@ import "pkg:/source/services/Invidious.bs"
|
||||
import "pkg:/components/Dialog/DialogUtils.bs"
|
||||
import "pkg:/source/roku_modules/rokupromise/Promise.brs"
|
||||
|
||||
function PlayVideo(videoId as string, sender = invalid as object)
|
||||
function PlayVideo(videoId as string, sender as object)
|
||||
width = 1280
|
||||
height = 720
|
||||
translation = [0.0, 0.0]
|
||||
|
||||
Reference in new issue
Block a user