If you repeat the setup/performance, does it stop again? If it was plugged into the mains like your keyboard, A transient voltage anomaly might be to blame?
The keyboard stops recording after 4 minutes. So now, the trickier part is to explain the correlation between the keyboard and the phone. The abrupt stop of the keyboard's recorder affects, in a yet inexplicable way, the phone's camera.