Play WebRTC streams from 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 (limited). When publishing WebRTC streams, it's important to note that browser support for codecs varies. We recommend that you use VP8 video with either Opus or Vorbis audio for the best performance, but H.264 is the most broadly supported WebRTC codec.

Your Wowza Streaming Engine installation of version 4.7.7 or later includes two WebRTC HTML examples. This article describes how to host the examples on your Wowza Streaming Engine instance and use them to test playback of WebRTC streams.

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

To test the playback of WebRTC streams from Wowza Streaming Engine, do the following:

  1. Before you can use the WebRTC HTML examples, you must host them somewhere. This can be on your own server or on Wowza Streaming Engine. For instructions, see Try the WebRTC HTML examples.
  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>9443</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. Navigate to [install-dir]/examples/WebRTC/ and run install.sh (OS X or Linux) or install.bat (Windows).
  4. In a browser, use the following URL to access the publish example, where [streamlock-domain-name] is replaced with your StreamLock domain name.
    https://[streamlock-domain-name]:9443/webrtc/publish/index.html
  5. Enter the Wowza Streaming Engine application and stream information, and then click Publish.
  6. In a new browser tab, use the following URL to access the play example, where [streamlock-domain-name] is replaced with your StreamLock domain name.
    navigate to https://[streamlock-domain-name]:9443/webrtc/play/index.html 
  7. Enter the same application name and stream name, and then click Play.

More resources