@elara-services/roku
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

Welcome to the Roku package


Links:


Getting Started

const { RokuClient } = require("@elara-services/roku");
const roku = new RokuClient();
// OR 
const roku = new RokuClient({
    rokus: {
        "name": "IP_ADDRESS",
        "name_2": "IP_ADDRESS_2",
        ...etc,
    },
    default: "name", // OPTIONAL
});

Set Default Roku Device:

roku.setDefault("name"); 
// OR 
roku.setDefault(); // To reset the default device

Manage Roku Devices

// Add 
roku.cache.add("name", "ip");

// Remove 
roku.cache.remove("name");

// Get
roku.cache.get("name");

// List
roku.cache.list();

// Size
roku.cache.size();

// Clear all 
roku.cache.clear();

Commands

  • All Commands that have roku option supports both IP and name of the saved Roku device.
  • All commands will have roku option but if there is no roku name/ip provided then it will use the default (if set)
// Play
roku.play(); // OR roku.play("name_or_ip");

// Stop
roku.stop(); // OR roku.stop("name_or_ip");

// Home
roku.home(); // OR roku.home("name_or_ip");

// Select
roku.select(); // OR roku.select("name_or_ip");

// Info
roku.info();  // OR roku.info("name_or_ip");

// Up 
roku.up(); // OR roku.up("name_or_ip");

// Down
roku.down(); // OR roku.down("name_or_ip");

// Left
roku.left(); // OR roku.left("name_or_ip");

// Right
roku.right(); // OR roku.right("name_or_ip");

// Instant Replay
roku.instantReplay(); // OR roku.instantReplay("name_or_ip");

// Send Letter (typing)
roku.sendLetter("name_or_ip", "a"); // Send a letter to the Roku device.

// Forward (seek)
roku.forward(); 
// OR 
roku.forward("name_or_ip", ms_time); // EX: roku.forward("name_or_ip", 5000); // Seeks for 5s 

// Rewind
roku.rewind();
// OR 
roku.rewind("name_or_ip", ms_time); // EX: roku.rewind("name_or_ip", 5000); // rewinds for 5s 

Package Sidebar

Install

npm i @elara-services/roku

Weekly Downloads

6

Version

1.0.1

License

ISC

Unpacked Size

223 kB

Total Files

15

Last publish

Collaborators

  • elara-services