Maryland's highest court voted yesterday to allow the cameras and tape recorders in the state's courtrooms on an experimental basis, but applied such strict conditions to their use that several judges predicted electronic coverage of trials will be nearly impossible.

The temporary rules change by the Maryland Court of Appeals, which was approved by a 5-to-2 vote, will take effect Jan. 1 and will allow television, radio and newspaper photographers into both trial and appellate courts for 18 months.

The court said, however, that defendants in criminal cases and either party in a civil case not involving government agencies can veto coverage. In addition, "victim" witnesses in criminal cases will be able to prevent their testimony from being recorded and their pictures from being taken, although they cannot stop coverage of the remainder of a trail. The new rules governing courtroom coverage are stricter than those in most other states that permit cameras and tape recorders in courtrooms.

Appeals Court Judges John C. Eldridge and Rita C. Davidson opposed the restrictions, and Eldridge predicted that they would result in no coverage of trials at all.

"The fear has been that if you require consent you're not going to get it," said Montgomery County Circuit Court Judge John McAuliffe, who chaired a judicial committee that recommended and drafted the experimental rules. McAuliffe said, however, that the appeals court judges had indicated they would consider an emergency rules change to drop some of the restrictions if few trials are opened for coverage.

Two judges, Harry A. Cole and Lawrence F. Rodowsky, opposed any use of cameras and recorders. "I have not been persuaded . . . that the adoption of this rule will improve the administration of justice or the understanding of it," Cole said.

Chief Judge Robert C. Murphy, who supported the experiment, noted that many states are allowing electronic coverage on an experimental basis and added, "I think Maryland would be wise to attempt the experiment." Neither Virginia nor the District of Columbia permits such coverage.

To test the new electronic coverage, witnesses, jurors and lawyers participating in trials that are broadcast by radio and television will be interviewed about their reactions to the cameras and microphones. The court will use these surveys in June 1982 to decide whether to allow electronic coverage on a permanent basis.

The court's decision followed a seven-month study by the 12-member committee chaired by McAuliffe and six months of public hearings and drafting of proposed language. The adopted rule closely follows the committee's recommendations, although some proposed provisions, including one requiring media technicians to maintain proper "attire and conduct," were dropped.

All coverage of trials will be done on a "pool" basis, with news organizations sharing the one television camera, one audio system and one photographer allowed in courtrooms. Requests for electronic coverage will have to be made five days before a trial begins, and the parties to the case will then have to agree to coverage in writing.

Only government agencies and officials will be unable to veto coverage by denying their consent. Witnesses, jurors and judges, although not direct parties to court cases, may petition the court to restrict coverage. In case of such a petition, the rules instruct judges to stop coverage if it would be unfair to the person, cause embarrassment or danger, or restrict law enforcement efforts.

McAuliffe said the last provision was included to protect minors, undercover police officers and other persons vulnerable to such exposure.

The new Maryland rules are generally more restrictive than those passed in other states. McAuliffe said, for example, that Maryland is the only state to allow victims of crimes to veto coverage of their own testimony.

The ability of criminal defendants to veto coverage is currently under review by the U.S. Supreme Court, which will hear oral arguments on Wednesday in a case resulting from Florida's electronic coverage law, which does not require consent from criminal defendants. Two police officers accused of burglary appealed their case to the Supreme Court because their trial was televised over their objections.