(CNN) A Southwest Airlines flight attendant says two pilots live streamed video from a hidden camera in a commercial airliner's lavatory to an iPad in the cockpit, a lawsuit says.

The alleged incident happened February 27, 2017, while Renee Steinaker was working on Flight 1088 from Pittsburgh to Phoenix, according to the complaint that Steinaker and her husband, David Steinaker, filed against the airline and the pilots.

About two and a half hours into the flight, Capt. Terry Graham asked for a flight attendant to come to the cockpit so that he could leave to use the restroom, the complaint says. Airline policy requires that two crew members are in the cockpit at all times, the complaint says.

After Steinaker arrived and Graham left, Steinaker spotted an iPad in the plane's cockpit that appeared to be streaming live video of the pilot inside an airplane lavatory, the lawsuit said.

When the flight attendant asked the co-pilot, Ryan Russell, whether the iPad was streaming video from the lavatory, he said the camera was part of a "new security and top secret security measure that had been installed in the lavatories of all Southwest Airlines' 737-800 planes," the document alleges.

Read More