Skip to content

feat: allow setting custom WebRTC field trials on PeerConnectionFactory - #284

Merged
devopvoid merged 1 commit into
mainfrom
feature/216-field-trials
Sep 13, 2026
Merged

feat: allow setting custom WebRTC field trials on PeerConnectionFactory#284
devopvoid merged 1 commit into
mainfrom
feature/216-field-trials

Conversation

@devopvoid

Copy link
Copy Markdown
Owner

Summary

  • Add PeerConnectionFactory constructor overloads accepting a Map<String, String> of field trials, forwarded to the native factory as a webrtc::FieldTrialsView so callers can enable experimental WebRTC features (e.g. message interleaving) without touching native code.
  • Add a small jni::FieldTrialsView (native, include/api/FieldTrialsView.h + src/api/FieldTrialsView.cpp) backed directly by the passed-in map, since webrtc::FieldTrials (api/field_trials.h) isn't linked into the webrtc archive for every build configuration of this project.
  • Add a docs page (docs/guide/advanced/field-trials.md) and tests covering valid, empty, and invalid field trial maps.

Resolves #216

Test plan

  • mvn -pl webrtc-jni package -DskipTests — native build succeeds and links
  • mvn -pl webrtc test -Dtest=PeerConnectionFactoryTests — 16/16 pass
  • mvn -pl webrtc test (full module suite) — 148/148 pass

Add PeerConnectionFactory constructor overloads that accept a
Map<String, String> of field trials, forwarded to the native factory as
a FieldTrialsView so callers can enable experimental WebRTC features
(e.g. message interleaving) without touching native code.

webrtc::FieldTrials (api/field_trials.h) isn't used on the native side
because its translation unit isn't linked into the webrtc archive for
every build configuration of this project; a small FieldTrialsView
backed directly by the passed-in map avoids that dependency.

Resolves #216
@devopvoid devopvoid changed the title Allow setting custom WebRTC field trials on PeerConnectionFactory feat: allow setting custom WebRTC field trials on PeerConnectionFactory Sep 13, 2026
@devopvoid
devopvoid merged commit dda69be into main Sep 13, 2026
11 checks passed
@devopvoid
devopvoid deleted the feature/216-field-trials branch September 13, 2026 22:44
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.

Allow setting field trials

1 participant