2.3.6 • Published 6 months ago

@types/node-media-server v2.3.6

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

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

// Type definitions for node-media-server 2.3
// Project: https://github.com/illuspas/Node-Media-Server
// Definitions by: Thomas Seberechts <https://github.com/Tseberechts>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

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?: true;
    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;
}

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: Fri, 31 Dec 2021 22:01:35 GMT
  • Dependencies: none
  • Global values: none

Credits

These definitions were written by Thomas Seberechts.

2.3.6

6 months ago

2.3.5

7 months ago

2.3.4

1 year ago

2.3.2

2 years ago

2.3.3

2 years ago

2.3.1

2 years ago

2.3.0

2 years ago