import { type } from "os";
export type DeviceType = 'pvg67' | 'pvgplus' | 'rtsp' | 'gb28181';
export type ProtocolType = 'httpflv' | 'websocketflv' | 'hls' | 'webrtc';
export type Streamtype = 'vod' | 'live';
export enum BarItemType {
BTN = 'btn',
LABEL = 'label'
}
export interface ToolBarItem {
type: BarItemType;
label?: string;
icon?: string;
className?: string;
cmd?: string;
cb?: Function;
tip?: string;
}
export interface StreamOpt {
user: string;
password: string;
ip: string;
port: string;
channel: string;
title?: string;
url?: string;
sipServerId?: string;
streamtype?: Streamtype;
deviceType?: DeviceType;
protocolType?: ProtocolType;
isptz?: boolean;
beginTime?: string;
endTime?: string;
vod?: number;
headerToolBar?: Array<ToolBarItem>,
footerToolBar?: Array<ToolBarItem>,
hideHeaderToolBar?: boolean;
hideFooterToolBar?: boolean;
enableWorker?: boolean;
}
export const defaultStreamOpt = {
user: 'admin',
deviceType: "pvgplus",
isptz: false,
password: "a123456",
protocolType: "websocketflv",
streamtype: "live",
footerToolBar: [],
headerToolBar: [],
enableWorker: false
};
export const createDefaultStreamOpt = () => {
return Object.assign({}, defaultStreamOpt);
}
export type StreamSpeed = -4 | -3 | -2 | -1 | 0 | 1 | 2 | 3 | 4;
export interface PTZParam {
streamId?: string;
cmd: number;
value: number;
}
export enum JPEvent {
DESTROY = 'destroy',
INITED = 'inited',
CREATED = 'created',
SEEKED = 'seeked',
PLAY = 'play',
PAUSE = 'pause',
}
License
Copyright (C) 2021 magicxqq. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.