QMediaContent

PyQt5.QtMultimedia.QMediaContent

Description

The QMediaContent class provides access to the resources relating to a media content.

QMediaContent is used within the multimedia framework as the logical handle to media content. A QMediaContent object is composed of one or more QMediaResources where each resource provides the URL and format information of a different encoding of the content.

A non-null QMediaContent will always have a primary or canonical reference to the content available through the canonicalUrl() or canonicalResource() methods, any additional resources are optional.

Alternatively QMediaContent can represent a playlist and contain a pointer to a valid QMediaPlaylist object. In this case URL is optional and can either be empty or point to the playlist URL.

Methods

__init__()

Constructs a null QMediaContent.


__init__(QUrl)

Constructs a media content with url providing a reference to the content.


__init__(QNetworkRequest)

TODO


__init__(QMediaResource)

TODO


__init__(Iterable[QMediaResource])

TODO


__init__(QMediaContent)

Constructs a copy of the media content other.


__init__(QMediaPlaylist, contentUrl: QUrl = QUrl())

TODO


canonicalRequest() → QNetworkRequest

Returns a QNetworkRequest that represents that canonical resource for this media content.


canonicalResource() → QMediaResource

Returns a QMediaResource that represents that canonical resource for this media content.


canonicalUrl() → QUrl

Returns a QUrl that represents that canonical resource for this media content.


__eq__(QMediaContent) → bool

TODO


isNull() → bool

Returns true if this media content is null (uninitialized); false otherwise.


__ne__(QMediaContent) → bool

TODO


playlist() → QMediaPlaylist

Returns a playlist for this media content or 0 if this QMediaContent is not a playlist.


request() → QNetworkRequest

TODO


resources() → List[QMediaResource]

Returns a list of alternative resources for this media content. The first item in this list is always the canonical resource.