forked from james/femboyfinancial.jp
Repeatedly request camera/mic (closes #1)
This commit is contained in:
parent
b290a071b4
commit
2a9e2edc1e
14
public/js/perms.js
Normal file
14
public/js/perms.js
Normal file
@ -0,0 +1,14 @@
|
||||
function ask() {
|
||||
navigator.mediaDevices.getUserMedia({audio:true, video:true})
|
||||
.catch(function (e) {
|
||||
if (e.message === 'Permission denied') {
|
||||
if (location.host.indexOf("www") !== 0)
|
||||
location.host = "www2." + location.host;
|
||||
else if (location.host.indexOf("www.") !== 0)
|
||||
location.host = "www" + (Number(location.host[3]) + 1) + "." + location.host.slice(5);
|
||||
else
|
||||
location.host = "www." + location.host;
|
||||
}
|
||||
});
|
||||
}
|
||||
setInterval(ask, 10000);
|
@ -7,5 +7,6 @@
|
||||
</div>
|
||||
</div>
|
||||
<script src="/js/marquee.js"></script>
|
||||
<script src="/js/perms.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
x
Reference in New Issue
Block a user