A party may, in lieu of presenting direct testimony, offer the prepared testimony of relevant witnesses in the form of affidavits or declarations under penalty of perjury. The prepared testimony may include, but need not be limited to, the opinions of expert witnesses, and testimony which authenticates documentary evidence. To the extent the contents of the prepared testimony would have been admissible were the witness to testify orally thereto, the prepared testimony shall be received as evidence in the case, provided that either of the following applies:
The court shall determine whether the affidavit or declaration shall be read into the record in lieu of oral testimony or admitted as a documentary exhibit.
Ca. Civ. Proc. Code § 98