At the trial of an action, a witness can be heard only in the presence and subject to the examination of all the parties to the action, if they choose to attend and examine.
(Enacted by Stats. 1965, Ch. 299.)