     leagueId: String
   },
   ready: ->
-    connection = RTCConnection(this.leagueId)
-    _this = @
+    connection = RTCConnection(this.leagueId, @)
     connection.onNewSession = (e) ->
-      _this.fire("new-stream", e.sessionid)
     setInterval(clearOldSessions.bind(@, connection), 10000)

RTCConnection = (leagueId) ->
  connection = new RTCMultiConnection(leagueId)
  onMessageCallbacks = {}
  socket = io.connect('http://localhost:5555/')

  connection.connect()

clearOldSessions = (connection) ->
  for frameId, val of activeSessions
    diff = new Date() - val
    if diff > 10000
      delete activeSessions[frameId]
      this.fire('stream-closed', frameId)

Polymer
  is: 'stream-channel',
