Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
368 views
in Technique[技术] by (71.8m points)

javascript - WampServer为页面提供服务时,navigator.mediaDevices未定义(navigator.mediaDevices is undefined when page is served by WampServer)

On Firefox 70.0.1, when I open a page served by WampServer 3.1.9 and test navigator.mediaDevices , I get undefined .

(在Firefox 70.0.1上,当我打开由WampServer 3.1.9提供的页面并测试navigator.mediaDevices ,得到undefined 。)

If I open the same page via its file:/// URL, navigator.mediaDevices is a valid object.

(如果我通过file:/// URL打开同一页面,则navigator.mediaDevices是有效的对象。)

How can the way the page is accessed affect the navigator object?

(访问页面的方式如何影响navigator对象?)

I just mention that I created a new virtual host on WampServer to host the page.

(我只是提到我在WampServer上创建了一个新的虚拟主机来托管页面。)

  ask by Christophe Fuzier translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...