Wowza Community

WebRTC Publish example Not detecting devices

The example page for WebRTC publishing isn’t working.
It does not detect any camera or audio devices, resulting in the following error:

“Could not start video source”.

And the dropdown selection for both camera and microphone isn’t populated at all.

I am using lattest Chrome Version, and i do have 3 Cameras (1 real, 2 vrtual) and it is working correcty in any website.

Of course the permission is set to Allow.

Hey there @Riccardo, let me take a look and see if I can replicate your issue on that page- be back soon.

I was able to run both the WebRTC publish and play page without issue on my laptop. Have you tested this with just one camera from a browser?

I’m also curious if you’re using Wowza StreamLock for your SSL certificate? If so, could it be it’s not able to properly verify that certificate? SSL is required for WebRTC so that signaling url field in the WebRTC test publish page has got to have your correct StreamLock info.

If using Wowza StreamLock, for example, the Signaling URL looks something like this:
wss://5ab4321c0d123.streamlock.net/webrtc-session.json

Where you would replace this: 5ab4321c0d123
with your own private StreamLock SSL string of characters.

Also wondering what version of Engine you’re using? If it can’t detect the camera source, it could be a network issue, a firewall or port issue or as i said the SSL configuration has to already have been done in Engine and set up before you try to stream over webrtc.

This step must have been done first:

When ingesting source content as WebRTC, Wowza Streaming Engine uses a WebSocket connection to the browser to retrieve the Session Description Protocol (SDP) information. This signaling exchange requires that you set up a Wowza Streaming Engine HTTP provider for the connection.

You can see all the steps to set Engine up for WebRTC here:

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

If you still have issues, please submit a support ticket so we can fully review your configuration/logs, run some tests and accurately diagnose. Sorry it’s not working for you, but we’ll figure it out with you in your ticket, We can’t debug unfortunately in the forums, just give some pointers.

I am using my Apache webserver on my local server with a self-signed certificate for testing, the examples I am using are from https://github.com/WowzaMediaSystems/webrtc-examples, the same as the wowza.com hosted examples.
The certificate on my own server is valid and correctly verified in my browser since I imported it, so GetUserMedia() works in all my testing environment, except in the wowza example.

I still need to setup the server for WebRTC (I am currectly using the Trial version).

I am not connecting at all to the Wowza server, because the issue is somewhere Client Side, before I can even try to publish.

As soon as I load the publish example page I get “Could not start video source” error, instead of populating the dropdowns for selecting camera/mic.

It is not a Wowza server issue, but something else with the example, client side.

Could it be something with Virtual Webcams?
Maybe the script in the example is filtering them or something else.
I am trying to debug the script in the example but till now I don’t see anything wrong with it.

I can list/view all the cameras with GetUserMedia() with a custom page I wrote, on the same domain where the examples are.

Here a screenshot just after page load, no error in console that I can track down.

Hmm…well I can tell you that I have seen people run into issues with the self-signed certificates when using webrtc with our example code

In that screenshot you shared, I am assuming you had filled out the fields for the signaling url, application name and stream name right? You just deleted it for the screenshot in public to protect your privacy?

You CAN use your own certificate, as long as your certificate authority accepts using a localhost address, this should be possible. Please review our article on how to request a self-signed certificate: You have to have a port configured to use that certificate for our webrtc samples to run.

[https://www.wowza.com/docs/how-to-request-an-ssl-certificate-from-a-certificate-authority ]

Then in your host file you’ll add your local address and domain name.

127.0.0.1       ssl.mycompany.com

Here are the detailed steps on how to run the example publish and play samples if it helps you out:

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

You’ll need to submit a support ticket for us to assist you. We can’t tell without running some tests. In the forums, it’s just guessing unfortuantely. We need full access to your files and logs and then we have the advanced tools to quickly find the issue and can save you time and frustration. I promise you we can get it worked out though and running properly.

You can send a ticket even on a trial so no issue there.

No, I didn’t even filled the URL and other data, because even I fill them in nothing changes.
The connection to the server begin when I click Publish.

But as I said, I cannot even select my webcam, before try to publish.

GetUserMedia() is a client side API that works regardless of the server.

It should just populate the dropdown menu with my cameras and microphone, as it does with my custom-writted page, that doesn’t have any reference to the connection to the server,
The self-signed certificate is Verified in my browser.
The SSL connection to the web page works, and that’s the only requirements for accessing MediaDevices in the browser.

I also just confirmed with tech support you need to configure your self-signed cert to a keystore first. It can be a bit complicated and we typically suggest using free StreamLock cert from Wowza since that’s integrated already into the samples, and can be quick and easy, but if you need assistance using your own, we can get it to work for you in a support ticket.

https://www.wowza.com/docs/How-to-import-an-existing-SSL-certificate-and-private-key#import-the-certificate-to-the-keystore

I think we are speaking of two things that do not have anything to do each other.
I did finish to setup the server, just to prove that what I am saying is true.

I canstream over WebRTC to the server, Publish and Playing is working correctly.

The issue I was refering to, is still present.

I cannot post more than one screenshot, so here is a big one:

[1] Publish page just after loading:

As you can see, the drop down are emtpy, with the previously mentioned error.
I cannot choose the camera/microphone to use.

[2] Publish Page after clicking Publish:
It does stream the “default” camera device in Google Chrome. (HDMI Capture Card)

[3] Play page correctly showing my stream:

[4] StreamEngineManager correctly show the stream is ACTIVE:

Also, i MUST leave the Frame Rate input empty, otherwise the stream does not even start, returning the same Could not start video source error.

As I said, there is a issue in the Javascript, somewhere, that prevents my devices to show up in the dropdowns.

Edit: The issue was indeed the FrameRate parameter.
I think that’s because some Virtual Devices doesn’t expose the FrameRate paramether, and completely removing it from the example code fixed the issue.