         self.configuration = configuration
         self.peerChannel = configuration.peerChannelType
             .init(configuration: configuration)
-
+        
         /*
-        aliveMonitor.addObject(signalingChannel)
-        if let channel = signalingChannel.webSocketChannel {
-            aliveMonitor.addObject(channel)
-        }
-        aliveMonitor.addObject(peerChannel)
-        aliveMonitor.onChange(handler: self.handleChannelStateChanges)
- */
+         aliveMonitor.addObject(signalingChannel)
+         if let channel = signalingChannel.webSocketChannel {
+         aliveMonitor.addObject(channel)
+         }
+         aliveMonitor.addObject(peerChannel)
+         aliveMonitor.onChange(handler: self.handleChannelStateChanges)
+         */
     }
     
     public func connect(timeout: Int = Configuration.defaultConnectionTimeout,

        state = .connecting
        onConnectHandler.onExecute(handler: handler)
        
        connectionTimer = ConnectionTimer(target: self,
                                          timeout: configuration.connectionTimeout)
        connectionTimer!.run {
            Log.debug(type: .mediaChannel, message: "connection timeout")
            self.disconnect(error: SoraError.connectionTimeout)
        }
        
        peerChannel.handlers.onAddStream { stream in
            Log.debug(type: .mediaChannel, message: "added a stream")

        case waitingPeer
    }
    
    public let handlers: MediaChannelHandlers = MediaChannelHandlers()
    
    public let configuration: Configuration
    public private(set) var clientId: String?
    public let peerChannel: PeerChannel
    
    public var streams: [MediaStream] {
        return peerChannel.streams
    }
    
    public var mainStream: MediaStream? {
        return streams.first
    }
    
    public private(set) var state: State = .disconnected {
        didSet {
            Log.trace(type: .mediaChannel,
                      message: "changed state from \(oldValue) to \(state)")
        }
    }
    
    private let aliveMonitor: AliveMonitor = AliveMonitor()
    private var connectionTimer: ConnectionTimer?
    private var onConnectHandler: Callback1<Error?, Void> = Callback1(repeats: false)
    
