The revolver camera from 1938. This is, of course, just a scaled down version of the gun cameras that are still used today on military aircraft to facilitate damage assessment and help evaluate tactics. Unfortunately, this smaller version doesn’t seem to have caught on. I can’t seem to find any information on how well the camera survived the shock of the revolver firing, but that might have been a reason why it was not successful.
Today it should be fairly easy to design a system that would work, though, even possibly one that records video with sound. In fact, it might be a good idea to equip police firearms with recording devices that would help with the investigation that follows a shooting.