The Roku Player SDK serves as a player component library written in Brightscript, empowering developers to swiftly implement a comprehensive player experience. Encompassing features such as ad playback, casting, analytics, and more, the Player SDK is designed to enhance the overall richness of the user's interaction with the content. Notably, it relies on the Roku Core SDK for seamless integration and optimal performance.
Features
The Roku Player SDK by dotstudioPRO has first-class support for rendering Video Player with ads using dotstudioPRO Channel. Player SDK uses Core SDK to fetch data from the API and then It plays Videos. This SDK is a comprehensive solution for developers seeking a rich and versatile player experience.
Key Features:
-
Automatic Video Retrieval: Retrieves VOD and Live videos from the API effortlessly.
Handles all requirements for initializing playback, ensuring a smooth start to the viewing experience. -
Continuous Playback Handling: Automatically manages continuous playback for episodic or playlist content, providing uninterrupted streaming.
-
Ad Scheduling Integration: Fully integrated with dotstudioPRO's ad scheduling system. Includes robust VMAP support for an enhanced advertising experience.
-
Auth SDK Integration: Seamlessly integrated with the Auth SDK.
Enables the saving of the user's progress, facilitating the implementation of "Continue Watching" functionality. -
Callback Handling: Manages various callbacks for viewership analytics, providing valuable insights into user engagement.
-
Multi-Instance Synchronization: Automatically synchronizes cases where multiple player instances are rendered on the same screen, ensuring consistent and coherent playback across instances.
Requirements
Platform | Minimum Version | Status |
---|---|---|
Roku | 11.0+ | Fully Tested |
Installation
Roku Core SDK must be installed before and then Install the Roku Player SDK in your Roku project effortlessly by executing the following commands:
git clone https://github.com/dotstudiopro/player-roku.git
Copy the player-roku/dotstudioPRO-player
folder into your channel so that the path to the folder is pkg:/components/dotstudioPRO-player
How to Use
To add PlayerComponent in your Roku project. import PlayerComponent & provide below necessary inputs.
Add the Below XML component to your XML file
Add the Below brightscript code to your .brs file
m.player = m.top.findNode("player")
m.player.callFunc( "loadPlayerChannelData", channelObject)
m.player.CallFunc("playerConfig", {"translation":[0,0],"clippingRect":[0.0,0.0,1920,1080],"width":1920,"height":1080,"enableUI":true,"focus":true})
m.player.unobserveField("onFinishPlayingChannel")
m.player.ObserveField("finishChannelState", "onFinishPlayingAllChannel")
Note: The key "channelObject" mentioned in the above code is the channel object.
Properties
The Player Component necessitates the provision of the following instantiation options during initialization:
Key | Type | Description |
---|---|---|
channelObject | Channel | dotstudioPRO Channel retrieved using Core SDK. or newly created Channel Object with slug |
Updated