New Brunswick, New Jersey (CNN) -- In text messages, a former Rutgers University student touted that "people are having a viewing party" to watch what he expected would be surreptitious webcam footage of his roommate being intimate with another man, according to testimony Monday.
The then-student, Dharun Ravi, is on trial on a 15-count indictment for allegedly spying on and intimidating his roommate, Tyler Clementi, because Clementi was gay.
Days after that and other messages were sent, the 18-year-old Clementi took his own life by leaping from the George Washington Bridge and into the Hudson River.
One of Ravi's high school friends, Michelle Huang, testified Monday at his trial in a New Brunswick, New Jersey, courtroom.
She read out a Twitter messages from September 19, 2010, in which Ravi wrote that he went into a mutual friend's room, "turned on my webcam" and saw his roommate "making out with a dude."
Huang testified Monday that two days later, Ravi sent another message telling his Twitter followers -- of which Huang was one -- "I dare you to videochat me between the hours of 9:30 and 12. Yes, it's happening again."
According to Huang, Ravi explained that day in a text to her that he'd set his "computer to alert (him) if anyone is in (the room) when I'm not there." Specifically, Ravi wrote that it "checks" his bed.
Ravi said that he was "creeped out" by the September 19 romantic encounter between Clementi and another man, which he suggested he witnessed -- via his hidden camera -- with several others.
"Keep the gays away," he wrote, according to a text message that was shown on a screen in the courtroom.
Huang said it was her understanding that Ravi planned to broadcast another liaison, without Clementi's knowledge, for others to see.
"Mad people are going to do it," she said he texted her, using slang to suggest large numbers planned to watch. "People are having a viewing party with a bottle of Bacardi and beer in this kids room for my roommate."
That "viewing party" never happened, Ravi wrote in a subsequent text exchange.
Yet on September 22, 2010, Clementi took a train to New York and posted a mobile status update on his Facebook page that read, "Jumping off the gw bridge sorry," before killing himself.
Ravi's lawyer, Stephen Altman, meanwhile, introduced a message sent the next day in which his client told Huang that his roommate had committed suicide and described it as "crazy."
"I guess he was quiet because he was depressed," wrote the defendant.
When she brought up the "viewing party" that he'd written about it earlier, Ravi wrote back: "No that was a joke."
Last week, Rutgers graduate Geoffrey Irving testified that Ravi had told him after an ultimate Frisbee practice that he set up the webcam and was planning to do it again the evening of September 21.
Yet previously, Altman has argued that his client had switched on the webcam to monitor his personal items because he did not trust his roommate's visitor, not necessarily because Clementi was gay.
And amid testimony Monday by Detective Douglas Rager of the Rutgers Police Department, the defense lawyer noted that Ravi cooperated fully when investigators talked with him for the first time after Clementi's death. Authorities seized Ravi's Blackberry after that initial 45-minute discussion.
The trial of Ravi, now 20, began February 24.
When it's complete, the jury will weigh his guilt or innocence on various charges including bias intimidation, invasion of privacy, tampering with physical evidence, witness tampering and hindering apprehension or prosecution.
If convicted, Ravi faces up to 10 years in prison. Last year, he turned down a plea deal that would have allowed him to avoid jail time.
He wasn't the only one charged after Clementi's suicide. Molly Wei, who admitted joining Ravi to watch the September 19, 2010, webcam encounter, was charged with two counts of invasion of privacy.
She reached a plea deal in May 2011 that required her to testify against her friend and former high school classmate, as well as to complete a three-year program on cyberbullying and do 300 hours of community service. The charges will be dropped if she does all of those things.
Testifying last week, Wei said she was surprised to learn that Ravi had talked and taken to Twitter to hype the webcam scheme and to essentially advertise that others could watch an upcoming liaison.
"I was very surprised because my friends brought it up, and I had no idea how they knew, but they said that Dharun had told them. ... They told me about these Twitter, tweets, that they received on Tuesday about him trying to have a viewing party," she said.
Clementi's suicide stirred national discussion regarding bullying, with President Barack Obama releasing a videotaped message less than a month later condemning such treatment.
And Clementi's family consented in November to the use of his name on federal anti-harassment legislation called the "Tyler Clementi Higher Education Anti-Harassment Act."
The proposed law would require schools that receive federal student aid "to create policies prohibiting the harassment of any student," said Sen. Frank Lautenberg, D-New Jersey.
InSessions' Jean Casarez in New Brunswick contributed to this report.