/****************************************************************************
**
** Copyright (C) 2021 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:FDL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** 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.
** $QT_END_LICENSE$
**
****************************************************************************/

/*!
    \example multimediawidgets/player
    \title Media Player Example
    \ingroup multimedia_examples
    \ingroup video_examples
    \brief Playing audio and video.
    \meta {tag} {widgets}

    \image mediaplayerex.jpg

    \e{Media Player} demonstrates a simple multimedia player that can play
    audio and or video files using various codecs.

    \include examples-run.qdocinc

    The example uses a QMediaPlayer object passed into a QVideoWidget to
    control the video output. To give the application playlist capability
    we also use a QPlayList object.

    To activate the various functions such as play and stop on the dialog,
    the button clicked events emit the play() and stop() signals, which
    are connected to the play() and stop() slots of QMediaPlayer.

    \code
        connect(controls, SIGNAL(play()), player, SLOT(play()));
        connect(controls, SIGNAL(pause()), player, SLOT(pause()));
        connect(controls, SIGNAL(stop()), player, SLOT(stop()));
    \endcode

    We can get the volume (and set our user interface representation)

    \code
        controls->setVolume(player->volume());
    \endcode

    and we can make widget 'volume' changes change the volume

    \code
        connect(controls, SIGNAL(changeVolume(int)), player, SLOT(setVolume(int)));
    \endcode

    The example also allows us to change video properties by means
    of the QVideoWidget object. We can go to Full Screen mode with a single
    button click, and back again.
*/
