npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@jxstjh/jhvideo

v0.2.21-beat61

Published

HTML5 jhvideo base on MPEG2-TS Stream Player

Downloads

2,349

Readme

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; // Pvg/gb登录用户名 
    password: string; // pvg/gb登录密码 
    ip: string; // pvg/gb的 ip 
    port: string; // pvg / gb端口
    channel: string; // pvg/gb通道号, pvm中的id。pvgplus可在末尾用#传入媒体参数, 包括video、audio、profile, 具体取值: video:H264  H265  MPEG4;audio:AAC G711 G726 G729;profile:CIF  D1  HD 0 1 2 三种媒体参数任意组合,无先后顺序,例如 #D1、#H264#HD#G711、#G711#HD#H264, profile中的0、1、2、...代表主子码流
    title?: string; // 通道名称
    url?: string; // Rtsp的地址
    sipServerId?: string; // 国标网关id
    streamtype?: Streamtype;
    deviceType?: DeviceType;
    protocolType?: ProtocolType;
    isptz?: boolean; // 是否云台控制
    beginTime?: string; // 录像开始时间
    endTime?: string; // 录像结束时间
    vod?: number; // 录像存储类型: 0:服务录像 1~255:设备录像,
    headerToolBar?: Array<ToolBarItem>, // header toolbae
    footerToolBar?: Array<ToolBarItem>, // footer toolbae
    hideHeaderToolBar?: boolean; // 是否隐藏对应工具栏
    hideFooterToolBar?: boolean; // 是否隐藏对应工具栏
    enableWorker?: boolean; // 是否启用web worker
}
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; // 流id
    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.