CopperSpice API  1.7.2
QMediaPlayer Class Reference

Allows the playing of a media source. More...

Inheritance diagram for QMediaPlayer:
QMediaObject QObject

Public Typedefs

using Flags = QFlags< Flag >
 

Public Types

enum  Error
 
enum  Flag
 
enum  MediaStatus
 
enum  State
 

Public Signals

void audioAvailableChanged (bool available)
 
void audioRoleChanged (QAudio::Role role)
 
void bufferStatusChanged (int percentFilled)
 
void currentMediaChanged (const QMediaContent &media)
 
void durationChanged (qint64 duration)
 
void error (QMediaPlayer::Error error)
 
void mediaChanged (const QMediaContent &media)
 
void mediaStatusChanged (QMediaPlayer::MediaStatus status)
 
void mutedChanged (bool muted)
 
void networkConfigurationChanged (const QNetworkConfiguration &configuration)
 
void playbackRateChanged (qreal rate)
 
void positionChanged (qint64 position)
 
void seekableChanged (bool seekable)
 
void stateChanged (QMediaPlayer::State newState)
 
void videoAvailableChanged (bool videoAvailable)
 
void volumeChanged (int volume)
 
- Public Signals inherited from QMediaObject
void availabilityChanged (bool available)
 
void availabilityChanged (QMultimedia::AvailabilityStatus availability)
 
void metaDataAvailableChanged (bool available)
 
void metaDataChanged ()
 
void metaDataChanged (const QString &key, const QVariant &value)
 
void notifyIntervalChanged (int milliSeconds)
 
- Public Signals inherited from QObject
void destroyed (QObject *obj=nullptr)
 
void objectNameChanged (const QString &objectName)
 

Public Slots

void pause ()
 
void play ()
 
void setMedia (const QMediaContent &media, QIODevice *stream=nullptr)
 
void setMuted (bool muted)
 
void setNetworkConfigurations (const QList< QNetworkConfiguration > &configurations)
 
void setPlaybackRate (qreal rate)
 
void setPlaylist (QMediaPlaylist *playlist)
 
void setPosition (qint64 position)
 
void setVolume (int volume)
 
void stop ()
 
- Public Slots inherited from QObject
void deleteLater ()
 

Public Methods

 QMediaPlayer (QObject *parent=nullptr, Flags flags=Flags ())
 
 ~QMediaPlayer ()
 
QAudio::Role audioRole () const
 
QMultimedia::AvailabilityStatus availability () const override
 
int bufferStatus () const
 
QMediaContent currentMedia () const
 
QNetworkConfiguration currentNetworkConfiguration () const
 
qint64 duration () const
 
Error error () const
 
QString errorString () const
 
bool isAudioAvailable () const
 
bool isMuted () const
 
bool isSeekable () const
 
bool isVideoAvailable () const
 
QMediaContent media () const
 
MediaStatus mediaStatus () const
 
const QIODevicemediaStream () const
 
qreal playbackRate () const
 
QMediaPlaylistplaylist () const
 
qint64 position () const
 
void setAudioRole (QAudio::Role audioRole)
 
void setVideoOutput (QAbstractVideoSurface *surface)
 
void setVideoOutput (QGraphicsVideoItem *)
 
void setVideoOutput (QVideoWidget *)
 
State state () const
 
QList< QAudio::RolesupportedAudioRoles () const
 
int volume () const
 
- Public Methods inherited from QMediaObject
 ~QMediaObject ()
 
QStringList availableMetaData () const
 
virtual bool bind (QObject *)
 
virtual bool isAvailable () const
 
bool isMetaDataAvailable () const
 
QVariant metaData (const QString &key) const
 
int notifyInterval () const
 
virtual QMediaServiceservice () const
 
void setNotifyInterval (int milliSeconds)
 
virtual void unbind (QObject *)
 
- Public Methods inherited from QObject
 QObject (QObject *parent=nullptr)
 
 ~QObject ()
 
bool blockSignals (bool block)
 
const QList< QObject * > & children () const
 
bool connect (const QObject *sender, const QString &signalMethod, const QString &location, const QString &slotMethod, Qt::ConnectionType type=Qt::AutoConnection)
 
bool connect (const QObject *sender, const QString &signalMethod, const QString &slotMethod, Qt::ConnectionType type=Qt::AutoConnection)
 
bool disconnect (const QObject *receiver, const QString &slotMethod=QString ()) const
 
