JSPM

@elara-services/roku

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q20646F
  • License ISC

Gives you functions to get/control your roku device(s)

Package Exports

  • @elara-services/roku
  • @elara-services/roku/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@elara-services/roku) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Welcome to the Roku package


Links:

Docs Docs

Discord Support

Patreon Patreon

PayPal PayPal


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