@types/node-media-server 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) Microsoft Corporation.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE
@@ -0,0 +1,122 @@
1
+ # Installation
2
+ > `npm install --save @types/node-media-server`
3
+
4
+ # Summary
5
+ This package contains type definitions for node-media-server (https://github.com/illuspas/Node-Media-Server).
6
+
7
+ # Details
8
+ Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node-media-server.
9
+ ## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node-media-server/index.d.ts)
10
+ ````ts
11
+ // Type definitions for node-media-server 2.3
12
+ // Project: https://github.com/illuspas/Node-Media-Server
13
+ // Definitions by: Thomas Seberechts <https://github.com/Tseberechts>
14
+ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
15
+
16
+ interface Config {
17
+ logType?: number;
18
+ rtmp?: RtmpConfig;
19
+ http?: HttpConfig;
20
+ https?: SslConfig;
21
+ trans?: TransConfig;
22
+ relay?: RelayConfig;
23
+ fission?: FissionConfig;
24
+ auth?: AuthConfig;
25
+ }
26
+
27
+ interface RtmpConfig {
28
+ port?: number;
29
+ ssl?: SslConfig;
30
+ chunk_size?: number;
31
+ gop_cache?: boolean;
32
+ ping?: number;
33
+ ping_timeout?: number;
34
+ }
35
+
36
+ interface SslConfig {
37
+ key: string;
38
+ cert: string;
39
+ port?: number;
40
+ }
41
+
42
+ interface HttpConfig {
43
+ port?: number;
44
+ allow_origin?: string;
45
+ }
46
+
47
+ interface AuthConfig {
48
+ play?: boolean;
49
+ publish?: boolean;
50
+ secret?: string;
51
+ }
52
+
53
+ interface TransConfig {
54
+ ffmpeg: string;
55
+ tasks: [TransTaskConfig];
56
+ }
57
+
58
+ interface RelayConfig {
59
+ tasks: [RelayTaskConfig];
60
+ ffmpeg: string;
61
+ }
62
+
63
+ interface FissionConfig {
64
+ ffmpeg: string;
65
+ tasks: [FissionTaskConfig];
66
+ }
67
+
68
+ interface TransTaskConfig {
69
+ app: string;
70
+ hls?: boolean;
71
+ hlsFlags?: string;
72
+ dash?: true;
73
+ dashFlags?: string;
74
+ vc?: string;
75
+ vcParam?: [string];
76
+ ac?: string;
77
+ acParam?: [string];
78
+ rtmp?: boolean;
79
+ rtmpApp?: string;
80
+ mp4?: boolean;
81
+ mp4Flags?: string;
82
+ }
83
+
84
+ interface RelayTaskConfig {
85
+ app: string;
86
+ name?: string;
87
+ mode: string;
88
+ edge: string;
89
+ rtsp_transport?: string;
90
+ }
91
+
92
+ interface FissionTaskConfig {
93
+ rule: string;
94
+ model: [FissionTaskModel];
95
+ }
96
+
97
+ interface FissionTaskModel {
98
+ ab: string;
99
+ vb: string;
100
+ vs: string;
101
+ vf: string;
102
+ }
103
+
104
+ declare class NodeMediaServer {
105
+ constructor(config: Config);
106
+ run(): void;
107
+ on(eventName: string, listener: (id: string, StreamPath: string, args: object) => void): void;
108
+ stop(): void;
109
+ getSession(id: string): Map<string, unknown>;
110
+ }
111
+
112
+ export = NodeMediaServer;
113
+
114
+ ````
115
+
116
+ ### Additional Details
117
+ * Last updated: Tue, 07 Dec 2021 18:31:01 GMT
118
+ * Dependencies: none
119
+ * Global values: none
120
+
121
+ # Credits
122
+ These definitions were written by [Thomas Seberechts](https://github.com/Tseberechts).
@@ -0,0 +1,102 @@
1
+ // Type definitions for node-media-server 2.3
2
+ // Project: https://github.com/illuspas/Node-Media-Server
3
+ // Definitions by: Thomas Seberechts <https://github.com/Tseberechts>
4
+ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
5
+
6
+ interface Config {
7
+ logType?: number;
8
+ rtmp?: RtmpConfig;
9
+ http?: HttpConfig;
10
+ https?: SslConfig;
11
+ trans?: TransConfig;
12
+ relay?: RelayConfig;
13
+ fission?: FissionConfig;
14
+ auth?: AuthConfig;
15
+ }
16
+
17
+ interface RtmpConfig {
18
+ port?: number;
19
+ ssl?: SslConfig;
20
+ chunk_size?: number;
21
+ gop_cache?: boolean;
22
+ ping?: number;
23
+ ping_timeout?: number;
24
+ }
25
+
26
+ interface SslConfig {
27
+ key: string;
28
+ cert: string;
29
+ port?: number;
30
+ }
31
+
32
+ interface HttpConfig {
33
+ port?: number;
34
+ allow_origin?: string;
35
+ }
36
+
37
+ interface AuthConfig {
38
+ play?: boolean;
39
+ publish?: boolean;
40
+ secret?: string;
41
+ }
42
+
43
+ interface TransConfig {
44
+ ffmpeg: string;
45
+ tasks: [TransTaskConfig];
46
+ }
47
+
48
+ interface RelayConfig {
49
+ tasks: [RelayTaskConfig];
50
+ ffmpeg: string;
51
+ }
52
+
53
+ interface FissionConfig {
54
+ ffmpeg: string;
55
+ tasks: [FissionTaskConfig];
56
+ }
57
+
58
+ interface TransTaskConfig {
59
+ app: string;
60
+ hls?: boolean;
61
+ hlsFlags?: string;
62
+ dash?: true;
63
+ dashFlags?: string;
64
+ vc?: string;
65
+ vcParam?: [string];
66
+ ac?: string;
67
+ acParam?: [string];
68
+ rtmp?: boolean;
69
+ rtmpApp?: string;
70
+ mp4?: boolean;
71
+ mp4Flags?: string;
72
+ }
73
+
74
+ interface RelayTaskConfig {
75
+ app: string;
76
+ name?: string;
77
+ mode: string;
78
+ edge: string;
79
+ rtsp_transport?: string;
80
+ }
81
+
82
+ interface FissionTaskConfig {
83
+ rule: string;
84
+ model: [FissionTaskModel];
85
+ }
86
+
87
+ interface FissionTaskModel {
88
+ ab: string;
89
+ vb: string;
90
+ vs: string;
91
+ vf: string;
92
+ }
93
+
94
+ declare class NodeMediaServer {
95
+ constructor(config: Config);
96
+ run(): void;
97
+ on(eventName: string, listener: (id: string, StreamPath: string, args: object) => void): void;
98
+ stop(): void;
99
+ getSession(id: string): Map<string, unknown>;
100
+ }
101
+
102
+ export = NodeMediaServer;
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "@types/node-media-server",
3
+ "version": "2.3.0",
4
+ "description": "TypeScript definitions for node-media-server",
5
+ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node-media-server",
6
+ "license": "MIT",
7
+ "contributors": [
8
+ {
9
+ "name": "Thomas Seberechts",
10
+ "url": "https://github.com/Tseberechts",
11
+ "githubUsername": "Tseberechts"
12
+ }
13
+ ],
14
+ "main": "",
15
+ "types": "index.d.ts",
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
19
+ "directory": "types/node-media-server"
20
+ },
21
+ "scripts": {},
22
+ "dependencies": {},
23
+ "typesPublisherContentHash": "db91a71337d62cd00d11aef480e905521d9749d79475449faf1ba939f426f11a",
24
+ "typeScriptVersion": "3.8"
25
+ }