From be6eb6f0c7b0b0bfb036ed268069970c1c9f57dd Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Fri, 10 Sep 2021 10:35:04 +0200 Subject: Lock the Window orientation while recording in the recorder example MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit And document the best practice in QMediaPlayer::record(). Pick-to: 6.2 6.2.0 Change-Id: I3f9c69e869d36e3267a2dd33fa86f0b290541227 Reviewed-by: Tor Arne Vestbø Reviewed-by: Assam Boudjelthia --- src/multimedia/recording/qmediarecorder.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/multimedia') diff --git a/src/multimedia/recording/qmediarecorder.cpp b/src/multimedia/recording/qmediarecorder.cpp index c90c88ba2..afa189c89 100644 --- a/src/multimedia/recording/qmediarecorder.cpp +++ b/src/multimedia/recording/qmediarecorder.cpp @@ -330,6 +330,13 @@ qint64 QMediaRecorder::duration() const If recording fails, the error() signal is emitted with recorder state being reset back to \c{QMediaRecorder.StoppedState}. + + \note On mobile devices, recording will happen in the orientation the + device had when calling record and is locked for the duration of the recording. + To avoid artifacts on the user interface, we recommend to keep the user interface + locked to the same orientation as long as the recording is ongoing using + the contentOrientation property of the Window and unlock it again once the recording + is finished. */ /*! Start recording. @@ -339,6 +346,13 @@ qint64 QMediaRecorder::duration() const If recording fails error() signal is emitted with recorder state being reset back to \c{QMediaRecorder::StoppedState}. + + \note On mobile devices, recording will happen in the orientation the + device had when calling record and is locked for the duration of the recording. + To avoid artifacts on the user interface, we recommend to keep the user interface + locked to the same orientation as long as the recording is ongoing using + the contentOrientation property of QWindow and unlock it again once the recording + is finished. */ void QMediaRecorder::record() -- cgit v1.2.3