@dlenroc/roku-ecp
v2.1.1
Published
Client for external control protocol provided on port 8060
Downloads
108
Readme
@dlenroc/roku-ecp ·
Client for external control protocol provided on port 8060
Installation
npm install @dlenroc/roku-ecp
Usage
import { ECPExecutor, launch } from '@dlenroc/roku-ecp';
const ctx = new ECPExecutor({ address: 'http://<ip>:8060' });
await launch(ctx, { appId: 'dev' });
API
exitApp(payload: { appId: AppId }): Promise<boolean>
input(payload: Record<string, unknown>): Promise<void>
keydown(payload: { key: string }): Promise<void>
keypress(payload: { key: string }): Promise<void>
keyup(payload: { key: string }): Promise<void>
launch(payload: { appId: AppId; params?: Record<string, unknown> }): Promise<void>
queryActiveApp(): Promise<ActiveApp>
queryAppObjectCounts(payload: { appId: AppId }): Promise<Failure | AppObjectCounts>
queryApps(config?: Config<Context>): Promise<App[]>
queryAppState(payload: { appId: AppId }): Promise<Failure | AppState>
queryAppUI(): Promise<string>
queryChannelPerformance(payload?: { appId?: AppId; params?: Record<string, unknown> }): Promise<Failure | ChannelPerformance>
queryDeviceInfo(): Promise<DeviceInfo>
queryFWBeacons(): Promise<Failure | FWBeacons>
queryGraphicsFrameRate(): Promise<Failure | GraphicsFrameRate>
queryIcon(payload: { appId: AppId }): Promise<ArrayBuffer>
queryMediaPlayer(): Promise<MediaInfo>
queryR2D2Bitmaps(payload?: { appId?: AppId }): Promise<Failure | R2D2Bitmaps>
queryRegistry(payload: { appId: AppId }): Promise<Failure | Registry>
querySGNodesAll(payload?: { appId?: AppId }): Promise<string>
querySGNodesNodes(payload: { appId?: AppId; nodeId: string }): Promise<string>
querySGNodesRoots(payload?: { appId?: AppId }): Promise<string>
querySGRendezvous(): Promise<SGRendezvous>
search(payload: Record<string, unknown>): Promise<void>
trackFWBeacons(payload?: { appId?: AppId }): Promise<Failure | FWBeaconsStatus>
trackSGRendezvous(payload?: { appId?: AppId }): Promise<Failure | SGRendezvousStatus>
untrackFWBeacons(payload?: { appId?: AppId }): Promise<Failure | FWBeaconsStatus>
untrackSGRendezvous(payload?: { appId?: AppId }): Promise<Failure | SGRendezvousStatus>