@hytopia.com/server-protocol 1.3.54 → 1.3.55
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/package.json +1 -1
- package/schemas/Connection.ts +8 -6
package/package.json
CHANGED
package/schemas/Connection.ts
CHANGED
|
@@ -10,7 +10,7 @@ type WrtcConnectAck = {
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
type WrtcDataChannel = {
|
|
13
|
-
i
|
|
13
|
+
i?: string; // data channel id
|
|
14
14
|
di: string; // data producer id
|
|
15
15
|
l: string; // label
|
|
16
16
|
s: mediasoup.types.SctpStreamParameters; // sctp stream parameters
|
|
@@ -22,9 +22,10 @@ type WrtcProduceDataAck = {
|
|
|
22
22
|
|
|
23
23
|
type WrtcTransport = {
|
|
24
24
|
i: string; // transport id
|
|
25
|
-
|
|
26
|
-
ic: mediasoup.types.IceCandidate[]; // ice candidates
|
|
25
|
+
f: 'cs' | 'sc'; // data flow (cs: client -> server | sc: server -> client)
|
|
27
26
|
d: mediasoup.types.DtlsParameters; // dtls parameters
|
|
27
|
+
ic: mediasoup.types.IceCandidate[]; // ice candidates
|
|
28
|
+
ip: mediasoup.types.IceParameters; // ice parameters
|
|
28
29
|
s: mediasoup.types.SctpParameters; // sctp parameters
|
|
29
30
|
}
|
|
30
31
|
|
|
@@ -139,12 +140,13 @@ const wrtcTransportSchema: JSONSchemaType<WrtcTransport> = {
|
|
|
139
140
|
type: 'object',
|
|
140
141
|
properties: {
|
|
141
142
|
i: { type: 'string' },
|
|
143
|
+
f: { type: 'string', enum: [ 'cs', 'sc' ] },
|
|
142
144
|
ip: wrtcIceParametersSchema,
|
|
143
145
|
ic: { type: 'array', items: wrtcIceCandidateSchema },
|
|
144
146
|
d: wrtcDtlsParametersSchema,
|
|
145
147
|
s: wrtcSctpParametersSchema,
|
|
146
148
|
},
|
|
147
|
-
required: [ 'i', 'ip', 'ic', 'd', 's' ],
|
|
149
|
+
required: [ 'i', 'f', 'ip', 'ic', 'd', 's' ],
|
|
148
150
|
additionalProperties: false,
|
|
149
151
|
};
|
|
150
152
|
|
|
@@ -161,12 +163,12 @@ const wrtcTransportConnectSchema: JSONSchemaType<WrtcTransportConnect> = {
|
|
|
161
163
|
const wrtcDataChannelSchema: JSONSchemaType<WrtcDataChannel> = {
|
|
162
164
|
type: 'object',
|
|
163
165
|
properties: {
|
|
164
|
-
i: { type: 'string' },
|
|
166
|
+
i: { type: 'string', nullable: true },
|
|
165
167
|
di: { type: 'string' },
|
|
166
168
|
l: { type: 'string' },
|
|
167
169
|
s: wrtcSctpStreamParametersSchema,
|
|
168
170
|
},
|
|
169
|
-
required: [ '
|
|
171
|
+
required: [ 'di', 'l', 's' ],
|
|
170
172
|
additionalProperties: false,
|
|
171
173
|
};
|
|
172
174
|
|