Add a small delay after the DOM is ready to start SimpleWebRTC

Seems to reduce the chance to have a permissionDeniedError on Chrome
See https://github.com/HenrikJoreteg/SimpleWebRTC/issues/127
master
Daniel Berteaud 11 years ago
parent 0ac90f012c
commit fded08fef8
  1. 2
      templates/default/join.html.ep

@ -341,6 +341,7 @@
<script> <script>
var roomName = '<%= $room %>'; var roomName = '<%= $room %>';
$( document ).ready(function() { $( document ).ready(function() {
setTimeout(function(){
webrtc = new SimpleWebRTC({ webrtc = new SimpleWebRTC({
url: "<%= $config->{signalingServer} %>", url: "<%= $config->{signalingServer} %>",
peerConnectionConfig: { peerConnectionConfig: {
@ -370,6 +371,7 @@
} }
}); });
initVroom(roomName); initVroom(roomName);
}, 300);
}); });
</script> </script>
</div> </div>

Loading…
Cancel
Save