bool disconnect (const QString &signalMethod, const QString &location, const QObject *receiver=nullptr, const QString &slotMethod=QString ()) const
 
bool disconnect (const QString &signalMethod=QString (), const QObject *receiver=nullptr, const QString &slotMethod=QString ()) const
 
void dumpObjectInfo ()
 
void dumpObjectTree ()
 
QList< QStringdynamicPropertyNames () const
 
virtual bool event (QEvent *event)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
template<typename T >
findChild (const QString &childName=QString ()) const
 
template<class T >
QList< T > findChildren (const QRegularExpression &regExp, Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 
template<class T >
QList< T > findChildren (const QString &objName=QString (), Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 
bool inherits (const QString &className) const
 
void installEventFilter (QObject *filterObj)
 
bool isWidgetType () const
 
bool isWindowType () const
 
void killTimer (int id)
 
const QMetaObjectmetaObject () const
 
void moveToThread (QThread *targetThread)
 
QString objectName () const
 
QObject * parent () const
 
template<class T = QVariant>
property (const QString &name) const
 
void removeEventFilter (QObject *obj)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
bool setProperty (const QString &name, const QVariant &value)
 
bool signalsBlocked () const
 
int startTimer (int interval, Qt::TimerType timerType=Qt::CoarseTimer)
 
QThreadthread () const
 

Static Public Methods

static QMultimedia::SupportEstimate hasSupport (const QString &mimeType, const QStringList &codecs=QStringList (), Flags flags=Flags ())
 
static QStringList supportedMimeTypes (Flags flags=Flags ())
 
- Static Public Methods inherited from QObject
static bool connect (const QObject *sender, const QMetaMethod &signalMethod, const QObject *receiver, const QMetaMethod &slotMethod, Qt::ConnectionType type=Qt::AutoConnection)
 
static bool connect (const QObject *sender, const QString &signalMethod, const QObject *receiver, const QString &slotMethod, Qt::ConnectionType type=Qt::AutoConnection, const QString &location=QString ())
 
static bool connect (const QObject *sender, const QString &signalMethod, const QString &location, const QObject *receiver, const QString &slotMethod, Qt::ConnectionType type=Qt::AutoConnection)
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver , class SlotClass , class... SlotArgs, class SlotReturn >
static bool connect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, SlotReturn (SlotClass::*slotMethod)(SlotArgs...), Qt::ConnectionType type=Qt::AutoConnection)
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver , class T >
static bool connect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, T slotLambda, Qt::ConnectionType type=Qt::AutoConnection)
 
static bool disconnect (const QObject *sender, const QMetaMethod &signalMethod, const QObject *receiver, const QMetaMethod &slotMethod)
 
static bool disconnect (const QObject *sender, const QString &signalMethod, const QObject *receiver, const QString &slotMethod)
 
static bool disconnect (const QObject *sender, const QString &signalMethod, const QString &location, const QObject *receiver, const QString &slotMethod)
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver , class SlotClass , class... SlotArgs, class SlotReturn >
static bool disconnect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, SlotReturn (SlotClass::*slotMethod)(SlotArgs...))
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver >
static bool disconnect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, std::nullptr_t slotMethod=nullptr)
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver , class T >
static bool disconnect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, T slotMethod)
 
static QMetaObjectstaticMetaObject ()
 
static QString tr (const char *text, const char *comment=nullptr, std::optional< int > numArg=std::optional< int >())
 

Properties

 audioAvailable
 Audio availability status for the current media. More...
 
 audioRole
 Audio stream played by the media player. More...
 
 bufferStatus
 Percentage of the temporary buffer filled before playback begins or resumes. More...
 
 currentMedia
 Current active media content being played by the player object. More...
 
 duration
 Duration of the current media. More...
 
 error
 String describing the last error condition. More...
 
 media
 Active media source used by the player object. More...
 
 mediaStatus
 Status of the current media stream. More...
 
 muted
 Muted state of the current media. More...
 
 playbackRate
 Playback rate of the current media. More...
 
 playlist
 Media playlist being used by the player object. More...
 
 position
 Playback position of the current media. More...
 
 seekable
 Seekable status of the current media. More...
 
 state
 Media player's current playback state. More...
 
 videoAvailable
 Video availability status for the current media. More...
 
 volume
 Current playback volume. More...
 
- Properties inherited from QMediaObject
 notifyInterval
 
- Properties inherited from QObject
 objectName
 

Additional Inherited Members

- Protected Methods inherited from QMediaObject
 QMediaObject (QObject *parent, QMediaService *service)
 
