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

Loading…
Cancel
Save