@abndnce/pulsar-client 0.0.1 → 0.0.3
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/index.mjs +2 -8
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -17,12 +17,7 @@ async function connectDirect(host, port) {
|
|
|
17
17
|
const pc = new RTCPeerConnection();
|
|
18
18
|
const keepalive = pc.createDataChannel("keepalive", { ordered: true });
|
|
19
19
|
const offer = await pc.createOffer();
|
|
20
|
-
|
|
21
|
-
if (mungedSdp === offer.sdp) throw new Error("SDP munging failed – could not replace ICE credentials");
|
|
22
|
-
await pc.setLocalDescription({
|
|
23
|
-
type: "offer",
|
|
24
|
-
sdp: mungedSdp
|
|
25
|
-
});
|
|
20
|
+
await pc.setLocalDescription(offer);
|
|
26
21
|
const remoteSdp = [
|
|
27
22
|
"v=0",
|
|
28
23
|
"o=- 111 222 IN IP4 0.0.0.0",
|
|
@@ -36,8 +31,7 @@ async function connectDirect(host, port) {
|
|
|
36
31
|
`a=fingerprint:sha-256 ${PULSAR_FINGERPRINT}`,
|
|
37
32
|
"a=setup:active",
|
|
38
33
|
"a=sctp-port:5000",
|
|
39
|
-
`a=candidate:1 1 UDP 2130706431 ${host} ${port} typ host
|
|
40
|
-
"a=end-of-candidates"
|
|
34
|
+
`a=candidate:1 1 UDP 2130706431 ${host} ${port} typ host`
|
|
41
35
|
].join("\r\n");
|
|
42
36
|
await pc.setRemoteDescription({
|
|
43
37
|
type: "answer",
|