@livetv-app/tvguide
Version:
An Android TV Live Channels-like Electronic Programme Guide for React DOM and React Native applications.
31 lines (30 loc) • 1.25 kB
TypeScript
import { Channel } from '../types';
export declare enum KeypressResult {
OK = 0,
/** [L,R; U/D when wrap = false] Used when the scroll position wasn't moved as we are already at the scroll boundary */
IGNORED_DUE_TO_BOUNDARY = 1,
/** [S] Used when the onSelectChannel hooks wasn't called as the highlighted channel is the same as the channel prop */
IGNORED_AS_CHANNEL_ALREADY_SELECTED = 2,
/** [LS] Used when programme actions weren't shown as no programme was selected */
IGNORED_AS_NO_PROGRAMME_SELECTED = 3,
/** [LS] Used when programme actions weren't shown as the selected programme doesn't have any actions */
IGNORED_AS_PROGRAMME_HAS_NO_ACTIONS = 4
}
export interface ProgrammeGuide {
setChannelUp(): void;
setChannelDown(): void;
setPreviousProgramme(): void;
setNextProgramme(): void;
sendSelectKeypress(): KeypressResult;
sendLongSelectKeypress(): KeypressResult;
sendUpKeypress(wrap?: boolean): KeypressResult;
sendDownKeypress(wrap?: boolean): KeypressResult;
sendLeftKeypress(): KeypressResult;
sendRightKeypress(): KeypressResult;
}
export interface ScrollPosition {
top: Channel | null;
bottom: Channel | null;
left: Date;
right: Date;
}