@livetv-app/tvguide
Version:
An Android TV Live Channels-like Electronic Programme Guide for React DOM and React Native applications.
35 lines (34 loc) • 1.32 kB
TypeScript
import React = require('react');
import type { GestureResponderEvent, ImageErrorEventData, NativeSyntheticEvent } from 'react-native';
export { ChannelCategory, ProgrammeCategory, ProgrammeCredit, ProgrammeCreditRole, } from '@livetv-app/epgdata';
import { Channel as _Channel, Programme as _Programme } from '@livetv-app/epgdata';
export interface ChannelIconProps {
width: number;
height: number;
onLoad: () => void;
onError: (err: Error | NativeSyntheticEvent<ImageErrorEventData>) => void;
}
export interface Channel extends _Channel {
renderIcon?: (props: ChannelIconProps) => React.ReactNode;
}
export interface Programme extends _Programme {
onPress?: (event: React.MouseEvent<HTMLDivElement, MouseEvent> | GestureResponderEvent) => void;
actions?: ProgrammeAction[];
actions_text?: Record<string, string> | string;
recording?: RecordingState;
}
export interface ProgrammeAction {
name: string | Record</** Language */ string, string>;
/**
* If an array of URLs the first registered URL will open.
*
* e.g. ['bbciplayer:', 'https://bbc.co.uk/iplayer'] will open the app if it's installed, the website otherwise.
*/
urls: string[];
}
export declare enum RecordingState {
SCHEDULED = 0,
RECORDING = 1,
COMPLETED = 2,
FAILED = 3
}