 		}
 		
 		if command.argument(at: 2) != nil {
-			let id = command.argument(at: 2) as! String
-			let pluginMediaStream = self.pluginMediaStreams[id]
+			let streamId = command.argument(at: 2) as! String
+			let pluginMediaStream = self.pluginMediaStreams[streamId]
 			
 			if pluginMediaStream == nil {
-				NSLog("iosrtcPlugin#RTCPeerConnection_addTrack() | ERROR: pluginMediaStream with id=%@ does not exist", String(id))
+				NSLog("iosrtcPlugin#RTCPeerConnection_addTrack() | ERROR: pluginMediaStream with id=%@ does not exist", String(streamId))
 				return;
 			}
 			
-			let streamId = pluginMediaStream!.rtcMediaStream.streamId;
-			streamIds.append(streamId)
+			streamIds.append(pluginMediaStream!.id)
 			self.saveMediaStream(pluginMediaStream!)
 		}
 		

		let id = command.argument(at: 0) as! Int

		let pluginMediaStreamRenderer = PluginMediaStreamRenderer(
			webView: self.webView!,
			eventListener: { (data: NSDictionary) -> Void in
				let result = CDVPluginResult(

		if self.pluginMediaStreams[pluginMediaStream.id] == nil {
			self.pluginMediaStreams[pluginMediaStream.id] = pluginMediaStream
		} else {
			return;
		}

