New Hampshire Rule of Criminal procedure 46 only says that one can photograph trials under certain conditions "Except as otherwise provided by this rule or by other provisions of law", which is standard disclaimer subordinating the restriction to other laws or the remainder of the rule, it does not imply that there exists any general state law against recording. The court cannot "criminalize" on its own, but (State v. Martina and references therein) acknowledge "the inherent criminal contempt authority vested in New Hampshire courts". Violating court rules can thus result in fines, just as illegal parking can result in a fine. Your question appears to focus on the prohibition, and not the criminal record issue.
Chandler v. Florida, 449 U.S. 560 holds that "This Court has no supervisory jurisdiction over state courts, and, in reviewing a state court judgment, is confined to evaluating it in relation to the Federal Constitution", and in general does not take up a suggestion that allowing broadcast coverage of trials. Quoting the prior ruling from the Florida Supreme Court, "Nor does the Sixth Amendment require that the trial -- or any part of it -- be broadcast live or on tape to the public", thus the issue is not (as seen at the time) a US Constitutional one.
A First Amendment theory has gained traction, see Fields v. Philadelphia. It is uncontroversial that expressive acts are protected, but it has also been argued that photographing is sufficiently expressive (e.g. the instant case). The 3rd Circuit court agreed with the other odd-numbered circuits "that there is a First Amendment right to record police activity in public". The opinion reasons in §4 based on the future expressive value of photographs. Photographs are an essential component of the future expression. However,
We do not say that all recording is protected or desirable. The
right to record police is not absolute. “[I]t is subject to
reasonable time, place, and manner restrictions.” Kelly, 622
F.3d at 262
The New Hampshire rules are a statement of what those reasonable restrictions are, up to the point of judicial discretion to determine that photographing would be disruptive.
SCOTUS has not declared a First Amendment right to photograph court proceedings, but the potential for such a finding is evident, based on the right to photograph police.