Upgrade to the current WebRTC implementation

Applies to: This article applies to WSE instances upgraded from an earlier version to WSE 4.11+. If you installed WSE 4.11+ from scratch, skip to the WebRTC implementation guide.

Wowza Streaming Engine (WSE) 4.11 introduced a new WebRTC implementation. A fresh installation of 4.11+ ships with the configuration settings necessary to use the Wowza's latest WebRTC features, but an upgraded installation keeps your server's existing configuration settings. Before serving WebRTC traffic you must manually edit your server's VHost.xml settings and each WebRTC app's Application.xml configuration settings.

Do you need to do this?

The legacy WebRTC implementation is unchanged in WSE 4.11+, meaning nothing will break if you do not upgrade to the latest  configuration. Complete the steps below when you want the features the current implementation adds, including:

  • WHIP and WHEP support: Standard HTTP signaling for publishing (WHIP) and playback (WHEP), interoperable with tools such as OBS Studio, FFmpeg, and GStreamer.
  • Configurable STUN and TURN servers (with TURN authentication) per application, to improve connectivity across restrictive NATs and firewalls.
  • Improved ICE: Full candidate gathering and connectivity checks, trickle ICE, and TCP candidate support where UDP is blocked.
  • Expanded codecs: Adds HEVC (H.265) and VP9 alongside H.264 and VP8, with automatic negotiation.
  • Multiple IP / NIC support: Works on secondary public IPs and additional host ports.

Note: SecureToken playback protection is not yet functional in the current implementation. If you protect WebRTC playback with SecureToken, keep those applications on the legacy implementation for now. See the Known Issues page.

Before you begin

  • Back up [install-dir]/conf/VHost.xml and the Application.xml file for each WebRTC application.
  • Plan for one Wowza Streaming Engine restart at the end of this procedure. Make all of the edits below, then restart once.

Update your server's WebRTC configuration

1. Update VHost.xml

Within your server's VHost.xml configuration file, you must update the HTTP provider, add the WebRTC stream adapter, and select your preferred WebRTC implementation.

Update the HTTP provider

Point the WebRTC HTTP provider at the signaling router. In [install-dir]/conf/VHost.xml, find the <HTTPProviders> element of your SSL/TLS host port and locate the <HTTPProvider> with the deprecated <BaseClass> shown in the example below.

<!-- Deprecated WebRTC HTTP provider -->
<HTTPProvider>
    <BaseClass>com.wowza.wms.webrtc.http.HTTPWebRTCExchangeSessionInfo</BaseClass>
    <RequestFilters>*webrtc-session.json</RequestFilters>
    <AuthenticationMethod>none</AuthenticationMethod>
</HTTPProvider>

Change the <BaseClass> value to the signaling router:

<!-- Updated WebRTC HTTP provider -->
<HTTPProvider>
    <BaseClass>com.wowza.wms.webrtc2.http.HTTPWebRTCSignalingRouter</BaseClass>
    <RequestFilters>*webrtc-session.json</RequestFilters>
    <AuthenticationMethod>none</AuthenticationMethod>
</HTTPProvider>

Add the WebRTC HTTP streamer adapter

Add WebRTC to the <HTTPStreamerAdapters> element, as shown in the example below.

<HTTPStreamerAdapter>
  <ID>webrtc</ID>
  <Name>webrtc</Name>
  <Properties></Properties>

</HTTPStreamerAdapter>

Next, add WebRTC to the list of HTTP streamer adapter IDs in the <HTTPStreamerAdapterIDs> element, as shown in the example below.

<HTTPStreamerAdapterIDs>cupertinostreaming,smoothstreaming,sanjosestreaming,dvrchunkstreaming,mpegdashstreaming,webrtc</HTTPStreamerAdapterIDs>

Select the WebRTC implementation

Your pre-exisitng VHost.xml file does not contain a <WebRTC> element, so signaling will default to dynamic. This means that clients get the legacy WebRTC implementation unless they append ?webrtcImplementation=v2 to the signaling URL. To explicitly choose a WebRTC implementation, add the your chosen WebRTC version to the <SelectedVersion> element of your server's VHost.xml file.

<!-- WebRTC signaling implementation: legacy | v2 | dynamic -->
<WebRTC>
    <SelectedVersion>v2</SelectedVersion>
</WebRTC>
WebRTC version config options
Implementation WSE Manager value VHost.xml value Behavior
WebRTC (current) WebRTC v2 All WebRTC signaling uses the current implementation.
Legacy Legacy WebRTC legacy All WebRTC signaling uses the legacy implementation.
Both (client-selectable) Dynamic dynamic Selected per client via ?webrtcImplementation=v2 in the signaling URL. Defaults to legacy when absent.

Choose v2 to move all traffic to the current implementation. Choose dynamic if you need to migrate clients in stages, but note that any client you don't update keeps using legacy.

You can also set this in WSE Manager: Server > Virtual Host Setup > Edit > WebRTC WebSocket Implementation.

2. Update Application.xml

For each WebRTC application, open [install-dir]/conf/[app-name]/Application.xml and add webrtc to the existing <HTTPStreamers> list, as shown in the example below.

<HTTPStreamers>cupertinostreaming,mpegdashstreaming,webrtc</HTTPStreamers>

Repeat for every application that publishes or plays WebRTC. (To update the default WebRTC settings for future apps, update the [install-dir]/conf/Application.xml template file.)

3. Restart and verify

Save the files and restart Wowza Streaming Engine.

Next steps

The steps above enables your server to use latest WebRTC implementation, but does not turn per-application features. To configure ICE candidates, STUN and TURN servers, WHIP/WHEP endpoints, bearer token authentication, and the expanded codec list, continue with the WebRTC implementation guide.