The phrase that is an example of personification is D. the camera played a trick.
Personification attributes human characteristics to non-human entities or objects, and in this case, the camera is described as if it has the ability to play tricks, which is a human action.