@jxstjh/jhvideo
Version:
HTML5 jhvideo base on MPEG2-TS Stream Player
117 lines (116 loc) • 2.74 kB
TypeScript
export type DeviceType = 'pvg67' | 'pvgplus' | 'rtsp' | 'gb28181';
export type ProtocolType = 'httpflv' | 'websocketflv' | 'hls' | 'webrtc';
export type Streamtype = 'vod' | 'live';
export declare enum BarItemType {
BTN = "btn",
LABEL = "label"
}
export declare enum PlayerMode {
DESKTOP = "desktop",
MOBILE = "mobile"
}
export interface ToolBarItem {
type: BarItemType;
label?: string;
icon?: string;
className?: string;
cmd?: string;
cb?: Function;
tip?: string;
}
export interface shapeItem {
x: number;
y: number;
}
export interface StreamOpt {
aisleId: string;
passage: string;
title?: string;
url?: string;
sipServerId?: string;
streamtype?: Streamtype;
deviceType?: DeviceType;
protocolType?: ProtocolType;
protocol: 'ws' | 'wss';
isptz?: boolean;
beginTime?: string;
endTime?: string;
vod?: number;
headerToolBar?: Array<ToolBarItem>;
footerToolBar?: Array<ToolBarItem>;
hideHeaderToolBar?: boolean;
hideFooterToolBar?: boolean;
enableWorker?: boolean;
workerPath?: 'static/';
isDraw?: boolean;
shape?: Array<shapeItem>;
isTalk?: boolean;
autoTalk?: boolean;
autoAudio?: boolean;
dateTime?: string;
}
export interface ControllerOpt {
hideTools?: boolean;
}
export declare const defaultStreamOpt: {
passage: string;
deviceType: string;
isptz: boolean;
protocolType: string;
protocol: string;
streamtype: string;
footerToolBar: any[];
headerToolBar: any[];
enableWorker: boolean;
autoAudio: boolean;
isDraw: boolean;
isTalk: boolean;
};
export declare const defaultControllerOpt: ControllerOpt;
export declare const createDefaultStreamOpt: () => {
protocol: string;
passage: string;
deviceType: string;
isptz: boolean;
protocolType: string;
streamtype: string;
footerToolBar: any[];
headerToolBar: any[];
enableWorker: boolean;
autoAudio: boolean;
isDraw: boolean;
isTalk: boolean;
};
export declare const createDefaultControllerOpt: () => ControllerOpt;
export type StreamSpeed = -3 | -2 | -1 | 0 | 1 | 2 | 3;
export interface PTZParam {
streamId?: string;
cmd: number;
value: number;
}
export declare enum JPEvent {
DESTROY = "destroy",
INITED = "inited",
CREATED = "created",
SEEKED = "seeked",
PLAY = "play",
CANPLAY = "canPlay",
PAUSE = "pause",
ERROR = "error",
CLOSE = "close",
FullScreen = "fullScreen",
SCREENSHOT = "screenshot"
}
export declare enum StyleSize {
XS = "xs",
SM = "sm",
MD = "md",
LG = "lg"
}
export declare enum Direction {
TL = 1,
TR = 2,
DR = 3,
DL = 4,
NAN = 0
}