On the Sopwith Camel, two Vickers Machine guns were mounted on the top of the fuselage, directly in front of the pilot.
Employed by the Sopwith Aviation Company, Harry Kauper designed an interrupter mechanisme (in 1916) which made it possible to fire through the propeller blades without hitting them.
Not an easy task and various design changes were tried before coming to a reliable version. Type No 3 is shown here.
In this animation video, it appears that there's actually quite a bit of time for a gun to fire between the propeller blades.
However, in reality the margin of error was NOT quite that wide. Note that the Vickers machine guns are firing at their own rate (approx. 500 rounds/min.) and are not synchronized.
During a flight, the propeller would be spinning at 1200 - 1500 RPM, which made the exact timing of the interrupter gear a very important issue.