API for video recording and playback