A California police officer was filmed accidentally shooting a colleague as they aimed loaded guns at one another during an incident described as ‘horseplay’.