Skip to content

Commit 20b0b64

Browse files
committed
add qop in auth, export and fix a couple of types, bump node types version
1 parent 248bffd commit 20b0b64

23 files changed

Lines changed: 2230 additions & 2663 deletions

dist/ONVIFClient.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/RTSPClient.d.ts

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
/// <reference types="node" />
33
/// <reference types="node" />
44
/// <reference types="node" />
5+
/// <reference types="node" />
6+
/// <reference types="node" />
57
import * as net from "net";
68
import * as tls from "tls";
79
type SocketUnion = net.Socket | tls.TLSSocket;
@@ -16,12 +18,19 @@ declare enum ReadStates {
1618
READING_RAW_PACKET_SIZE = 3,
1719
READING_RAW_PACKET = 4
1820
}
19-
type Connection = "udp" | "tcp";
21+
export type Connection = "udp" | "tcp";
22+
export type ConnectOptions = {
23+
keepAlive: boolean;
24+
connection?: Connection;
25+
secure?: boolean;
26+
};
2027
type AuthOptions = {
2128
type: "Digest" | "Basic";
2229
realm?: string;
2330
nonce?: string;
2431
algorithm?: "MD5" | "SHA-256";
32+
qop?: "auth" | "auth-int";
33+
nc?: number;
2534
};
2635
type Headers = {
2736
[key: string]: string | number | undefined;
@@ -32,7 +41,7 @@ type Headers = {
3241
Transport?: string;
3342
Unsupported?: string;
3443
};
35-
type Detail = {
44+
export type Detail = {
3645
codec: string;
3746
mediaSource: ({
3847
type: string;
@@ -80,11 +89,7 @@ export default class RTSPClient extends EventEmitter {
8089
[key: string]: string;
8190
});
8291
_netConnect(hostname: string, port: number, secure?: boolean): Promise<this>;
83-
connect(url: string, { keepAlive, connection, secure, }?: {
84-
keepAlive: boolean;
85-
connection?: Connection;
86-
secure: boolean;
87-
}): Promise<Detail[]>;
92+
connect(url: string, { keepAlive, connection, secure }?: ConnectOptions): Promise<Detail[]>;
8893
request(requestName: string, headersParam?: Headers, url?: string): Promise<{
8994
headers: Headers;
9095
mediaHeaders?: string[];

dist/RTSPClient.js

Lines changed: 35 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/RTSPClient.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)