Use this guide to replace a broken camera.
Stick a suction cup near each of the two top corners of the glass panel.
If your suction cups refuse to stick, try cleaning both the glass panel and the suction cup with a mild solvent.
Gently lift the glass panel perpendicular to the face of the LCD enough to clear the steel mounting pins attached along the underside of the top edge of the glass panel.
Pull the glass panel away from the lower edge of the iMac and carefully set it aside.
Remove the two 5.2 mm shouldered T10 Torx screws securing the camera board to the outer case.
Lift the camera board out of the outer case, minding the cable attaching it to the logic board.
Disconnect the camera board by pulling its connector away from the socket on the camera board.