On August 18th, 2018 I was on an airplane flying from North Carolina to Los Angeles. When we were passing Denver, Colorado (or close to Denver according to the airplane map), I opened my window and saw that there was a thunderstorm a couple of miles away. I was sitting on the left side of the plane in the window seat and the storm was directly in front of my window. I pulled out my phone to take a video of the lightning because I thought it looked pretty cool from how high up we were. While I was filming, I noticed a flashing red and white light flying. It was flying the opposite direction of the plane I was in. The object was flying in a straight line, and then it started to lower, stopped blinking for a second, and then when it started blinking again, it was up high again as if it had reversed. It then kept flying away. It looked almost like a drone, but because of how high up we were, there is no way it was a drone or a building light, etc. I also thought it could have been a plane, but because of how quickly it moved, I didn’t think it could be that either. I think I would of been able to see the outline of the plane if that had been what it was also. It was very small and I didn’t see it’s shape because of how dark it was. I caught it all on video though and it still confuses me.
Note: I believe that the witness may have seen a distant aircraft which was passing in the opposite direction. The apparent abrupt change in altitude and the reversal of direction could have been due to movement of the cell phone camera.