You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue:
When using the sendMessageBinary method with a ArrayBuffer, a TypeError: Buffer expected is thrown, even though a Buffer is passed to the method. This issue seems specific to Bun, with using Node it works flawless.
Environment:
Issue:
When using the
sendMessageBinary
method with aArrayBuffer
, aTypeError: Buffer expected
is thrown, even though aBuffer
is passed to the method. This issue seems specific to Bun, with using Node it works flawless.Expected Behavior:
node-datachannel/src/cpp/data-channel-wrapper.cpp
Line 193 in d5b82ef
This condition would pass successfully.
Workaround:
node-datachannel/src/polyfill/RTCDataChannel.ts
Line 180 in d5b82ef
Using
Buffer.from(new Uint8Array(data))
resolves the issue.Additional Context:
The problem seems to stem from how the method checks for
Buffer
in the C++ code (TrackWrapper::sendMessageBinary
).The text was updated successfully, but these errors were encountered: