Skip to content

Commit

Permalink
Set datachannel.binaryType = "arraybuffer" in connect() in WebRtcModule
Browse files Browse the repository at this point in the history
  • Loading branch information
minwidth0px authored Aug 11, 2024
1 parent 5c50ee8 commit 24e11c6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/webrtc/webrtc.mts
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ export class WebRtcModule implements Dispose.Dispose {
const open = new Async.Deferred<[WebRtcPeer, RTCDataChannel]>()
const peer = await this.#resolvePeer(await this.#resolveAddress(remoteAddress))
const datachannel = peer.connection.createDataChannel(port.toString(), { ordered: true, maxRetransmits: 16 })
datachannel.binaryType = "arraybuffer"
datachannel.addEventListener('open', () => {
peer.datachannels.add(datachannel)
open.resolve([peer, datachannel])
Expand Down

0 comments on commit 24e11c6

Please sign in to comment.