template<typename T >
void addPropertyWatch (const QString &name)
 
void removePropertyWatch (const QString &name)
 
- Protected Methods inherited from QObject
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const QMetaMethod &signalMethod) const
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const QMetaMethod &signalMethod) const
 
bool isSignalConnected (const QMetaMethod &signalMethod) const
 
int receivers (const QString &signal) const
 
QObject * sender () const
 
int senderSignalIndex () const
 
virtual void timerEvent (QTimerEvent *event)
 

Detailed Description

The QMediaPlayer class is a high level media playback class. It can be used to playback such content as songs, movies and internet radio. The content to playback is specified as a QMediaContent object, which can be thought of as a main or canonical URL with additional information attached. When provided with a QMediaContent playback may be able to commence.

player = new QMediaPlayer;
connect(player, SIGNAL(positionChanged(qint64)), this, SLOT(positionChanged(qint64)));
player->setMedia(QUrl::fromLocalFile("/Users/me/Music/coolsong.mp3"));
player->setVolume(50);
player->play();

QVideoWidget can be used with QMediaPlayer for video rendering and QMediaPlaylist for accessing playlist functionality.

playlist->addMedia(QUrl("http://example.com/movie1.mp4"));
playlist->addMedia(QUrl("http://example.com/movie2.mp4"));
playlist->addMedia(QUrl("http://example.com/movie3.mp4"));
playlist->setCurrentIndex(1);
player = new QMediaPlayer;
player->setPlaylist(playlist);
videoWidget = new QVideoWidget;
player->setVideoOutput(videoWidget);
videoWidget->show();
player->play();

Since QMediaPlayer is a QMediaObject, you can use several of the QMediaObject functions for things like:

See also
QMediaObject, QMediaService, QVideoWidget, QMediaPlaylist

Member Typedef Documentation

Typedef for QFlags<Flag>. Refer to QMediaPlayer::Flag for documentation.

Member Enumeration Documentation

Defines a media player error condition.

ConstantValueDescription
QMediaPlayer::NoError 0 No error has occurred.
QMediaPlayer::ResourceError 1 Media resource could not be resolved
QMediaPlayer::FormatError 2 Format of a media resource is not (fully) supported. Playback may still be possible, but without an audio or video component.
QMediaPlayer::NetworkError 3 Network error occurred
QMediaPlayer::AccessDeniedError 4 There are not the appropriate permissions to play a media resource.
QMediaPlayer::ServiceMissingError 5 valid playback service was not found, playback cannot proceed
ConstantValueDescription
QMediaPlayer::LowLatency 0 Player is expected to be used with simple audio formats, however playback should start without significant delay. Such playback service can be used for beeps, ringtones, etc.
QMediaPlayer::StreamPlayback 1 Player is expected to play QIODevice based streams. If passed to QMediaPlayer constructor, the service supporting. streams playback will be chosen.
QMediaPlayer::VideoSurface 2 Player is expected to be able to render to a QAbstractVideoSurface::setVideoOutput().

Defines the status of a media player's current media.

ConstantValueDescription
QMediaPlayer::UnknownMediaStatus 0 Status of the media can not be determined.
QMediaPlayer::NoMedia 1 No current media, player is in the StoppedState.
QMediaPlayer::LoadingMedia 2 Current media is being loaded, player may be in any state.
QMediaPlayer::LoadedMedia 3 Current media has been loaded, player is in the StoppedState.
QMediaPlayer::StalledMedia 4 Playback of the current media has stalled due to insufficient buffering or some other temporary interruption. Player is in the PlayingState or PausedState.
QMediaPlayer::BufferingMedia 5 The player is buffering data but has enough data buffered for playback to continue for the immediate future. Player is in the PlayingState or PausedState.
QMediaPlayer::BufferedMedia 6 Player has fully buffered the current media, player is in the PlayingState or PausedState.
QMediaPlayer::EndOfMedia 7 Playback has reached the end of the current media,.player is in the StoppedState.
QMediaPlayer::InvalidMedia 8 Current media can not be played, player is in the StoppedState.

Defines the current state of a media player.

ConstantValueDescription
QMediaPlayer::StoppedState 0 Media player is not playing content, playback will begin from the start of the current track.
QMediaPlayer::PlayingState 1 Media player is currently playing content.
QMediaPlayer::PausedState 2 Media player has paused playback, playback of the current track will resume from the position here the player was paused.

Constructor & Destructor Documentation

