getUserMedia() without SSL for local storage

2019-08-01 10:05发布

问题:

In my website I need to record audio from the microphone and then replay it. I do not need to send those files to the server, they can remain on the client. Currently I'm successfully using flash for that, but I would like to switch to html5 and getUserMedia(). I'm aware that I normally need SSL for using getUserMedia() (except from localhost use), but I'm wondering if there is some sort of exemption if I don't want the data to be uploaded (and thus there should be no security issues in using it).

回答1:

There's no exemption. Having one would require running your script in some sort of local sandbox with separate local storage and no networking. Does not exist.

Only Google Chrome enforces this https requirement by the way. Other browsers do not.

Getting a free certificate is easy.