jf-roku/components/InputTask.brs
Neil Burrows b313d57515
Store release issues (#180)
* Remove TrackerTask

* Change deprecated BookmarkPosition to PlayStart

* Accept (print & ignore) roInput commands

* Updated icon image sizes

* Added InputData Task (Not hooked up)

* Added signal beacons for Roku Performance Measuring

* Reverting ineffective roInput code

* Manually recreated changed channel poster images

* Use app_loaded global variable to control when performance beacons are sent

* Sorting missed performance signal beacon
2020-04-29 12:26:12 -04:00

34 lines
907 B
Plaintext

Sub Init()
m.top.functionName = "listenInput"
End Sub
function ListenInput()
port=createobject("romessageport")
InputObject=createobject("roInput")
InputObject.setmessageport(port)
while true
msg=port.waitmessage(500)
if type(msg)="roInputEvent" then
print "INPUT EVENT!"
if msg.isInput()
inputData = msg.getInfo()
'print inputData'
for each item in inputData
print item +": " inputData[item]
end for
' pass the deeplink to UI
if inputData.DoesExist("mediaType") and inputData.DoesExist("contentID")
deeplink = {
id: inputData.contentID
type: inputData.mediaType
}
print "got input deeplink= "; deeplink
m.top.inputData = deeplink
end if
end if
end if
end while
end function