diff options
author | Lars Knoll <lars.knoll@qt.io> | 2021-09-10 10:35:04 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2021-09-10 11:24:21 +0200 |
commit | be6eb6f0c7b0b0bfb036ed268069970c1c9f57dd (patch) | |
tree | efd615b1ffd2a06643c3cc6167f041b88817ec65 /src/multimedia | |
parent | 0de80f19158d849b83426aacfaca289264751586 (diff) |
Lock the Window orientation while recording in the recorder example
And document the best practice in QMediaPlayer::record().
Pick-to: 6.2 6.2.0
Change-Id: I3f9c69e869d36e3267a2dd33fa86f0b290541227
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Diffstat (limited to 'src/multimedia')
-rw-r--r-- | src/multimedia/recording/qmediarecorder.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
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() |