Use WebRTC example pages with Wowza Streaming Engine

Wowza Streaming Engine™ media server software version 4.7.7 and later supports WebRTC streaming and playback on Google Chrome, Mozilla Firefox, and Apple Safari. We recommend, however, that you update to version 4.8.5 and later to capitalize on expanded functionality and enhanced publisher reliability. After you've tested WebRTC with our hosted WebRTC publish, play, composite, and meeting test pages, view the source code for these pages on GitHub, and learn how you can host the example WebRTC pages with Wowza Streaming Engine.

Tip: When you're ready to implement WebRTC for production, consider using the Wowza Flowplayer Real-Time Streaming (WebRTC) plugin for playback. You can purchase Wowza Flowplayer and use it with Wowza Streaming Engine for playback. 

Note: You must configure Wowza Streaming Engine for WebRTC streaming before you can use the instructions in this article to test publishing and playback. See Set up WebRTC streaming with Wowza Streaming Engine

About WebRTC examples


Wowza Media Systems provides WebRTC examples on GitHub that demonstrate how to publish and play WebRTC streams with Wowza Streaming Engine. In production environments, WebRTC playback and publishing pages must be hosted on a web server utilizing SSL/TLS encryption. For testing purposes, you can install and run the examples from your local host environment over HTTP. For instructions see the WebRTC examples Readme. You can also use Wowza Streaming Engine configured with SSL/TLS to host the provided WebRTC example pages for testing.

Install and host WebRTC examples with Wowza Streaming Engine


  1. To install the examples, clone or download the example contents and then copy and paste them into the [install-dir]/htdocs/webrtc folder. 
  2. In a text editor, open the [install-dir]/conf/VHost.xml file, and add the following as the last <HostPort> in the <HostPortList> container. Make sure to replace [streamlock-filename] and [streamlock-password] with your StreamLock file name and password, respectively.
    <HostPort>
        <Name>Admin WebRTC</Name>
        <Type>Admin</Type>
        <ProcessorCount>${com.wowza.wms.TuningAuto}</ProcessorCount>
        <IpAddress>*</IpAddress>
        <Port>443</Port>
        <HTTPIdent2Response></HTTPIdent2Response>
        <SSLConfig>
            <KeyStorePath>${com.wowza.wms.context.VHostConfigHome}/conf/[streamlock-filename].jks</KeyStorePath>
            <KeyStorePassword>[streamlock-password]</KeyStorePassword>
            <KeyStoreType>JKS</KeyStoreType>
            <DomainToKeyStoreMapPath></DomainToKeyStoreMapPath>
            <SSLProtocol>TLS</SSLProtocol>
            <Algorithm>SunX509</Algorithm>
            <CipherSuites></CipherSuites>
            <Protocols></Protocols>
        </SSLConfig>
        <SocketConfiguration>
            <ReuseAddress>true</ReuseAddress>
            <ReceiveBufferSize>16000</ReceiveBufferSize>
            <ReadBufferSize>16000</ReadBufferSize>
            <SendBufferSize>16000</SendBufferSize>
            <KeepAlive>true</KeepAlive>
            <AcceptorBackLog>100</AcceptorBackLog>
        </SocketConfiguration>
        <HTTPStreamerAdapterIDs></HTTPStreamerAdapterIDs>
        <HTTPProviders>
            <HTTPProvider>
                <BaseClass>com.wowza.wms.http.HTTPProviderSimpleWebServer</BaseClass>
                <RequestFilters>webrtc*</RequestFilters>
                <AuthenticationMethod>none</AuthenticationMethod>
            </HTTPProvider>
        </HTTPProviders>
    </HostPort>
  3. Restart Wowza Streaming Engine.
  4. Use the following URL to access an example page:
    https://[ssl-certificate-domain-name]:443/webrtc/[path-to-example-file]
    where [ssl-certificate-domain-name] is the secure domain name for your Wowza Streaming Engine instance.

    For example, if the StreamLock domain name is 123456.streamlock.net, the URL for the publish example would be:

    https://123456.streamlock.net:443/webrtc/src/jquery-example/dev-view-publish.html
     
    Note: If using a self-signed certificate instead of Wowza StreamLock, ensure that the browser you're using to test accepts traffic encrypted with all self-signed certificates in use. To do this, add the certificate to the client's TrustStore or temporarily grant permissions to the browser session.

Video tutorial: Use the WebRTC composite example page


See how to access and use the WebRTC composite example page to composite and publish two video inputs.

More resources