 			device = findDeviceForPosition(position: position);
 		}
 		
+		NSLog("PluginRTCVideoCaptureController#findDevice device:%@", device!);
+		
+		// Check facingMode requirements
 		if (facingModeRequired && (
 			device == nil ||
 				facingMode == "environment" && device?.position != AVCaptureDevice.Position.back ||

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

				// TODO fail
				return nil;
			}
			
			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) {
