 				// TODO fail
 				return nil;
 			}
-		}
-		
-		// TODO deviceId ConstrainDOMString NSDictionary
+			
+			NSLog("PluginRTCVideoCaptureController#findDevice facingMode:%s", facingMode);
+		}
+		
+		// deviceId ConstrainDOMString NSDictionary
 		let deviceId = self.getConstrainDOMStringValue(constraint: "deviceId");
-		
 		if (deviceId.count > 0) {
 			device = AVCaptureDevice(uniqueID: deviceId)
 			if (!device!.isConnected) {

			
			// TODO Apply frameRates via minFrameRate/maxFrameRate
			
			NSLog("PluginRTCVideoCaptureController#selectFormatForDevice width:%i, height:%i, aspectRatio: %f, frameRateRanges:%f/%f", dimension.width, dimension.height, aspectRatio, frameRates.minFrameRate, frameRates.maxFrameRate);
		}
	
		return selectedFormat
	}
	
	//

		return isRequired;
	}
	
	fileprivate func getConstrainRangeValues(constraint: String) -> NSDictionary {
		let constraints = self.constraints;
		let finalValue: NSMutableDictionary = [:];
		finalValue.setValue(0, forKey: "min")
