I am trying to run an Angular 4 project. It is a video chat app. When I am trying to run using localhost
, it is not working and when I am using
ng s --host 192.16.10.xxx:4200
it's causing problems using the webcam and showing this error:
[Deprecation] getUserMedia() no longer works on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS. See goo.gl/rStTGz for more details.
I don't know how to do this.
Can anyone help me with this?
EDITS -
I've generated ssl file localhost.key
and localhost.csr
and folder structure is
When I am trying to run
ng serve --ssl --ssl-key localhost.key --ssl-cert localhost.csr --host 0.0.0.0
It is giving an error
error:0906D06C:PEM routines:PEM_read_bio:no start line
Error: error:0906D06C:PEM routines:PEM_read_bio:no start line