WebRTC examples not working (anymore)?

Hi,

we have done tests with Wowza and the WebRTC (preview) about 6 months ago. And that worked well. Now we want to implement this in the new Wowza 4.7.7 version, and the examples for publishing is not working anymore. I do get errors in Firefox and Chrome either running on Ubuntu or Windows 10.

So I have setup a clean Wowza from version 4.7.7 (So no upgrade from the preview version). Then I have configured WebRTC according to:

https://www.wowza.com/docs/how-to-use-webrtc-with-wowza-streaming-engine

and that all works fine. Wowza is starting, and we are able to get the publish page in the browser. We are using the provided examples in the Wowza installation (so again, not the old preview examples)

There we fill out the form with the right values and press publish. And then the problems starts.

With firefox, we get a DOM exception like the following:

DOMException: "Failed to parse SDP: SDP Parse Error on line 19:  Warning: Invalid token ordering detected, token b= found after token a=
SDP Parse Error on line 24:  Warning: Invalid named events specified for fmtp attribute.
SDP Parse Error on line 37:  Warning: Invalid token ordering detected, token b= found after token a=
SDP Parse Error on line 51:  Warning: Invalid named events specified for fmtp attribute.
SDP Parse Error on line 53:  Warning: Invalid named events specified for fmtp attribute.
SDP Parse Error on line 5: Only one token in fingerprint attribute
"

Followed by another error:

InvalidStateError: Cannot add ICE candidate in state have-local-offer

The second error is a result of the first, because the SDP parsing is failing, and therefore missing data or not yet ready to update ICE candidates.

With Chrome we get the following error on the same page:

Uncaught (in promise) DOMException: Failed to execute 'addIceCandidate' on 'RTCPeerConnection': Error processing ICE candidate

So it looks like both browsers are failing with almost the same error, so it looks like there is something not working.

While the examples with Wowza 4.7.5 and 4.7.6 did work. So with the WebRTC preview, I got it working. With the released version it is not working. And I have debugged now straight for three days and I can’t find why it is not working any more. We have not touched the code. We are running it as provided.

My question, do the example pages still work? Are there changes that are not reflected in the example pages. (https://www.wowza.com/downloads/webrtc/webrtcexamplepages.zip)

Hello @Stef van der Ziel, sorry you have been trying to figure this out for 3 days. Let me find some assistance for you. I’ll have one our engineers look at this post. We may need a support ticket, I’ll let you know very soon.

There are no reported issues with the recent WebRTC examples @Stef van der Ziel. Our engineers are suggesting you use these examples found here:

https://www.wowza.com/_private/webrtc/

Your config in the Application xml file should look something like this:

<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: [wowza-streaming-engine-external-ip-address],tcp,[port] -->
            <!--UDP format: [wowza-streaming-engine-external-ip-address],udp -->
            <IceCandidateIpAddresses>192.168.0.16,udp</IceCandidateIpAddresses>
            <!-- <IceCandidateIpAddresses>[Wowza-IP-Address],tcp,1935</IceCandidateIpAddresses> -->
            <!-- Local IP address of the network card you want to use for WebRTC UDP traffic -->
            <UDPBindAddress>0.0.0.0</UDPBindAddress>
            <!-- Comma-deliniated list of audio codecs, in order of preference, for stream ingestion. Codecs not included will not be ingested. -->
            <PreferredCodecsAudio>opus,vorbis,pcmu,pcma</PreferredCodecsAudio>
            <!-- Comma-deliniated list of video codecs, in order of preference, for stream ingestion. Codecs not included will not be ingested.-->
            <PreferredCodecsVideo>h264,vp8,vp9</PreferredCodecsVideo>
            <!-- Enable WebRTC debug logging -->
            <DebugLog>false</DebugLog>
            <!-- Properties for WebRTC -->
            <Properties>
            </Properties>
        </WebRTC>

You’ll need to replace [Wowza-IP-Address] in the IceCandidateIpAddresses which appears to be where it’s failing.

If you still run into issues, please submit a support ticket and the engineers can view all of your files to find the problem. Hope this helps you.

https://www.wowza.com/support/open-ticket

Ok, we found the issue. We where using the DomainToKeyStoreMapPath setting in the VHost instead of a single JKS file for SSL. This caused the WebRTC part not to function properly.

So the support department has asked around internally and there is a fix in a future version. So for now, this is solved for us.

Hello!

Why does not it work?

Screenshots

https://yadi.sk/i/pg40uPyJsADe3g

Can you confirm that you’re using the default HTTPWebRTCExchangeSessionInfo

HTTP Provider and this has not been modified?

We suspect @Mikhail Shershnyov that this is a UDP port issue or firewall blocking the protocol.

Can you check if your firewall is allowing this connection? Some firewalls in addition to filtering on TCP/UDP ports, are also filtering the protocol being used. It is possible that the firewall is allowing UDP connections, and TCP connections using HTTP protocol, but not allowing TCP.

I have a development server 192.168.1.240
On the development server launched Wowza Streaming Engine 4.7.7

From your WebRTC example, took Application.xml and pointed out the IP of my development server there.

<IceCandidateIpAddresses> 192.168.1.240, tcp, 1935 </ IceCandidateIpAddresses><UDPBindAddress> 192.168.1.240 </ UDPBindAddress>

I took VHost.xml from your example and changed the port there to my 83.

I use your webrtc.js

Connecting to ws: //192.168.1.240: 83 / webrtc-session.json
I do not use SSL. Everything is successful, I get the following data from the server 192.168.1.240:

https://yadi.sk/i/ShhmeEUhphme5g

The problem is that the SDP response comes with local IP (127.0.0.1)!

https://yadi.sk/i/x5pB031XsbOAyA

And I expect that the SDP response that came from the Wowza Streaming Engine will be IP 192.168.1.240.

At the address http://192.168.1.240:1935/ I see this

https://yadi.sk/i/nGngPIoAbJi9nQ

HTTP Provider and this has not been modified?

I using original provider.

Need your answers, please!

Hello @Mikhail Shershnyov, you may have missed my previous response where the engineers requested a support ticket for this as they cannot determine this from what you have shared. Because WebRTC is a complicated workflow and they do not debug in the forums, they need a ticket in order to view your full configuration and see your log files. They can then run tests to replicate the issue and very quickly find the issue for you.

https://www.wowza.com/support/open-ticket