summaryrefslogtreecommitdiff
path: root/src/multimedia/doc/src/plugins/qml-multimedia.qdoc
diff options
context:
space:
mode:
Diffstat (limited to 'src/multimedia/doc/src/plugins/qml-multimedia.qdoc')
-rw-r--r--src/multimedia/doc/src/plugins/qml-multimedia.qdoc79
1 files changed, 59 insertions, 20 deletions
diff --git a/src/multimedia/doc/src/plugins/qml-multimedia.qdoc b/src/multimedia/doc/src/plugins/qml-multimedia.qdoc
index b6df70973..f4a57b2a3 100644
--- a/src/multimedia/doc/src/plugins/qml-multimedia.qdoc
+++ b/src/multimedia/doc/src/plugins/qml-multimedia.qdoc
@@ -1,11 +1,11 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2021 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
-** This file is part of the documentation of the Qt Toolkit.
+** This file is part of the FOO module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:FDL$
+** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
@@ -14,13 +14,25 @@
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -35,14 +47,17 @@
\section1 Overview
- The Qt Multimedia module gives developers a simplified way to use audio and video playback, and access camera functionality. The Multimedia QML API provides a QML friendly interface to these features.
+ The Qt Multimedia module gives developers a simplified way to use audio and
+ video playback, and access camera functionality. The Multimedia QML API
+ provides a QML friendly interface to these features.
\section1 Types
\section2 Audio
\l Audio is an easy way to add audio playback to a Qt Quick
- scene. Qt Multimedia provides properties for control, methods (functions) and signals.
+ scene. Qt Multimedia provides properties for control, methods (functions),
+ and signals.
The code extract below shows the creation and use of an Audio instance.
@@ -66,9 +81,14 @@
\endqml
- The snippet above shows how the inclusion of \e playMusic enables audio features on the type that contains it. So that when the parent's MouseArea is clicked the \l {Audio::play()}{play()} method of Audio is run. Other typical audio control methods are available such as \l {Audio::pause}{pause()} and \l {Audio::stop()}{stop()}.
+ The snippet above shows how the inclusion of \e playMusic enables audio
+ features on the type that contains it. So that when the parent's MouseArea
+ is clicked the \l {Audio::play()}{play()} method of Audio is run. Other
+ typical audio control methods are available such as \l {Audio::pause}{pause()}
+ and \l {Audio::stop()}{stop()}.
- Much of the getting / setting of \l Audio parameters is done through properties. These include
+ Much of the getting and setting of \l Audio parameters is done through
+ properties. These include:
\table 70%
\header
\li Property
@@ -117,7 +137,8 @@
\li A description of the current error condition.
\endtable
- The set of signals available allow the developer to create custom behavior when the following events occur,
+ The set of signals available allow the developer to create custom behavior
+ when the following events occur:
\table 70%
\header
@@ -147,7 +168,10 @@
\section2 Video
- Adding video playback, with sound, to a Qt Quick scene is also easy. The process is very similar to that of Audio above, in fact \l {Video} shares many of the property names, methods and signals. Here is the equivalent sample code to implement video playback in a scene
+ Adding video playback, with sound, to a Qt Quick scene is also easy. The
+ process is very similar to that of Audio above, in fact \l {Video} shares
+ many of the property names, methods and signals. Here is the equivalent
+ sample code to implement video playback in a scene.
\qml
@@ -175,13 +199,28 @@
There are similar features like \l {Video::play()}{play()} with new
features specific to video.
- In the above sample when the parent of MouseArea is clicked, an area of 800x600 pixels with an id of 'video', the source "video.avi" will play in that area. Notice also that signals for the \l Keys have been defined so that a spacebar will toggle the pause button; the left arrow will move the current position in the video to 5 seconds previously; and the right arrow will advance the current position in the video by 5 seconds.
+ The behavior and properties of the video object are defined in the
+ above snippet. The source file (video.avi) plays when you click the parent
+ of MouseArea. The video plays in an area of 800 by 600 pixels, and its \b id
+ property has the value \b{video}.
+
+ Notice that because signals for the \l Keys have been defined pressing the:
+ \list
+ \li \b Spacebar toggles the pause button.
+ \li \b{Left Arrow} moves the current position in the video to 5 seconds
+ previously.
+ \li {Right Arrow} advances the current position in the video by 5 seconds.
+ \endlist
- Most of the differences will obviously be about video control and information. There are many properties associated with \l {Video}, most of them deal with meta-data, control of the video media and aspects of presentation.
+ Most of the differences will obviously be about video control and
+ information.
+ There are many properties associated with \l {Video}, most of them deal with
+ meta-data, control of the video media and aspects of presentation.
\section2 SoundEffect
- \l SoundEffect provides a way to play short sound effects, like in video games. Multiple sound effect instances can be played simultaneously.
+ \l SoundEffect provides a way to play short sound effects, as used in video
+ games. Multiple sound effect instances can be played simultaneously.
You should use \l Audio for music playback.
\qml