@agentdance/node-webrtc-sdp 1.0.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.
- package/dist/helpers.d.ts +9 -0
- package/dist/helpers.d.ts.map +1 -0
- package/dist/helpers.js +151 -0
- package/dist/helpers.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -0
- package/dist/parser.d.ts +8 -0
- package/dist/parser.d.ts.map +1 -0
- package/dist/parser.js +434 -0
- package/dist/parser.js.map +1 -0
- package/dist/serializer.d.ts +4 -0
- package/dist/serializer.d.ts.map +1 -0
- package/dist/serializer.js +158 -0
- package/dist/serializer.js.map +1 -0
- package/dist/types.d.ts +123 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/package.json +55 -0
- package/src/helpers.ts +176 -0
- package/src/index.ts +24 -0
- package/src/parser.ts +476 -0
- package/src/serializer.ts +197 -0
- package/src/types.ts +138 -0
package/src/types.ts
ADDED
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
export interface SessionDescription {
|
|
2
|
+
version: number;
|
|
3
|
+
origin: Origin;
|
|
4
|
+
sessionName: string;
|
|
5
|
+
timing: Timing;
|
|
6
|
+
groups: Group[];
|
|
7
|
+
msidSemantic?: string;
|
|
8
|
+
mediaDescriptions: MediaDescription[];
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface Origin {
|
|
12
|
+
username: string;
|
|
13
|
+
sessionId: string;
|
|
14
|
+
sessionVersion: number;
|
|
15
|
+
networkType: string;
|
|
16
|
+
addressType: string;
|
|
17
|
+
unicastAddress: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface Timing {
|
|
21
|
+
startTime: number;
|
|
22
|
+
stopTime: number;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface Group {
|
|
26
|
+
semantic: string;
|
|
27
|
+
mids: string[];
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface MediaDescription {
|
|
31
|
+
type: string;
|
|
32
|
+
port: number;
|
|
33
|
+
protocol: string;
|
|
34
|
+
payloadTypes: number[];
|
|
35
|
+
connection?: Connection;
|
|
36
|
+
bandwidth?: Bandwidth;
|
|
37
|
+
rtpMaps: RtpMap[];
|
|
38
|
+
fmtps: Fmtp[];
|
|
39
|
+
rtcpFbs: RtcpFb[];
|
|
40
|
+
candidates: IceCandidate[];
|
|
41
|
+
iceUfrag?: string;
|
|
42
|
+
icePwd?: string;
|
|
43
|
+
iceOptions?: string;
|
|
44
|
+
iceGatheringState?: string;
|
|
45
|
+
fingerprint?: Fingerprint;
|
|
46
|
+
setup?: string;
|
|
47
|
+
mid?: string;
|
|
48
|
+
direction?: Direction;
|
|
49
|
+
rtcp?: RtcpAttr;
|
|
50
|
+
rtcpMux?: boolean;
|
|
51
|
+
rtcpRsize?: boolean;
|
|
52
|
+
ssrcs: Ssrc[];
|
|
53
|
+
ssrcGroups: SsrcGroup[];
|
|
54
|
+
msid?: string;
|
|
55
|
+
extmaps: Extmap[];
|
|
56
|
+
sctpPort?: number;
|
|
57
|
+
maxMessageSize?: number;
|
|
58
|
+
endOfCandidates?: boolean;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export type Direction = 'sendrecv' | 'sendonly' | 'recvonly' | 'inactive';
|
|
62
|
+
|
|
63
|
+
export interface RtpMap {
|
|
64
|
+
payloadType: number;
|
|
65
|
+
encoding: string;
|
|
66
|
+
clockRate: number;
|
|
67
|
+
encodingParams?: string;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export interface Fmtp {
|
|
71
|
+
payloadType: number;
|
|
72
|
+
parameters: string;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export interface RtcpFb {
|
|
76
|
+
payloadType: number;
|
|
77
|
+
type: string;
|
|
78
|
+
parameter?: string;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export interface IceCandidate {
|
|
82
|
+
foundation: string;
|
|
83
|
+
component: number;
|
|
84
|
+
transport: string;
|
|
85
|
+
priority: number;
|
|
86
|
+
address: string;
|
|
87
|
+
port: number;
|
|
88
|
+
type: string;
|
|
89
|
+
relatedAddress?: string;
|
|
90
|
+
relatedPort?: number;
|
|
91
|
+
tcpType?: string;
|
|
92
|
+
generation?: number;
|
|
93
|
+
ufrag?: string;
|
|
94
|
+
networkId?: number;
|
|
95
|
+
networkCost?: number;
|
|
96
|
+
extensions?: Record<string, string>;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export interface Fingerprint {
|
|
100
|
+
algorithm: string;
|
|
101
|
+
value: string;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export interface Connection {
|
|
105
|
+
networkType: string;
|
|
106
|
+
addressType: string;
|
|
107
|
+
address: string;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export interface Bandwidth {
|
|
111
|
+
type: string;
|
|
112
|
+
bandwidth: number;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export interface Ssrc {
|
|
116
|
+
id: number;
|
|
117
|
+
attribute: string;
|
|
118
|
+
value?: string;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export interface SsrcGroup {
|
|
122
|
+
semantic: string;
|
|
123
|
+
ssrcIds: number[];
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export interface Extmap {
|
|
127
|
+
id: number;
|
|
128
|
+
direction?: string;
|
|
129
|
+
uri: string;
|
|
130
|
+
attributes?: string;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export interface RtcpAttr {
|
|
134
|
+
port: number;
|
|
135
|
+
networkType?: string;
|
|
136
|
+
addressType?: string;
|
|
137
|
+
address?: string;
|
|
138
|
+
}
|