feat: add setter and getter apis to specify udp port range for webrtc (#39046)
* feat:Add setter and getter apis to specify udp port range for webrtc (issue#9042) * lint error fix for PR#39046 * feat: add setter and getter apis to specify udp port range for webrtc (issue#9042) , changed for codereview * fix lint error * fix lint errors in file api-web-contents-spec.ts * feat: add setter and getter apis to specify udp port range for webrtc (issue#9042) , changed for review from itsananderson * feat: add setter and getter apis to specify udp port range for webrtc (issue#9042) , changed for review from jkleinsc * fix lint error * feat: add setter and getter apis to specify udp port range for webrtc (issue#9042) , changed for review from codebyter
This commit is contained in:
parent
33000c4b42
commit
e14964ccd0
4 changed files with 109 additions and 0 deletions
|
@ -2069,6 +2069,24 @@ Setting the WebRTC IP handling policy allows you to control which IPs are
|
|||
exposed via WebRTC. See [BrowserLeaks](https://browserleaks.com/webrtc) for
|
||||
more details.
|
||||
|
||||
#### `contents.getWebRTCUDPPortRange()`
|
||||
|
||||
Returns `Object`:
|
||||
|
||||
* `min` Integer - The minimum UDP port number that WebRTC should use.
|
||||
* `max` Integer - The maximum UDP port number that WebRTC should use.
|
||||
|
||||
By default this value is `{ min: 0, max: 0 }` , which would apply no restriction on the udp port range.
|
||||
|
||||
#### `contents.setWebRTCUDPPortRange(udpPortRange)`
|
||||
|
||||
* `udpPortRange` Object
|
||||
* `min` Integer - The minimum UDP port number that WebRTC should use.
|
||||
* `max` Integer - The maximum UDP port number that WebRTC should use.
|
||||
|
||||
Setting the WebRTC UDP Port Range allows you to restrict the udp port range used by WebRTC. By default the port range is unrestricted.
|
||||
**Note:** To reset to an unrestricted port range this value should be set to `{ min: 0, max: 0 }`.
|
||||
|
||||
#### `contents.getMediaSourceId(requestWebContents)`
|
||||
|
||||
* `requestWebContents` WebContents - Web contents that the id will be registered to.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue