Unable to watch hls stream in webview


I have a ionic cordova app which uses webview to access a page on my website. This page has a tag and the source is an hls stream. When I try to watch the stream it brings the error " The media could not be loaded, either because the server or network failed or because the format is not supported".

The source of the hls stream is a media server with a self signed certificate. I have tried editing the onReceivedSslError function of SystemWebViewClient.java with no success.

I have heard about adding the self signed cerificate to the assests and ssl pinning but I have found no helpful tutorial. Has anyone else dealt with this?


If you don’t get any better answers, I would suggest getting a real SSL cert from letsencrypt and stop bothering with self-signed certificates.

Unfortunatety I am using a VPS and dont have domain name yet