New Brunswick, New Jersey (CNN) -- The man Tyler Clementi was intimate with just days before he committed suicide took the stand Friday, telling jurors that he had noticed a web camera aimed at Clementi's bed. 

The witness, who prosecutors named only as "M.B." to protect his identity, testified during the sixth day of the trial of a former Rutgers University student, Dharun Ravi. 

Ravi is accused of spying on and intimidating Clementi, his former university roommate, because he was gay. 

M.B., 32, testified Friday that he first met Clementi on an internet social networking site for gay men and that they eventually met in the student's dorm room three times. The two conversed online, exchanged text messages and later had sex. 

At one point when they were together in the dorm room, M.B. glanced over at Ravi's desk and saw "a camera lens pointed at (Clementi's) bed." 

He also testified that he had briefly met Ravi while visiting Clementi. Ravi on one occasion allegedly left the room and came back, "walked to his desk, shuffled around a bit and then walked out." 

M.B. testified that on September 19, 2010, he drove to meet Clementi at his building, three days after the first visit. When he left, M.B. said he saw about five people milling around the hallway who seemed to be looking at him. 

"They didn't say anything," he said. But they were looking at him in a way that made him wonder why they were staring, he said. "But as I was a guest in their building, I just brushed it off." 
Name one thing he was accused of?
Ravi is accused of spying on 