When the channel is already running, direct playback commands will deep link to content in the channel without requiring a channel launch delay by using roInputEvent. To support this, channels must process roInputEvent the same way deep link parameters are passed through the main entry point on launch.
curl -d '' '<roku IP>:8060/launch/dev?contentID=<UUID>&mediaType=movie'
curl -d '' '<roku IP>:8060/input?my_event=My%20Test¶m2=100¶m3=200&action=start'
"sawood6626" wrote:
I've tried using both the input and the launch commands. The input command causes the channel to relaunch when the mediatype and contentid parameters are present.
Sub Main(args as Dynamic)
screen = CreateObject("roSGScreen")
m.scene = screen.CreateScene("HomeScene")
port = CreateObject("roMessagePort")
input = CreateObject("roInput") # THIS LINE IS NEW
screen.SetMessagePort(port)
input.SetMessagePort(port) # THIS LINE IS NEW
screen.Show()
...
if args.ContentID <> invalid and args.MediaType <> invalid
? "[Main] Processing deeplink..."
ProcessDeepLink(args)
end if
while(true)
msg = wait(0, port)
? "msg = " + msg
if type(msg) = "roInputEvent" and msg.isInput() then # THIS BLOCK IS NEW
if msg.GetInfo().MediaType <> invalid and msg.GetInfo().ContentID <> invalid
ProcessDeepLink(msg.GetInfo())
end if
end if
...
end while
...
End Sub
"sawood6626" wrote:
I cannot seem to find any documentation on how to process deep link parameters while the channel is running as per the new requirement:When the channel is already running, direct playback commands will deep link to content in the channel without requiring a channel launch delay by using roInputEvent. To support this, channels must process roInputEvent the same way deep link parameters are passed through the main entry point on launch.
I already have deep linking support on my channel and it works, however, no matter what I do the channel always re-launches when testing deep-linking. I have used both the deep linking test app and curl with the same result. Does anyone know how to properly support and test this?