/****************************************************************************
**
** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** 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 Digia.  For licensing terms and
** conditions see http://qt.digia.com/licensing.  For further information
** use the contact form at http://qt.digia.com/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: http://www.gnu.org/copyleft/fdl.html.
** $QT_END_LICENSE$
**
****************************************************************************/

/*!
    \example webkitqml/youtubeview
    \title YouTube View Example
    \brief Demonstrates how to embed a web view in a Qt Quick application
    \ingroup webkit-qmlexamples

    The YouTube View \l{Qt QML}{QML} example uses a \l{WebView} to play
    \l{http://www.youtube.com/html5}{HTML5 video clips from YouTube}.

    \image youtubeview-example.png

    The applicaiton makes use of an \l{XmlListModel} to query the \l{https://developers.google.com/youtube}{YouTube API}
    for HTML5 video clips and lists thumbnails of the clips in a \l{ListView} at the top. The \l{WebView} loads a local \c player.html file that
    embeds a YouTube HTML5 video player using the \l{https://developers.google.com/youtube/iframe_api_reference}{IFrame player API},
    which allows to control the YouTube player using JavaScript.

    When clicking on a thumbnail, the corresponding clip is loaded in the WebView by passing the video ID as a query string to \c player.html.
    When the video is started, the thumbnail list is hidden with an animated fade-out, when the video is stopped the list is showed again.
    The specific states of the player change the title of the WebView using \e{document.title} in JavaScript. The application
    is acting on these title changes in the \c{onTitleChanged} slot of the WebView item and thus switches between specific states.
    By default the application loads a list of movie trailers.

    When clicking on the button below the thumbnail list, the application switches to search mode, which allows to search for videos
    using keywords. Additionally it is also possible to choose from a number of preset movie trailer streams.

    \image youtubeview-example-preset.png

    This example uses the QtWebKit QML API that utilizes the WebKit2 split-process architecture.
*/
