mediaType=live deep link type for live channel playback.
What a valid deep link looks like
A deep link payload on Roku is an associative array with at least two fields:| Field | Required value |
|---|---|
mediaType | "live" (case-insensitive) |
contentId | Non-empty string identifying the channel |
mediaType value, or an empty contentId, is silently ignored.
Validation: GTV_IsLiveDeepLink()
All deep link validation is centralised in source/main.brs. The function GTV_IsLiveDeepLink() is the single gate that both entry points pass their payload through before doing anything with it:
mediaType must be exactly "live" after lowercasing.
Two entry points
launchDeepLink
Set at cold start from the
args passed to Main(). The channel was not running when the link arrived.inputDeepLink
Set while the app is already running, via an
roInput event. The channel handles the link without restarting.Cold start: launchDeepLink
When Roku launches the channel, it passes an args associative array to Main(). If the args represent a valid live deep link, the payload is written to scene.launchDeepLink:
launchDeepLink in MainScene triggers onLaunchDeepLink(), which stores the payload as m.pendingDeepLink. The pending deep link is then resolved once the channel list is available after auth and playlist load:
Warm start: inputDeepLink
If the channel is already running when a deep link arrives, Roku fires an roInputEvent. The main message loop reads the event info and, if valid, writes it to scene.inputDeepLink:
inputDeepLink triggers onInputDeepLink(), which calls ProcessDeepLink() immediately rather than queuing it as pending:
How MainScene processes a deep link
ProcessDeepLink() in components/MainScene.brs handles both cases after the initial validation:
Check channel list availability
If the channel list is empty (playlist has not loaded yet), the link is stored as
m.pendingDeepLink and processed after OnPlaylistDone() completes.Resolve channel index
ResolveDeepLinkChannelIndex() looks up the contentId in the loaded channel list.Manifest requirement
For warm-start deep links to work, the channel manifest must declare input launch support:roInputEvent messages to a running channel, and warm-start deep links will never arrive.
supports_input_launch=1 is already present in the GlobalTV manifest and is one of the fields verified by the make check certification target.Testing deep links with the Roku ECP
You can send a test deep link to a sideloaded channel using the Roku External Control Protocol (ECP) from any machine on the same network as the Roku device.Cold start (launch)
Warm start (input)
roInputEvent to the already-running channel without restarting it.