rokudev/samples
repository·master·Indexed 19 days ago
https://github.com/rokudev/samplesA collection of sample Roku channels demonstrating how to build applications using the Roku framework. Key examples include Client-Side Ad Stitching (CSAS) and Roku Advertising Framework (RAF) v2 integration, various trick play thumbnail implementations (BIF and JPEG), a custom playback channel, and the Scene Graph Developer Extensions (SGDEX) framework for rapid channel development using reusable RSG components.
What's inside rokudev-samples
- The Add-on/Bundles sample channel demonstrates how to implement premium content offerings, including additional channels, bundled packages, and upgrades. It follows a workflow where users first purchase base subscription products or bundles from a product catalog and can subsequently purchase eligible add-ons.
Overview of the Roku SDK Development Guide
masterThe SDK Development Guide provides a structured path for building a Roku channel, covering project structure, data parsing, UI construction, and video playback.
Before starting this guide, ensure you have completed the following prerequisite steps:
- Enable Developer Settings: Follow the Developer Setup Guide on the official Roku developer site to enable developer mode on your Roku device.
- Learn Sideloading: Review the Hello World Guide to understand how to sideload your channel onto a device.
The guide is organized into four main technical modules:
- Project Setup: Configuring the necessary directory structure, files, and assets.
- XML Feed Parsing: Techniques for parsing XML content feeds to extract video metadata like titles and descriptions.
- SceneGraph UI: Building user interfaces, specifically using components like
RowListfor grid layouts. - Video Playback: Implementing video playback functionality within SceneGraph.
Overview of the hello-world sample channel
masterThehello-worldproject is a basic sample channel application designed for the Roku platform. It serves as a foundational starting point for developers looking to understand the structure and implementation of a minimal Roku channel.Overview of the Style3 Simple Sample
masterThis sample demonstrates a simple Style3 implementation using BrightScript and Roku Scenegraph (RSG) to create a Roku channel. It serves as a foundational example for developers learning to build channels using the Home Screen SDK 2.0.
Key concepts covered in this sample include:
- Channel manifest: Configuration for the Roku channel.
- Scenegraph nodes: UI elements defined via XML.
- APIs and XML: The interface between BrightScript logic and Scenegraph markup.
- Scenes: The primary container for the user interface.
- Renderable nodes: The fundamental building blocks of the UI.
Overview of Roku DIAL SDK samples
masterThis package provides resources for developing Roku second-screen applications using the DIAL (Discovery-and-Launch) protocol. It includes documentation for BrightScript programming and sample implementations for Android and iOS to facilitate device discovery and application launching.Overview of the Roku Recommends Sample Channel
masterTheRoku_Recommendssample channel demonstrates a complete Roku channel implementation driven by a single RSS feed. It showcases specific SceneGraph Developer Extensions (SGDEX) features for content navigation and playback.Overview of Scene Graph Developer Extensions (SGDEX)
masterScene Graph Developer Extensions (SGDEX) is a collection of reusable Roku Scene Graph (RSG) components designed for rapid channel development. It provides high-level abstractions to maintain a consistent UX paradigm without building from low-level components.
Key abstractions include:
- Views: Full-screen components that replace the need to build screens from scratch using low-level RSG components.
- Content Manager: A robust system for connecting views to content sources (like feeds or APIs). It manages RSG Task Nodes automatically to ensure high performance across Roku devices.
- Component Controller: A management layer for handling the screen stack and navigating between different views.
- Monetization Components: Specialized components for integrating the Roku Ad Framework (RAF) and Roku Billing for subscriptions and entitlements.
Overview of Trick Play thumbnail implementations
masterThis repository contains four samples demonstrating different methods for generating and incorporating thumbnails for trick play on Roku devices. The implementations vary based on three primary factors:
Thumbnail Format:
- BIF (Recommended): Used with the firmware's built-in video player. Requires creating BIF files via
biftool, hosting them on a server, and providing URLs viasdbifurlandhdbifurlin aContentNodepassed to aVideonode. - JPEG: Used with custom video players that implement custom trick play logic, progress bars, and buffering status.
- BIF (Recommended): Used with the firmware's built-in video player. Requires creating BIF files via
Video Player Type:
- Native: Used for BIF implementations.
- Custom: Used for JPEG implementations.
Ad Integration:
- Samples may or may not include server-side ads (SSAIs) within the trick play thumbnails.
Overview of TrickPlayThumbnailsHLS sample
masterThis sample demonstrates how to generate thumbnails and the corresponding thumbnails playlist for HLS (HTTP Live Streaming) to support trickplay functionality.
Note: Do not use this sample as a test stream. To test HLS trickplay thumbnails, use the following hosted stream:
https://image.roku.com/ZHZscHItc2Ft/roku/trickplay/master.m3u8Overview of the Simple Grid and Video sample channel
masterThis sample implements a 'Style 3' channel based on the Khan Academy API. It demonstrates a fully functional channel architecture centered around a grid screen with a dedicated description section for the currently focused item.
The channel is composed of independent screen nodes that can be used separately or in any order, providing the following core functionalities:
- Grid Screen: Handles content loading, rendering, and item selection. To use this, you must populate the
gridContentproperty of the scene prior to loading the grid panel. Content loading is performed via theGetApiArrayfunction. - Video Player: A component capable of handling fullscreen animations.
- Fading Poster Node: Provides smooth background image transitions that change according to the currently focused item.
- Grid Screen: Handles content loading, rendering, and item selection. To use this, you must populate the
Overview of the SceneGraphTutorial application
masterThe
SceneGraphTutorialis a sample application designed to demonstrate typical Roku SceneGraph application structures, node classes, and design principles. It serves as a reference for developers to quickly identify and select appropriate node classes and design patterns for their own Roku applications.Application Structure
The application uses a sliding panel set architecture with three primary 'screens':
- Category Selection: A set of two medium-sized panels consisting of a
categorieslistpanel(aListPanel) and acategoryinfopanel(aPanel). - Example Grid: A full-size
examplesgridpanel(aGridPanel) that slides into view when the user presses OK or Right from the category selection screen. - Example Screen: A dedicated screen that replaces the grid panel when a specific example is selected via the OK key.
- Category Selection: A set of two medium-sized panels consisting of a
Overview of NewDeveloperOnboardingSample
masterTheNewDeveloperOnboardingSampleis a foundational Roku channel designed to introduce new developers to the core technologies used in Roku development: SceneGraph (the XML-based UI framework) and BrightScript (the scripting language used for channel logic). It serves as a minimal, practical starting point for learning how these two components interact to build a Roku application.