QMediaPlayer::QMediaPlayer ( QObject parent = nullptr,
QMediaPlayer::Flags  flags = Flags() 
)
explicit

Construct a QMediaPlayer instance parented to parent and with flags.

QMediaPlayer::~QMediaPlayer ( )

Destroys the player object.

Method Documentation

void QMediaPlayer::audioAvailableChanged ( bool  available)
signal

Signals the availability of audio content has changed to available.

QAudio::Role QMediaPlayer::audioRole ( ) const

Documentation pending.

void QMediaPlayer::audioRoleChanged ( QAudio::Role  role)
signal

Signals that the audio role of the media player has changed.

QMultimedia::AvailabilityStatus QMediaPlayer::availability ( ) const
overridevirtual

Returns the availability of the functionality offered by this object.

In some cases the functionality may not be available (for example, if the current operating system or platform does not provide the required functionality), or it may be temporarily unavailable (for example, audio playback during a phone call or similar).

Reimplemented from QMediaObject.

int QMediaPlayer::bufferStatus ( ) const

Documentation pending.

void QMediaPlayer::bufferStatusChanged ( int  percentFilled)
signal

Signal the amount of the local buffer filled as a percentage by percentFilled.

QMediaContent QMediaPlayer::currentMedia ( ) const

Documentation pending.

void QMediaPlayer::currentMediaChanged ( const QMediaContent media)
signal

Signals that the current playing content has been changed to media.

See also
currentMedia(), mediaChanged()
QNetworkConfiguration QMediaPlayer::currentNetworkConfiguration ( ) const

Returns the current network access point in use. If a default constructed QNetworkConfiguration is returned this feature is not available or that none of the current supplied configurations are in use.

qint64 QMediaPlayer::duration ( ) const

Documentation pending.

void QMediaPlayer::durationChanged ( qint64  duration)
signal

Signal the duration of the content has changed to duration, expressed in milliseconds.

QMediaPlayer::Error QMediaPlayer::error ( ) const

Returns the current error state.

void QMediaPlayer::error ( QMediaPlayer::Error  error)
signal

Signals that an error condition has occurred.

See also
errorString()
QString QMediaPlayer::errorString ( ) const

Returns the value of the error property.

QMultimedia::SupportEstimate QMediaPlayer::hasSupport ( const QString mimeType,
const QStringList codecs = QStringList(),
Flags  flags = Flags() 
)
static

Returns the level of support a media player has for a mimeType and a set of codecs.

The flags argument allows additional requirements such as performance indicators to be specified.

bool QMediaPlayer::isAudioAvailable ( ) const

Returns the value of the audio availability status property.

bool QMediaPlayer::isMuted ( ) const

Returns the value of the muted property.

bool QMediaPlayer::isSeekable ( ) const

Returns the value of the seekable property.

bool QMediaPlayer::isVideoAvailable ( ) const

Returns the value of the video available property.

QMediaContent QMediaPlayer::media ( ) const

Returns the value of the property for the active media source used by the play object.

void QMediaPlayer::mediaChanged ( const QMediaContent media)
signal

Signals that the media source has been changed to media.

See also
media(), currentMediaChanged()
MediaStatus QMediaPlayer::mediaStatus ( ) const

Returns the value of the property indicating how the playback of the current stream is progressing.

void QMediaPlayer::mediaStatusChanged ( QMediaPlayer::MediaStatus  status)
signal

Signals that the status of the current media has changed.

See also
mediaStatus()
const QIODevice * QMediaPlayer::mediaStream ( ) const

Returns the stream source of media data. This is only valid if a stream was passed to setMedia().

See also
setMedia()
void QMediaPlayer::mutedChanged ( bool  muted)
signal

Signal the mute state has changed to muted.

void QMediaPlayer::networkConfigurationChanged ( const QNetworkConfiguration configuration)
signal

Signal that the active in use network access point has been changed to configuration and all subsequent network access will use this configuration.

void QMediaPlayer::pause ( )
slot

Pause playing the current source.

void QMediaPlayer::play ( )
slot

Start or resume playing the current source.

qreal QMediaPlayer::playbackRate ( ) const

Documentation pending.

void QMediaPlayer::playbackRateChanged ( qreal  rate)
signal

Signals the playbackRate has changed to rate.

QMediaPlaylist * QMediaPlayer::playlist ( ) const

Documentation pending.

qint64 QMediaPlayer::position ( ) const

Returns the value of the property containing the playback position of the current media.

