 			])
 		}
 	}
- 
+
 	/** New ice candidate has been found. */
 	func peerConnection(_ peerConnection: RTCPeerConnection, didGenerate candidate: RTCIceCandidate) {
 		NSLog("PluginRTCPeerConnection | onicecandidate [sdpMid:%@, sdpMLineIndex:%@, candidate:%@]",


	/** New track as been added. */
	func peerConnection(_ peerConnection: RTCPeerConnection, didAdd rtpReceiver: RTCRtpReceiver, streams:[RTCMediaStream]) {
		
		NSLog("PluginRTCPeerConnection | onaddtrack")
		
		// TODO why streams.count is 0 and should it trigger addtrack
		// TODO why NSLog streamId cause crash need weak ?
		let streamId : String = streams.count > 0 ? streams[0].streamId : "";
		
		let track = PluginMediaStreamTrack(
		   rtcMediaStreamTrack: rtpReceiver.track!,
		   streamId: streamId
		)
	   
		self.eventListener([
		   "type": "addtrack",
		   "track": track.getJSON()


		// Let the plugin store it in its dictionary.
		streamIds.append(stream.streamId)
		pluginMediaStreams[stream.streamId] = pluginMediaStream;

		self.eventListenerForAddStream(pluginMediaStream)

		// Fire the 'addstream' event so the JS will create a new MediaStream.
