Skip to content

Commit

Permalink
allow giving storageId for peer
Browse files Browse the repository at this point in the history
  • Loading branch information
timephy committed Aug 14, 2024
1 parent cfa82fa commit 88dd522
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/tui-components-svelte/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@timephy/tui-components-svelte",
"version": "0.0.9",
"version": "0.0.10",
"description": "",
"homepage": "https://github.com/timephy/tui/tree/main/tui-components-svelte#readme",
"scripts": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@ export abstract class MeshCall extends Call {
public override readonly peers: Map<PeerId, Peer> = new SvelteMap()
private readonly peerSubscriptions: Map<PeerId, Subscription[]> = new Map()

protected override async receiveAddPeer({ peerId, offer }: AddPeer) {
protected override async receiveAddPeer({
peerId,
offer,
storageId = null,
}: AddPeer & { storageId?: string | null }) {
this.DEBUG("receiveAddPeer", peerId, "offer", offer)

let peer = this.peers.get(peerId)
Expand All @@ -65,7 +69,7 @@ export abstract class MeshCall extends Call {
this.signalSessionDescription(peerId, sessionDescription),
signalIceCandidate: (iceCandidate: RTCIceCandidate) =>
this.signalIceCandidate(peerId, iceCandidate),
storageId: peerId,
storageId,
},
peerId,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ export class Peer extends PeerConnection implements Display {
this._audioPipeline.gain = value

if (this.options.storageId !== null) {
console.log(this.options.storageId)
LS_PEER_GAINS.value = LS_PEER_GAINS.value.set(this.options.storageId, value)
}
}
Expand Down

0 comments on commit 88dd522

Please sign in to comment.