methods/utils/media_sfu_request library

Extras in, raw out (mediasfu-request-extra-v1, Dec 2026).

extra on the room options sends a field the server supports before this SDK types it; raw on the results reads a reply field the same way. The server stays the authority that validates both: the SDK only passes them through, so an app can use a new server feature the day it ships, with no SDK update.

Constants

mediaSfuProtectedRequestKeys → const List<String>
Keys extra can never set: what the request is (action), who sends it (userName), which room it joins (meetingID), and the credentials, which travel in the Authorization header and never in the body.

Functions

mediaSfuExtraFrom(Map<String, dynamic> map, Set<String> known) → Map<String, dynamic>?
The fields of map that are not in known (and not protected), plus a nested extra map: what fromMap keeps as extra so no unknown field is dropped. Null when there are none.
withMediaSfuExtra(Map<String, dynamic> typed, Map<String, dynamic>? extra) → Map<String, dynamic>
The body to send: typed as given, plus each extra field that typed leaves unset (absent or null). Protected keys in extra are ignored.