在 android 平板电脑上允许不使用 https 访问网络摄像头
Allowing webcam access without https on android tablet
是否可以通过浏览器上的 Android 平板电脑在网站上允许不使用 HTTPS 的网络摄像头访问?
可能通过 Javascript 或 PHP?
一句话,答案是否定的。
为了安全起见,可以仅在本地主机和 https 连接上访问网络摄像头。
W3 API specification 状态
When on an insecure origin [mixed-content], User Agents are encouraged to warn about usage of navigator.mediaDevices.getUserMedia, navigator.getUserMedia, and any prefixed variants in their developer tools, error logs, etc. It is explicitly permitted for User Agents to remove these APIs entirely when on an insecure origin, as long as they remove all of them at once (e.g., they should not leave just the prefixed version available on insecure origins).
Chrome,从版本 47 开始实施此安全策略 (Source):
Starting with Chrome 47, getUserMedia() requests are only allowed from secure origins: HTTPS or localhost.
因此,如果没有安全连接,您将无法访问相机。
是否可以通过浏览器上的 Android 平板电脑在网站上允许不使用 HTTPS 的网络摄像头访问?
可能通过 Javascript 或 PHP?
一句话,答案是否定的。 为了安全起见,可以仅在本地主机和 https 连接上访问网络摄像头。
W3 API specification 状态
When on an insecure origin [mixed-content], User Agents are encouraged to warn about usage of navigator.mediaDevices.getUserMedia, navigator.getUserMedia, and any prefixed variants in their developer tools, error logs, etc. It is explicitly permitted for User Agents to remove these APIs entirely when on an insecure origin, as long as they remove all of them at once (e.g., they should not leave just the prefixed version available on insecure origins).
Chrome,从版本 47 开始实施此安全策略 (Source):
Starting with Chrome 47, getUserMedia() requests are only allowed from secure origins: HTTPS or localhost.
因此,如果没有安全连接,您将无法访问相机。