Except as otherwise provided in this code or by court rule, the court may, when it considers it necessary in the interests of justice and the persons involved, direct the trial of any issue of fact joined in a proceeding under this code to be private, and may exclude all persons except the officers of the court, the parties, their witnesses, and counsel.
Ca. Fam. Code § 214