void QMediaPlayer::positionChanged ( qint64  position)
signal

Signal the position of the content has changed to position, expressed in milliseconds.

void QMediaPlayer::seekableChanged ( bool  seekable)
signal

Signals the seekable status of the player object has changed.

void QMediaPlayer::setAudioRole ( QAudio::Role  audioRold)

Documentation pending.

void QMediaPlayer::setMedia ( const QMediaContent media,
QIODevice stream = nullptr 
)
slot

Sets the current media source.

If a stream is supplied, media data will be read from it instead of resolving the media source. In this case the media source may still be used to resolve additional information about the media such as mime type. The stream must be open and readable.

Setting the media to a null QMediaContent will cause the player to discard all information relating to the current media source and to cease all I/O operations related to that media.

Note
This method returns immediately after recording the specified source of the media. It does not wait for the media to finish loading and does not check for errors. Listen for the mediaStatusChanged() and error() signals to be notified when the media is loaded and when an error occurs during loading.
void QMediaPlayer::setMuted ( bool  muted)
slot

Documentation pending.

void QMediaPlayer::setNetworkConfigurations ( const QList< QNetworkConfiguration > &  configurations)
slot

Sets the network access points for remote media playback. configurations contains, in ascending preferential order, a list of configuration that can be used for network access.

This will invalidate the choice of previous configurations.

void QMediaPlayer::setPlaybackRate ( qreal  rate)
slot

Documentation pending.

void QMediaPlayer::setPlaylist ( QMediaPlaylist playlist)
slot

Documentation pending.

void QMediaPlayer::setPosition ( qint64  position)
slot

Documentation pending.

void QMediaPlayer::setVideoOutput ( QAbstractVideoSurface surface)

Sets a video surface as the video output of a media player.

If a video output has already been set on the media player the new surface will replace it.

void QMediaPlayer::setVideoOutput ( QGraphicsVideoItem output)

Attach a QGraphicsVideoItem video output to the media player. If the media player has already video output attached, it will be replaced with a new one.

void QMediaPlayer::setVideoOutput ( QVideoWidget output)

Attach a QVideoWidget video output to the media player. If the media player has already video output attached, it will be replaced with a new one.

void QMediaPlayer::setVolume ( int  volume)
slot

Documentation pending.

State QMediaPlayer::state ( ) const

Documentation pending.

void QMediaPlayer::stateChanged ( QMediaPlayer::State  newState)
signal

Signal the state of the Player object has changed.

void QMediaPlayer::stop ( )
slot

Stop playing, and reset the play position to the beginning.

QList< QAudio::Role > QMediaPlayer::supportedAudioRoles ( ) const

Returns a list of supported audio roles.

If setting the audio role is not supported, an empty list is returned.

See also
audioRole
QStringList QMediaPlayer::supportedMimeTypes ( Flags  flags = Flags())
deprecatedstatic
Deprecated:

Returns a list of MIME types supported by the media player.

The flags argument causes the resultant list to be restricted to MIME types which can be supported given additional requirements, such as performance indicators.

This function may not return useful results on some platforms, and support for a specific file of a given mime type is not guaranteed even if the mime type is in general supported. In addition, in some cases this function will need to load all available media plugins and query them for their support, which may take some time.

void QMediaPlayer::videoAvailableChanged ( bool  videoAvailable)
signal

Signal the availability of visual content has changed to videoAvailable.

int QMediaPlayer::volume ( ) const

Returns the value of the volume property.

void QMediaPlayer::volumeChanged ( int  volume)
signal

Signal the playback volume has changed to volume.

Property Documentation

QMediaPlayer::audioAvailable

This property stores the audio availability status for the current media.

As the life time of QMediaPlayer can be longer than the playback of one QMediaContent, this property may change over time, the audioAvailableChanged signal can be used to monitor it's status.

PropertiesClass Methods
read isAudioAvailable
notify audioAvailableChanged
QMediaPlayer::audioRole

This property defines the role of the audio stream played by the media player.

This property can be set to specify the type of audio being played, allowing the system to make appropriate decisions when it comes to volume, routing or post-processing. The audio role must be set before calling setMedia().

See also
supportedAudioRoles()
PropertiesClass Methods
read audioRole
write setAudioRole
QMediaPlayer::bufferStatus

This property defines the percentage of the temporary buffer filled before playback begins or resumes, from 0 (empty) to 100 (full).

