(NEWS CENTER Maine) -- Social media erupted with privacy concerns Wednesday after news the President Donald Trump's former attorney, Michael Cohen, released audio recordings of a discussion he had with the President.

When can a person record a conversation with someone else? It depends on the state they live in.

States are either "one-party consent" states, or "all-party consent" states. In "one-party" states, only one person involved in the conversation needs to approve recording: that includes the person who wants to record it.

Maine is a one party state.

Essentially, in a one-party state, someone can record a conversation without the other person knowing.

"I think intuitively, a lot of people think, that's a violation of privacy and both people should have to consent," said Ben Piper, a media law attorney at Preti Flaherty. "I think there are a lot of misconceptions in the general public about the level of privacy they're entitled to."

In the 12 "all-party" states, including California, Massachusetts, and Pennsylvania, every person choosing to be involved in the conversation must approve a recording before it can be recorded.

The Maine Attorney General's office says that when a phone calls takes place between two different states -- the law where the recording takes place applies.

"The best practice is to err on the side of caution and obtain consent.," said Piper.

The laws do not only apply to private conversations in private places.

"The standard that's generally used is a reasonable expectation of privacy. If you're in a bedroom with your wife, it wouldn't be the same situation as if you're in a public pakr and having a conversation on speakerphone," said Piper.

It is federally illegal for a conversation to be recorded when neither party is aware of a recording, such as a wiretapped phone call.