Demo Roku channel used for testing the StreamLayer SDK (SLSDK) integration.
This application demonstrates:
- dynamic SDK package loading
- SDK initialization
- player binding
- event/session handling
- rendering StreamLayer interactive overlays inside a Roku SceneGraph UI
The SLSDK integration module is fully self-contained and can be copied into any Roku channel.
- Roku device (Roku Ultra recommended)
- Roku OS 11.5+
- Developer Mode enabled
- Ability to sideload apps (
http://<ROKU_IP>) - Basic understanding of BrightScript and SceneGraph
components/
└── SLSDK/
├── SLView/
│ ├── SLView.xml
│ └── SLView.brs
└── SLManager/
├── SLManager.xml
└── SLManager.brs
shared/
└── StreamLayerSDK.pkg (local SDK package)
- SLView → Public component that your app interacts with
- SLManager → Internal logic controller (not called directly)
- StreamLayerSDK.pkg → The StreamLayer UI bundle loaded at runtime
Edit config.json:
{
"settings": {
"language": "EN",
"platform": "roku",
"apiKey": "REPLACE_WITH_YOUR_API_KEY",
"sdkUri": "pkg:/shared/StreamLayerSDK.pkg",
"streamUrl": "REPLACE_WITH_YOUR_STREAM_URL",
"isLoggingEnabled": true,
"isAnalyticsEnabled": false,
"isVastModeEnabled": false
}
}| Field | Description |
|---|---|
| language | UI language code (e.g., EN) |
| platform | Always "roku" |
| apiKey | Your StreamLayer API Key (required) |
| sdkUri | Path to the StreamLayer SDK package |
| streamUrl | Video stream URL for the demo player |
| isLoggingEnabled | Enables StreamLayer logging |
| isAnalyticsEnabled | Enables StreamLayer-side analytics |
| isVastModeEnabled | Mark this as experimental in the docs |
The only component your app interacts with.
Provides:
- SDK initialization
- Player attachment
- Event switching
- Focus handling
- Promo visibility events
Handles:
- SDK package loading
- Creating StreamLayer root nodes
- Observing events (
promoVisible, logs) - Passing data to the SDK
- Cleanup of SDK node
Developers do NOT interact with SLManager directly.
This is the API surface exposed by SLView to the host application.
Initializes the StreamLayer SDK.
| Key | Required | Description |
|---|---|---|
apiKey |
✔ | StreamLayer API key |
sdkUri |
✔ | Path to SDK package |
playerRef |
✖ | SceneGraph video node |
isLoggingEnabled |
✖ | Enables debug logs |
isAnalyticsEnabled |
✖ | Enables analytics |
isVastModeEnabled |
✖ | Experimental |
slView.initialize({
apiKey: m.config.apiKey,
playerRef: m.videoPlayer,
sdkUri: m.config.sdkUri,
isLoggingEnabled: true,
isAnalyticsEnabled: false,
isVastModeEnabled: false
})Attaches/re-attaches your video player to StreamLayer.
slView.attachPlayer(m.videoPlayer)Tells StreamLayer to load data for a specific event/session.
slView.setEvent("event123")Destroys all StreamLayer UI and removes the container.
slView.disposeSdk()Returns the current version of the StreamLayer SDK.
version = slView.getVersion()
? "[App] SDK version: " + versionRead-only.
Indicates when a promo/ad overlay is visible.
Example:
m.slView.observeField("promoVisible", "onPromoVisibleChanged")Used by the host to transfer focus to StreamLayer UI.
slView.focus = true<SLView id="SLView" visible="true" />m.slView = m.top.findNode("SLView")
m.slView.callFunc("initialize", {
apiKey: m.config.apiKey,
playerRef: m.videoPlayer,
sdkUri: m.config.sdkUri
})
m.slView.setEvent("event123")
version = m.slView.getVersion()
? "SDK version: " + versionThe sample application includes several ready-to-use video streams so you can immediately preview StreamLayer’s interactive overlays inside the Roku player. These streams are provided only for testing and demonstration purposes.
Available Sample Streams
https://storage.googleapis.com/shaka-demo-assets/bbb-dark-truths-hls/hls.m3u8
https://stream.mux.com/wx8bp9XKXuYjKu3ZqKpE5ga1QVQcF02x.m3u8
https://content.jwplatform.com/manifests/vM7nH0Kl.m3u8
https://demo.unified-streaming.com/k8s/features/stable/video/tears-of-steel/tears-of-steel.ism/.m3u8
Using Your Own Stream
To test StreamLayer with your own content:
Open config.json.
Locate the streamUrl field.
Replace it with your own valid HLS (.m3u8) URL. You can also use one of the sample test streams above if needed.
telnet <ROKU-IP> 8085
Logs are tagged:
[SLView][SLManager][StreamLayerSDK]
StreamLayer Engineering Team
© 2025 StreamLayer. All rights reserved.