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. 6
      templates/default/join.html.ep

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

Loading…
Cancel
Save