Proper timing / event handling for image and video playback.