In all cases arising under this chapter in which a person is charged with contempt in a court of this state, the accused shall enjoy the right to a speedy and public trial by an impartial jury, except when the contempt is alleged to have been committed in the presence of the court or so near thereto as to interfere directly with the administration of justice, or when the alleged contempt is the misbehavior, misconduct, or disobedience of any officer of the court in respect to a writ, order, or process of the court.
N.D.C.C. § 34-08-11