@types/node-media-server
TypeScript icon, indicating that this package has built-in type declarations

2.3.6 • Public • Published

Installation

npm install --save @types/node-media-server

Summary

This package contains type definitions for node-media-server (https://github.com/illuspas/Node-Media-Server).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node-media-server.

index.d.ts

interface Config {
    logType?: number;
    rtmp?: RtmpConfig;
    http?: HttpConfig;
    https?: SslConfig;
    trans?: TransConfig;
    relay?: RelayConfig;
    fission?: FissionConfig;
    auth?: AuthConfig;
}

interface RtmpConfig {
    port?: number;
    ssl?: SslConfig;
    chunk_size?: number;
    gop_cache?: boolean;
    ping?: number;
    ping_timeout?: number;
}

interface SslConfig {
    key: string;
    cert: string;
    port?: number;
}

interface HttpConfig {
    mediaroot: string;
    port?: number;
    allow_origin?: string;
}

interface AuthConfig {
    play?: boolean;
    publish?: boolean;
    secret?: string;
}

interface TransConfig {
    ffmpeg: string;
    tasks: TransTaskConfig[];
}

interface RelayConfig {
    tasks: RelayTaskConfig[];
    ffmpeg: string;
}

interface FissionConfig {
    ffmpeg: string;
    tasks: FissionTaskConfig[];
}

interface TransTaskConfig {
    app: string;
    hls?: boolean;
    hlsFlags?: string;
    dash?: boolean;
    dashFlags?: string;
    vc?: string;
    vcParam?: string[];
    ac?: string;
    acParam?: string[];
    rtmp?: boolean;
    rtmpApp?: string;
    mp4?: boolean;
    mp4Flags?: string;
}

interface RelayTaskConfig {
    app: string;
    name?: string;
    mode: string;
    edge: string;
    rtsp_transport?: string;
    appendName?: boolean;
}

interface FissionTaskConfig {
    rule: string;
    model: FissionTaskModel[];
}

interface FissionTaskModel {
    ab: string;
    vb: string;
    vs: string;
    vf: string;
}

declare class NodeMediaServer {
    constructor(config: Config);
    run(): void;
    on(eventName: string, listener: (id: string, StreamPath: string, args: object) => void): void;
    stop(): void;
    getSession(id: string): Map<string, unknown>;
}

export = NodeMediaServer;

Additional Details

  • Last updated: Tue, 07 Nov 2023 09:09:39 GMT
  • Dependencies: none

Credits

These definitions were written by Thomas Seberechts, and Chris Frewin.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/node-media-server

Weekly Downloads

401

Version

2.3.6

License

MIT

Unpacked Size

6.43 kB

Total Files

5

Last publish

Collaborators

  • types