-
Notifications
You must be signed in to change notification settings - Fork 16
Conversation
src/sdp.ts
Outdated
@@ -6,7 +6,7 @@ import { bases } from 'multiformats/basics'; | |||
|
|||
const log = logger('libp2p:webrtc:sdp'); | |||
|
|||
const mbdecoder = (function () { | |||
export const mbdecoder = (function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why's this exported?
@@ -44,7 +45,7 @@ export class WebRTCStream implements Stream { | |||
metadata: Record<string, any>; | |||
private readonly channel: RTCDataChannel; | |||
|
|||
source: Source<Uint8ArrayList> = pushable(); | |||
_src: Source<Uint8ArrayList> = pushable(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do I misremember "source" being part of the interface or has the interface changed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, we just use a getter/setter pattern for accessing source
.
@@ -168,6 +179,9 @@ export class WebRTCStream implements Stream { | |||
this.readClosed = true; | |||
this.writeClosed = true; | |||
this.channel.close(); | |||
if (this.closeCb) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to think for a second about what cb might stand for. Perhaps the name could be more verbose.
src/options.ts
Outdated
@@ -6,5 +6,4 @@ export interface WebRTCListenerOptions extends CreateListenerOptions { | |||
// channelOptions?: WebRTCReceiverInit | |||
} | |||
|
|||
export interface WebRTCDialOptions extends DialOptions { | |||
} | |||
export interface WebRTCDialOptions extends DialOptions {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't there be something here specifying your upgrader as the default one?
🎉 This PR is included in version 1.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
We use the new Upgrader interface to use in-built encryption and multiplexing of a WebRTC connection.