Skip to content

feat: add typed libdatachannel extensions#18

Merged
mertushka merged 5 commits into
mainfrom
feat/libdatachannel-extensions
Jun 15, 2026
Merged

feat: add typed libdatachannel extensions#18
mertushka merged 5 commits into
mainfrom
feat/libdatachannel-extensions

Conversation

@mertushka

Copy link
Copy Markdown
Owner

Purpose

Expose a narrow typed nonstandard surface for libdatachannel capabilities while preserving the existing W3C-facing RTCPeerConnection, RTCDataChannel, and setLocalDescription() behavior.

Changes

  • add a GC-safe nonstandard.IceUdpMuxListener backed by rtc::IceUdpMuxListener
  • add pre-construction peer options for UDP mux, fingerprint verification, and maximum message size
  • add explicit initial local ICE credentials through rtc::LocalDescriptionInit
  • expose the observed remote certificate fingerprint
  • add validated PEM certificate/private-key import without exposing key material on RTCCertificate
  • update TypeScript declarations, API/native checks, focused tests, and technical documentation

Behavior impact

The standard WebRTC facade remains unchanged unless a nonstandard extension is explicitly used. Fingerprint verification stays enabled by default. Explicit ICE credentials preserve browser-shaped local description, signaling, gathering, and event timing until standard setLocalDescription() is called.

Native impact

The addon remains Node-API-only. UDP mux callbacks are delivered through a Napi::ThreadSafeFunction; repeated close, garbage collection, late queued callbacks, and environment shutdown are handled explicitly.

WPT and browser impact

No WPT selection or expected result classification changes. Local validation passed:

  • npm run check
  • npm run native:check
  • npm run build
  • npm test (63/63)
  • npm run api:check
  • npm run types:check
  • npm run pack:check
  • npm run wpt:selection:check
  • npm run wpt:smoke and npm run wpt:smoke:check (4/4, no retries)
  • targeted offer/answer/local-description/certificate WPT (12/12, no retries)
  • npm run e2e:chrome (12/12 scenarios)

The full selected WPT suite is delegated to the branch Conformance workflow.

@mertushka mertushka marked this pull request as ready for review June 15, 2026 22:40
@mertushka mertushka merged commit fb618cc into main Jun 15, 2026
30 checks passed
@mertushka mertushka deleted the feat/libdatachannel-extensions branch June 15, 2026 22:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant