To commemorate the event, NASA has released a new video, with actual audio from the mission and visualizations telling the story of how the photograph was almost not taken. NASA used data from the Lunar Reconnaissance Orbiter spacecraft, the scheduled flight plan and the the exact time when the spacecraft begins to rotate to give the astronauts a view of the Earthrise.
The event was highly unanticipated and the astronauts were not expecting to see the Earth rise over the Moon's horizon. The now-iconic picture was almost not taken because, as can be seen in the illustration, the Earth disappears from the astronauts' view just as they are able to locate the color film for the photo.
The astronauts sound disappointed when the Earth disappears, only to realize they can see it in another hatch window.