API
createConfig
A function to create config for useWebRTC
hook.
createConfig
provides useful default settings for options you may not configure yourself.
As we continuously update the internal logic and configuration options, using this function
will generally ensure that you stay up-to-date with the latest features without needing to
make any manual updates.
- The URL of the function to be used in the configuration.
- Either
functionURL
orofferURL
is required. Otherwise,createConfig
will throw an error.
- Optional URL for local testing. If both
functionURL
andofferURL
are provided,functionURL
takes precedence. - Either
functionURL
orofferURL
is required. Otherwise,createConfig
will throw an error.
- Optional device ID for the selected audio input device.
- Optional device ID for the selected video input device.
- Optional media track constraints for capturing audio.
- Optional media track constraints for capturing video.
- Optional codec for audio, defaults to
"PCMU/8000"
if not provided.
- Optional codec for video.
- Optional transformation type for video processing.
- Optional configuration options for the RTC data channel.
Was this page helpful?