added code to capture video in flight