Temporary solution to start web video in non-HTTP state

Primer

The new version of chrome will have a security warning when calling the camera, so the js method of calling the camera cannot be used, as follows:

means to ensure security, you can only call the browser camera under HTTPS. But when we usually develop, the local environment often does not have HTTPS, how to solve it?

Disable the browser's default safe mode

Copy the following command to the browser's address bar:
chrome: // flags / # unsafely-treat-insecure-origin-as-secure
as shown below, find the yellow part, and then enable it, and put your own local simulated domain name This increases the whitelist. After setting, you need to restart the browser.

Back to the browser test video, the result is OK, as follows:

A green dot on the computer indicates that the camera is turned on.

Guess you like

Origin www.cnblogs.com/leechenxiang/p/feihttp-zhuang-tai-xia-kai-qiweb-shi-pin-de-lin-sh.html