This question probably lies in the middle ground between Amateur Radio.SE and Aviation.SE.
I have seen a couple of videos where ham radio contacts are made with people on board a commercial aircraft while in flight. In one of the videos, contact is established trough the 2-meter band (VHF) with a passenger carrying his hand-held transceiver on board the flight, while in the other video, contact is made trough the 20-meter band (HF) with the captain of the airplane using the airplane's radio transceiver.
I am curious about what do regulations say in this regard.
Are ham radio contacts allowed from inside an airplane?