Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Connect WebSocket relative to window.location

  • Loading branch information...
commit b1aaef01a3ad0c3b62f5aed2148bfa8a733caac7 1 parent aa38365
Daniel Kutik authored
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...");
Please sign in to comment.
Something went wrong with that request. Please try again.