NEW BRUNSWICK, N.J. – A former Rutgers University student charged in a high profile invasion of privacy case linked to a student suicide has admitted her role in the secret webcam taping of two male students engaging in sex and has agreed to cooperate with authorities in the ongoing case.

In exchange, Molly Wei, 19, was permitted to enroll in a pretrial intervention program that could result in the charges against her being dropped.

Wei made a brief appearance in Middlesex County Superior Court on Friday, where she waived her right to have the charges against her presented to a grand jury and agreed to enroll in the intervention program.

The former college freshman, who was charged with two counts of invasion of privacy, declined to comment after the 10-minute hearing, but her lawyer said she was cooperating with authorities and that she should “not be a poster child for this.”

Her lawyers have said repeatedly that their client played a minor role in the controversial case.

Wei and Dharun Ravi, 19, were charged in September with the secret taping of Ravi’s roommate, Tyler Clementi, while Clementi engaged in a sexual encounter with another male in their dorm room.

Clementi, 18, committed suicide a few days later by jumping off the George Washington Bridge.

Ravi was charged in a 15-count indictment handed up in April with invasion of privacy and bias intimidation.

Authorities alleged that he targeted Clementi and the other male, identified only by the initials M.B., because they were gay.

Ravi, who could be sentenced to up to 10 years in prison if convicted, is to be arraigned on May 23. He has remained free on $25,000 bail.

Clementi’s parents, who attended Friday’s hearing, were consulted by Middlesex County authorities and apparently agreed with the more lenient sentence for Wei.

In a statement released after the hearing, Jane and Joseph Clementi said that “based on the information supplied to us, we understand that Ms. Wei’s actions, although unlawful, were substantially different in their nature and their extent than the actions of Tyler’s former roommate.”

Wei will be enrolled in the PTI program for three years and must complete 300 hours of community service and undergo counseling on issues like cyber-bullying and alternate lifestyles.

She also has agreed to cooperate in the investigation and to testify for the prosecution in the case against Ravi.

Authorities alleged that Ravi hid a recording device in the dorm room he shared with Clementi and then went to Wei’s dorm room and used a laptop there to stream a webcam feed of the encounter.

The indictment against Ravi charged that he recorded one encounter between Clementi and M.B. on Sept. 19 and tried, but failed, to record a second encounter on Sept. 21.

Clementi, like Wei and Ravi, was a freshman at Rutgers.

His death became a focal point for gay rights advocates who called it an example of the type of bias members of the gay community face.

The incident also has been cited by groups concerned that the Internet has become a vehicle for violating basic privacy rights.

Supporters of Ravi have termed his actions a college prank run amok and have argued that authorities have turned the incident into a more serious criminal offense.