Home · All Classes · Grouped Classes · Annotated · Functions

QMediaContentPlayer Class Reference

The QMediaContentPlayer class is used to immediately, without further intervention, play media. More...

    #include <QMediaContentPlayer>

Public Functions


Detailed Description

The QMediaContentPlayer class is used to immediately, without further intervention, play media.

QMediaContentPlayer is a simple interface to playing media content. Construction will trigger the playing of the media, the media will play until the end without any user intervention. If the media content is not available to be played there will be no error notification.

QMediaContentPlayer will currently not work for media that requires interaction with the host application, such as video.

    Example;
    To Play a notification sound on an event.
    {
        QContent    media = grabNotificationMediaFromPreferences();

        QMediaContentPlayer(media);
    }

Member Function Documentation

QMediaContentPlayer::QMediaContentPlayer ( QUrl const & url, QString const & domain = QLatin1String( "default" ) )

Create a QMediaContentPlayer from a URL.

The URL may point to a local or remote media resource.

The url paramter is a URL representing the location of the media content. The domain is the audio domain in which this media content should exist.

QMediaContentPlayer::QMediaContentPlayer ( QContent const & content, QString const & domain = QLatin1String( "default" ) )

Create a QMediaContentPlayer from a QContent.

This creates a QMediaContentPlayer from a local resource known by Qtopia's Document System.

The content is the QContent representing the location of the media content. The domain is the audio domain in which this media content should exist.

QMediaContentPlayer::QMediaContentPlayer ( QMediaContent * mediaContent )

Create a QMediaContentPlayer from an existing QMediaContent.

An existing QMediaContent maybe used with this constructor. The QMediaContentPlayer takes ownership of this mediaContent parameter.

QMediaContentPlayer::~QMediaContentPlayer ()

Destroy the QMediaContentPlayer.


Copyright © 2007 Trolltech Trademarks
Qtopia 4.3.0