When any offense is committed in view of any magistrate, he or she may, by verbal direction to any sheriff, marshal, or other proper officer or, if no such officer is present, then to any citizen, cause the offender to be arrested and kept in custody for the space of one hour unless he or she shall sooner be taken from such custody by virtue of a warrant issued on complaint under oath. A person so arrested shall not be confined in jail nor put upon trial until arrested by virtue of such a warrant.