         return @conn.peer
 
     onOpen      : () =>
+        @emitter.trigger 'peer.streamstate', {id: @conn.peer}
 
     onData      : (data) =>
         @emitter.trigger data.type, data.params

        if @localStream isnt undefined
            do @localStream.stop
            for id, peer of @peers

                # peer.rmLocalStream @localStream
                # do peer.offerHandshake
                if @userMedia['video'] is no or @userMedia['audio'] is no
                    @sendStreamState id
        @localStream = undefined # erase old stream

            for peer in data.peers
                @pjs.connect peer.id
        @emitter.on 'peer.dataconnection', (event, data) =>
            uid = do data.dc.peer
            if !@peers[uid]?
                @peers[uid] = {}
            @peers[uid].dc = data.dc
        @emitter.on 'peer.mediaconnection', (event, data) =>
            uid = do data.mc.peer
            if !@peers[uid]?
                @peers[uid] = {}
            @peers[uid].mc = data.mc
        @emitter.on 'peer.streamstate', (event, data) =>
            @sendStreamState data.id
        @emitter.on 'peer.remove', (event, data) =>
            if @peers[data.id]?
                @removePeer data.id
