Skip to content

Commit 0ec885e

Browse files
committed
webrtc options expose. expose loki
1 parent bd3d5c6 commit 0ec885e

4 files changed

Lines changed: 16 additions & 5 deletions

File tree

examples/test-topics-service.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ async function main(){
2323
let config = new Dataparty.Config.MemoryConfig({
2424
basePath:'demo',
2525
cloud: {
26-
uri: 'http://10.36.158.251:4000'
26+
uri: 'http://10.36.158.252:4000'
2727
}
2828
})
2929

@@ -35,7 +35,7 @@ async function main(){
3535

3636
let party = new Dataparty.PeerParty({
3737
comms: new Dataparty.Comms.WebsocketComms({
38-
uri:'ws://10.36.158.251:4000/ws',
38+
uri:'ws://10.36.158.252:4000/ws',
3939
discoverRemoteIdentity: false,
4040
remoteIdentity: remoteIdentity,
4141
session: Math.random().toString(36).slice(2)

src/bouncer/db/loki-db.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,18 @@ module.exports = class LokiDb extends IDb {
3838
this.useUuid = (useUuid==undefined) ? true : useUuid
3939
}
4040

41+
static get Loki(){
42+
return Loki
43+
}
44+
4145
static get LokiLocalStorageAdapter(){
4246
return Loki.LokiLocalStorageAdapter
4347
}
4448

49+
static get LokiMemoryAdapter(){
50+
return Loki.LokiMemoryAdapter
51+
}
52+
4553

4654
async start(){
4755

src/comms/rtc-socket-comms.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ const PeerComms = require('./peer-comms')
1111
* @see https://en.wikipedia.org/wiki/WebRTC
1212
*/
1313
class RTCSocketComms extends PeerComms {
14-
constructor({remoteIdentity, host, party, wrtc, trickle = false, ...options}){
14+
constructor({remoteIdentity, host, party, rtcOptions, trickle = false, ...options}){
1515
super({remoteIdentity, host, party, ...options})
1616

1717
this.rtcSettings = {
18-
wrtc,
1918
trickle,
20-
initiator: host
19+
initiator: host,
20+
...rtcOptions
2121
}
2222
}
2323

src/party/local/loki-party.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ class LokiParty extends IParty {
5757
await this.db.start()
5858
}
5959

60+
static get Loki(){
61+
return LokiDb.Loki
62+
}
6063

6164
/**
6265
* @method module:Party.LokiParty.handleCall

0 commit comments

Comments
 (0)