Sec. 4. (a) After an indictment has been returned or a complaint filed, on its own motion or on the motion of the attorney representing the state or the attorney representing the defendant, the court may order that the testimony of the child be taken outside the courtroom and be recorded for showing in the courtroom before the court and the finder of fact. To the extent practicable, only those persons permitted to be present at the taking of testimony under Section 3 of this article may be present during the taking of the child's testimony, and the persons operating the equipment shall be confined from the child's sight and hearing as provided by Section 3. The court shall permit the defendant to observe and hear the testimony of the child and to communicate contemporaneously with his attorney during periods of recess or by audio contact but shall attempt to ensure that the child cannot hear or see the defendant.
(b) The court may set any other conditions and limitations on the taking of the testimony that it finds just and appropriate, taking into consideration the interests of the child, the rights of the defendant, and any other relevant factors. The court shall also ensure that:
(1) the recording is both visual and aural and is recorded on film or videotape or by other electronic means;
(2) the recording equipment was capable of making an accurate recording, the operator was competent, the quality of the recording is sufficient to allow the court and the finder of fact to assess the demeanor of the child and the interviewer, and the recording is accurate and is not altered;
(3) each voice on the recording is identified;
(4) the defendant, the attorneys for each party, and the expert witnesses for each party are afforded an opportunity to view the recording before it is shown in the courtroom;
(5) before giving his testimony, the child was placed under oath or was otherwise admonished in a manner appropriate to the child's age and maturity to testify truthfully;
(6) the court finds from the recording or through an in camera examination of the child that the child was competent to testify at the time the recording was made; and
(7) only one continuous recording of the child was made or the necessity for pauses in the recordings or for multiple recordings is established at the hearing or proceeding.
(c) After a complaint has been filed or an indictment returned charging the defendant, on the motion of the attorney representing the state, the court may order that the deposition of the child be taken outside of the courtroom in the same manner as a deposition may be taken in a civil matter. A deposition taken under this subsection is admissible into evidence.