When the player object is buffering; this property holds the percentage of the temporary buffer that is filled. The buffer will need to reach 100% filled before playback can start or resume, at which time mediaStatus() will return BufferedMedia or BufferingMedia. If the value is anything lower than 100, mediaStatus() will return StalledMedia.

See also
mediaStatus()
PropertiesClass Methods
read bufferStatus
notify bufferStatusChanged
QMediaPlayer::currentMedia

The property stores the current active media content being played by the player object.

This value could be different from QMediaPlayer::media property if a playlist is used. In this case currentMedia indicates the current media content being processed by the player, while QMediaPlayer::media property contains the original playlist.

See also
QMediaContent, media()
PropertiesClass Methods
read currentMedia
notify currentMediaChanged
QMediaPlayer::duration

This property stores the duration of the current media.

The value is the total playback time in milliseconds of the current media. The value may change across the life time of the QMediaPlayer object and may not be available when initial playback begins, connect to the durationChanged() signal to receive status notifications.

PropertiesClass Methods
read duration
notify durationChanged
QMediaPlayer::error

This property contains a string describing the last error condition.

See also
error()
PropertiesClass Methods
read errorString
QMediaPlayer::media

This property stores the active media source being used by the player object. The player object will use the QMediaContent for selection of the content to be played. By default this property has a null QMediaContent.

Setting this property to a null QMediaContent will cause the player to discard all information relating to the current media source and to cease all I/O operations related to that media.

See also
QMediaContent, currentMedia()
PropertiesClass Methods
read media
write cs_setMedia
notify mediaChanged
QMediaPlayer::mediaStatus

This property stores the status of the current media stream. The stream status describes how the playback of the current stream is progressing. By default this property is QMediaPlayer::NoMedia.

See also
state
PropertiesClass Methods
read mediaStatus
notify mediaStatusChanged
QMediaPlayer::muted

This property stores the muted state of the current media. The value will be true if the playback volume is muted, otherwise false.

PropertiesClass Methods
read isMuted
write setMuted
notify mutedChanged
QMediaPlayer::playbackRate

This property defines the playback rate of the current media.

This value is a multiplier applied to the media's standard play rate. By default this value is 1.0, indicating that the media is playing at the standard pace. Values higher than 1.0 will increase the rate of play. Values less than zero can be set and indicate the media will rewind at the multiplier of the standard pace.

Not all playback services support change of the playback rate. The quality of audio and video while fast forwarding or rewinding depends on the platform media backend.

PropertiesClass Methods
read playbackRate
write setPlaybackRate
notify playbackRateChanged
QMediaPlayer::playlist

This property stores the media playlist being used by the player object. The player object will use the current playlist item for selection of the content to be played. By default this property is set to null.

If the media playlist is used as a source, QMediaPlayer::currentMedia is updated with a current playlist item. The current source should be selected with QMediaPlaylist::setCurrentIndex(int) instead of QMediaPlayer::setMedia(), otherwise the current playlist will be discarded.

See also
QMediaContent
PropertiesClass Methods
read playlist
write setPlaylist
QMediaPlayer::position

This property stores the playback position of the current media.

The value is the current playback position, expressed in milliseconds since the beginning of the media. Periodically changes in the position will be indicated with the signal positionChanged(), the interval between updates can be set with QMediaObject's method setNotifyInterval().

PropertiesClass Methods
read position
write setPosition
notify positionChanged
QMediaPlayer::seekable

This property stores the seekable status of the current media.

If seeking is supported this property will be true; false otherwise. The status of this property may change across the life time of the QMediaPlayer object, use the seekableChanged signal to monitor changes.

PropertiesClass Methods
read isSeekable
notify seekableChanged
QMediaPlayer::state

This property stores the media player's current playback state. By default this property is QMediaPlayer::Stopped

See also
mediaStatus(), play(), pause(), stop()
PropertiesClass Methods
read state
notify stateChanged
QMediaPlayer::videoAvailable

This property stores the Video availability status for the current media.

If available, the QVideoWidget class can be used to view the video. As the life time of QMediaPlayer can be longer than the playback of one QMediaContent, this property may change over time, the videoAvailableChanged signal can be used to monitor it is status.

See also
QVideoWidget, QMediaContent
PropertiesClass Methods
read isVideoAvailable
notify videoAvailableChanged
QMediaPlayer::volume

This property contains the current playback volume. The playback volume is linear in effect and the value can range from 0 - 100, values outside this range will be clamped.

PropertiesClass Methods
read volume
write setVolume
notify volumeChanged