Roku channel testing tool for node. This is aimed at developers who are using a Roku in development mode and want to verify channel behavior.
This module can:
- Install a channel zip
- Launch a channel with arbitrary arguments
- Send ECP commands to a Roku device (e.g. key presses)
- Listen for data on the debug console
Based on node-roku.
npm install veeta-tv/node-roku-test
Pass in the Roku device ip address, developer password, and port to debug on
device = new RokuTest('192.168.1.100', 'passw0rd', RokuTest.MAIN)
The following port constants are available:
RokuTest.MAIN
8085RokuTest.SG
8089RokuTest.TASK1
8090RokuTest.TASK2
8091RokuTest.TASK3
8092RokuTest.TASK4X
8093RokuTest.PROFILER
8080
Types the provided string into a field
Simulates a button press on the remote control
Add a delay into the command queue to allow the roku to keep up with what you want to do.
Pass arguments into the currently running app. see test/input.js
list the installed apps on the roku
create a PNG stream
Using the launch
command you can open application or allow a development application handle the protocol.
see the example code in test/launch.js and test/dev-video.js
Launch the development roku channel, passing the key/value pairs from Object as URL query params.
returns an object of information about the roku
example object:
{ major: '1',
minor: '0',
deviceType: 'urn:roku-com:device:player:1-0',
friendlyName: 'Roku Streaming Player',
manufacturer: 'Roku',
manufacturerURL: 'http://www.roku.com/',
modelDescription: 'Roku Streaming Player Network Media',
modelName: 'Roku Streaming Player 4200X',
modelNumber: '4200X',
modelURL: 'http://www.roku.com/',
serialNumber: '1GH35D054697',
UDN: 'uuid:31474833-3544-a9d5-0000-05006d1f0000',
serviceType: 'urn:roku-com:service:ecp:1',
serviceId: 'urn:roku-com:serviceId:ecp1-0',
SCPDURL: 'ecp_SCPD.xml' }
Install the channel zipfile
to a Roku device with development password password
.
Start listening for data on the console. The port
argument is optional. If no port is specified, the port specified at module initialization will be used.
Stop listening for data on the console.
The debugData
event is emitted when the debug socket has data on it. This will not be emitted for old data which the Roku "replays" on initial connection to the debug port.