Mark Douglas Fulton, 27, was charged with sexual abuse of children and invasion of privacy in connection with a May 11 incident, police said.
State police said they interviewed Fulton after someone reported seeing the video on his phone.
Fulton confessed the camera was hidden around a teddy bear in a corner of the girl's room. Fulton said he may have been drunk, and said the girl didn't know he made the recording.
Fulton said he regretted his action, and told the police. "I'm not a pedophile. I need like a counselor, like help in general," said court documents.
He is in Dauphin County prison in lieu of $50,000 bail, and his preliminary hearing is scheduled for June 29.