Greetings all --
I am working on an update to our existing channel. Since our last published channel Roku has added the requirement of deep linking. This is my last obstacle to certification for the update.
Our channel is simple. It loads one scene that has an option to play our live stream. That's pretty much it. The only thing we have is the one live stream.
I understand deep linking and it purpose. But I am at a loss as to how to implement it. I see in the requirements that live streams are exempt, but I want to make sure I am doing everything right before I go to partner success with this issue.
I have found info to add to the main.brs file but I am not sure how to proceed with how to handle the deeplinking args from my home scene. Below is the code from my main.brs...
' first thing that happens in a channel'
sub main(args as Dynamic)
msgPort = CreateObject("roMessagePort")
input = CreateObject("roInput")
input.SetMessagePort(msgPort)
screen = CreateObject("roSGScreen")
m.port = CreateObject("roMessagePort")
screen.setMessagePort(m.port)
scene = screen.CreateScene("TCVLiveStream")
scene.signalBeacon("AppLaunchComplete")
screen.show()
while(true)
msg = wait(0, m.port)
msgType = type(msg)
if msgType = "roSGScreenEvent"
if msg.isScreenClosed() then return
end if
if msgType = "roInputEvent"
info = msg.getInfo()
'info is now just like args passed to your Main() method
'it contains mediaType and contentId properties, so you
'can use your normal deep-link handling code
getDeepLink(info)
end if
end while
end sub
Function getDeepLinks(args) as Object
deeplink = Invalid
if args.contentid <> Invalid and args.mediaType <> Invalid
deeplink = {
id: args.contentId
type: args.mediaType
}
end if
return deeplink
end Function
Again, not sure where to go from here because our only stream is a live stream and not sure how to get the contentID or how to handle the deep link args.
Any help is appreciated.