Browse files

Connect WebSocket relative to window.location

  • Loading branch information...
1 parent aa38365 commit b1aaef01a3ad0c3b62f5aed2148bfa8a733caac7 Daniel Kutik committed Feb 6, 2013
Showing with 1 addition and 2 deletions.
  1. +1 −2 example/index.html
View
3 example/index.html
@@ -197,8 +197,7 @@
var room = window.location.hash.slice(1);
- //When using localhost
- rtc.connect("ws://localhost:8000/", room);
+ rtc.connect("ws:" + window.location.href.substring(window.location.protocol.length), room);
rtc.on('add remote stream', function(stream, socketId) {
console.log("ADDING REMOTE STREAM...");

0 comments on commit b1aaef0

Please sign in to comment.