@types/node-media-server
@types/node-media-server
npm i @types/node-media-server
@types/node-media-server

@types/node-media-server

The repository for high quality TypeScript type definitions.

by DefinitelyTyped

2.3.1 (see all)License:MITTypeScript:Built-In
npm i @types/node-media-server
Readme

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.

Downloads/wk

295

GitHub Stars

41K

LAST COMMIT

7mos ago

MAINTAINERS

1

CONTRIBUTORS

17,572

OPEN ISSUES

637

OPEN PRs

221
VersionTagPublished
2.3.1
latest
9mos ago
2.3.1
ts4.7
9mos ago
2.3.1
ts4.6
9mos ago
2.3.1
ts4.8
9mos ago
No alternatives found
No tutorials found
Add a tutorial

Rate & Review

100
No reviews found
Be the first to rate