HTTPS with HTML5 MSE Player (secure websockets)

Issues when playing live broadcasts with Unreal HTML5 MSE player on a web page

HTTPS with HTML5 MSE Player (secure websockets)

Postby admin » Sun Jan 01, 2017 1:11 pm

We frequently receive questions like this from the users:

Hi

I am trying to use the new HTML5 player via HTTPS as many of my custoemers sites are shifting towards this now.

I have noticed that the latest stand alone unreal player will run via HTTPS without me even applying a certificate e.g. if i switch the buttons between TCP or HTTPS it works fine before I even applied a certificate to the machine but the HTML5 player does not, so I have added a certificate to the IIS web server but the HTML5 player still cant open a socket. But I have noticed that the unreal server itself has PEM files listed in it.

So do i have to add a valid PEM certificate to the media server itself rather than the IIS web server as before? Also out of interest if this is the case, I wonder why the unreal player will play HTTPS with the default server certificate in UMS while the HTML5 player does not?
admin
Site Admin
 
Posts: 1030
Joined: Fri Aug 21, 2009 10:13 am

Re: HTTPS with HTML5 Player (secure websockets)

Postby admin » Sun Jan 01, 2017 2:50 pm

Unreal Media Server v12.0 and higher doesn't use IIS for HTTPS streaming any more.
The UHttpProxy module is not used any more.

Besides port 5119 for regular player connections, Unreal Media Server listens on port 443 for secure player connections.
Both of these ports can be configured.
Unreal Media Server comes with .PEM certificate that resides in the installation folder; it's just a test certificate and it cannot be used for
secure websockets because browsers perform validation of that certificate. However, Unreal Streaming Media Player doesn't perform validation of the certificate; therefore, UMS-HTTPS works fine with the certificate that comes with Unreal Media Server installation.

So, to make HTML5 player work with secure websockets (boolSecureWebsocket parameter is true), you must install a real SSL certificate with TLS 1.2 support and use it instead of the test certificate that comes with Unreal Media Server installation. And, of course, you don't need to configure IIS to use that real SSL certificate, but you must configure Unreal Media Server to use it. (Of course, IIS can use it too, if you need to, but that's apart of Unreal Media Server functionality).

Note that if something is wrong with your certificate, or the server cannot listen on port 443 (because some other software listens on it, like IIS), then the application event log entry will be logged.
admin
Site Admin
 
Posts: 1030
Joined: Fri Aug 21, 2009 10:13 am

Re: HTTPS with HTML5 Player (secure websockets)

Postby waxxan » Sun Jul 30, 2017 4:33 am

Hi,

Don't think my issue is related to HTTPS, but certainly websockets. So ill tell you quick about my setup and my issue.
On my primary machine i run OBS just to capture something and and stream to Unreal media server, which is running on the same machine.
A webserver, using mongoose is also hosted on the same machine. A simple website is created, with the same code as in the samples in the umedia SDK.
Im using unreal_html5_player_script_v2, and I am connecting to my local umediaserver. So far so good. Testing the website\stream on another PC on the same network works just fine.
Now, to the problem. If I connect from an external PC to the website, i get the following errormessage in the html5 player: "websocket connection is closed or could not be established"
I have setup the router to forward port 80, 8080, 443 and 5119 to the web server, but no avail. Im fairly novice to webprogramming, so im trying to wrap my head around this.
Router model: Nighthawk X4 R7500

Anyone have any ideas?
waxxan
 
Posts: 0
Joined: Sun Jul 30, 2017 4:17 am

Re: HTTPS with HTML5 Player (secure websockets)

Postby waxxan » Sun Jul 30, 2017 4:43 am

Haha, nevermind. Solved it. Late night torubleshooting got me blind.
It was just a matter of entering my external ip in the RunPlayer(... of course.
Thanks for a great product!
waxxan
 
Posts: 0
Joined: Sun Jul 30, 2017 4:17 am

Re: HTTPS with HTML5 Player (secure websockets)

Postby cadot » Sun Mar 04, 2018 7:00 am

a real SSL certificate with TLS 1.2 support <--- does this mean a self sign certificate will not work?
cadot
 
Posts: 0
Joined: Sat May 20, 2017 11:39 am

Re: HTTPS with HTML5 Player (secure websockets)

Postby admin » Sun Mar 04, 2018 9:51 am

Correct - self sign certificate will not work.
Browsers validate the certificate, so they will not honor self sign certificate.
admin
Site Admin
 
Posts: 1030
Joined: Fri Aug 21, 2009 10:13 am


Return to Playing with HTML5 MSE Player

Who is online

Users browsing this forum: No registered users and 0 guests

cron