Once WebRTC is enabled for an application, you can tune its behavior with properties in the application's Application.xml file. Properties in the <WebRTC> container control STUN and TURN servers, WebSocket signaling, WHIP and WHEP bearer tokens, simulcast and rendition selection, RTP retransmission (RTX), NACK feedback, FIR messaging, PLI intervals, transport-wide congestion control, codec updates, and session idle timeout. Properties in the <RTP> container control the jitter buffer used to recover out-of-order and retransmitted packets, packet loss logging, and the H.264 constraints advertised in the SDP. To enable them in your app's configuration file, open [install-dir]/conf/[app-name]/Application.xml.
All of these properties are optional — WebRTC works with the defaults. Add only the ones you need.
WebRTC element properties
In the <WebRTC>/<Properties> container, add any of these properties (Name, Type, Value) in the following format:
<Property> <Name>...</Name> <Value>...</Value> <Type>...</Type> </Property>
| Name | Type | Description |
|---|---|---|
harvestStunServer |
String | The address of the STUN server. |
harvestTurnRelay |
String | The TURN relay server, in the following format: turn:host:port. You can configure the TURN relay server to use UDP, TCP or TLS based on the value provided.
|
harvestTurnRelayUsername |
String | The username for the TURN server. |
harvestTurnRelayPassword |
String | The password for the TURN server. |
webrtcEnableWebSocket |
Boolean | Set to false to turn off WebSocket signaling. (Default: true, so upgraded applications keep WebSocket signaling.) |
webrtcWhipBearerToken |
String | The WHIP bearer token. |
webrtcWhepBearerToken |
String | The WHEP bearer token. |
webrtcCodecUpdates |
Boolean | Allow codec updates to pass through. Can cause frequent onCodecInfoVideo calls on IMediaStreamActionNotify3, depending on the source encoder. (Default: true) |
webrtcFIRMessageScheme |
String | FIR interval scheme: time (default) or frame. FIR messages are enabled by default and add resiliency to packet loss while publishing. |
webrtcFIRMessageInterval |
Integer | Interval between FIR messages, in milliseconds with time and in frames with frame. Must be between 1 and 60000. (Default: 1000) |
webrtcIdleTimeout |
Integer | Milliseconds before a session closes with no publish/playback activity. Must be between 1000 and 3600000. Default and recommended: 10000. |
WebRTC element example
<WebRTC>
<!-- Enable WebRTC publishing to this application -->
<EnablePublish>true</EnablePublish>
<!-- Enable WebRTC playback from this application -->
<EnablePlay>true</EnablePlay>
<!-- Enable query of published stream names for this application -->
<EnableQuery>true</EnableQuery>
<!-- IP address, transport, and port used for WebRTC streaming. -->
<!-- TCP format: [external-ip-address],tcp,[port] UDP format: [external-ip-address],udp -->
<IceCandidateIpAddresses>13.218.92.124,udp|13.218.92.124,tcp,1935</IceCandidateIpAddresses>
<!-- Local IP of the network card to use for WebRTC UDP traffic -->
<UDPBindAddress/>
<!-- Audio codecs, in order of preference, for ingestion -->
<PreferredCodecsAudio>opus,pcmu,pcma</PreferredCodecsAudio>
<!-- Video codecs, in order of preference, for ingestion -->
<PreferredCodecsVideo>vp8,h264</PreferredCodecsVideo>
<!-- Enable WebRTC debug logging -->
<DebugLog>false</DebugLog>
<Properties>
<Property>
<Name>harvestStunServer</Name>
<Value>stun.l.google.com:19302</Value>
<Type>String</Type>
</Property>
<Property>
<Name>harvestTurnRelay</Name>
<Value>turn.example.com:3478</Value>
<Type>String</Type>
</Property>
<Property>
<Name>harvestTurnRelayUsername</Name>
<Value>turnuser</Value>
<Type>String</Type>
</Property>
<Property>
<Name>harvestTurnRelayPassword</Name>
<Value>turnpassword</Value>
<Type>String</Type>
</Property>
<Property>
<Name>webrtcWhipBearerToken</Name>
<Value>79273a6f03772d162eec9ff2f1218dde</Value>
<Type>String</Type>
</Property>
<Property>
<Name>webrtcWhepBearerToken</Name>
<Value>5c1f0b9a8d4e47a2b6c3f9e1d7a2b8c4</Value>
<Type>String</Type>
</Property>
</Properties>
</WebRTC>
RTP element properties
In the <RTP>/<Properties> container, add any of these properties (Name, Type, Value) in the following format:
<Property> <Name>...</Name> <Value>...</Value> <Type>...</Type> </Property>
| Name | Type | Description |
|---|---|---|
rtpDePacketizerWrapper |
String | Set to com.wowza.wms.rtp.depacketizer.JitterBuffer to enable a jitter buffer for out-of-order/retransmitted packets. Recommended for UDP; adds delay. Required for useNack. |
jitterBufferDelay |
Integer | Jitter buffer delay (ms). If useNack is true, ~2× RTT plus overhead; if false, 100. (Default 500) |
useNack |
Boolean | Send NACK messages for retransmission of lost packets (WebRTC only). Recommended for UDP; adds delay; requires the jitter buffer. (Default false) |
jitterBufferDebug |
Boolean | Log out-of-order packets recovered in time, including recovery duration. (Default false) |
logPacketLoss |
Boolean | Log packets lost and not recovered in time. (Default false) |
rtpForceH264Constraint |
Boolean | Allow the returned SDP to use different H.264 constraints than the stream. (Default false) |
rtpForceH264ConstraintValue |
Integer | H.264 constraint value when rtpForceH264Constraint is true. Default 192; also 128, 224, 240. |
rtpUseLowestH264Constraint or rtpUseHighestH264Constraint |
Boolean | Use the lowest or highest value when determining the H.264 profile in the SDP, to help play streams from encoders that send inconsistent codec data. Can't both be used; if both true, highest wins. |
RTP element example
<RTP>
<!-- RTP/Authentication/[type]Methods defined in Authentication.xml. Default setup includes; none, basic, digest -->
<Authentication>
<PublishMethod>none</PublishMethod>
<PlayMethod>none</PlayMethod>
</Authentication>
<!-- RTP/AVSyncMethod. Valid values are: senderreport, systemclock, rtptimecode -->
<AVSyncMethod>senderreport</AVSyncMethod>
<MaxRTCPWaitTime>12000</MaxRTCPWaitTime>
<IdleFrequency>75</IdleFrequency>
<RTSPSessionTimeout>90000</RTSPSessionTimeout>
<RTSPMaximumPendingWriteBytes>0</RTSPMaximumPendingWriteBytes>
<RTSPBindIpAddress></RTSPBindIpAddress>
<RTSPConnectionIpAddress>0.0.0.0</RTSPConnectionIpAddress>
<RTSPOriginIpAddress>127.0.0.1</RTSPOriginIpAddress>
<IncomingDatagramPortRanges>*</IncomingDatagramPortRanges>
<!-- Properties defined here will override any properties defined in conf/RTP.xml for any depacketizers loaded by this application -->
<Properties>
</Properties>
</RTP>




