@abraca/dabra 1.0.6 → 1.0.8
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/abracadabra-provider.cjs +3 -1
- package/dist/abracadabra-provider.cjs.map +1 -1
- package/dist/abracadabra-provider.esm.js +3 -1
- package/dist/abracadabra-provider.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/webrtc/AbracadabraWebRTC.ts +2 -1
- package/src/webrtc/ManualSignaling.ts +3 -0
package/package.json
CHANGED
|
@@ -102,7 +102,8 @@ export class AbracadabraWebRTC extends EventEmitter {
|
|
|
102
102
|
"";
|
|
103
103
|
const httpUrl = wsUrl
|
|
104
104
|
.replace(/^wss:/, "https:")
|
|
105
|
-
.replace(/^ws:/, "http:")
|
|
105
|
+
.replace(/^ws:/, "http:")
|
|
106
|
+
.replace(/\/ws\/?$/, "");
|
|
106
107
|
|
|
107
108
|
return new AbracadabraWebRTC({
|
|
108
109
|
docId: config.name,
|
|
@@ -50,6 +50,8 @@ export class ManualSignaling extends EventEmitter {
|
|
|
50
50
|
*/
|
|
51
51
|
async createOfferBlob(): Promise<ManualSignalingBlob> {
|
|
52
52
|
this.pc = new RTCPeerConnection({ iceServers: this.iceServers });
|
|
53
|
+
// A data channel is required for ICE gathering to produce candidates.
|
|
54
|
+
this.pc.createDataChannel("manual-signaling");
|
|
53
55
|
|
|
54
56
|
const candidates: string[] = [];
|
|
55
57
|
const gatheringComplete = new Promise<void>((resolve) => {
|
|
@@ -84,6 +86,7 @@ export class ManualSignaling extends EventEmitter {
|
|
|
84
86
|
*/
|
|
85
87
|
async acceptOffer(offerBlob: ManualSignalingBlob): Promise<ManualSignalingBlob> {
|
|
86
88
|
this.pc = new RTCPeerConnection({ iceServers: this.iceServers });
|
|
89
|
+
this.pc.createDataChannel("manual-signaling");
|
|
87
90
|
|
|
88
91
|
const candidates: string[] = [];
|
|
89
92
|
const gatheringComplete = new Promise<void>((resolve) => {
|