QMediaGaplessPlaybackControl

The QMediaGaplessPlaybackControl class provides access to the gapless playback related control of a QMediaService . More

Inheritance diagram of PySide2.QtMultimedia.QMediaGaplessPlaybackControl

Detailed Description

If a QMediaService supports gapless playback it will implement QMediaGaplessPlaybackControl . This control provides a means to set the next media or crossfade time for smooth transitions between tracks.

The functionality provided by this control is exposed to application code through the QMediaPlayer class.

The interface name of QMediaGaplessPlaybackControl is org.qt-project.qt.mediagaplessplaybackcontrol/5.0 as defined in QMediaGaplessPlaybackControl_iid .

class PySide2.QtMultimedia.QMediaGaplessPlaybackControl([parent=None])
param parent:

PySide2.QtCore.QObject

Constructs a new gapless playback control with the given parent .

PySide2.QtMultimedia.QMediaGaplessPlaybackControl.advancedToNextMedia()
PySide2.QtMultimedia.QMediaGaplessPlaybackControl.crossfadeTime()
Return type:

float

Returns current crossfade time in seconds.

PySide2.QtMultimedia.QMediaGaplessPlaybackControl.crossfadeTimeChanged(crossfadeTime)
Parameters:

crossfadeTime – float

PySide2.QtMultimedia.QMediaGaplessPlaybackControl.isCrossfadeSupported()
Return type:

bool

Indicates whether crossfading is supported or not. If crossfading is not supported, setCrossfadeTime() will be ignored and crossfadeTime() will always return 0.

PySide2.QtMultimedia.QMediaGaplessPlaybackControl.nextMedia()
Return type:

PySide2.QtMultimedia.QMediaContent

Returns the content of the next media

See also

setNextMedia()

PySide2.QtMultimedia.QMediaGaplessPlaybackControl.nextMediaChanged(media)
Parameters:

mediaPySide2.QtMultimedia.QMediaContent

PySide2.QtMultimedia.QMediaGaplessPlaybackControl.setCrossfadeTime(crossfadeTime)
Parameters:

crossfadeTime – float

Sets the crossfadeTime in seconds for smooth transition.

Positive value means how much time it will take for the next media to transit from silent to full volume and vice versa for current one. So both current and the next one will be playing during this period of time.

A crossfade time of zero or negative will result in gapless playback (suitable for some continuous media).

See also

crossfadeTime()

PySide2.QtMultimedia.QMediaGaplessPlaybackControl.setNextMedia(media)
Parameters:

mediaPySide2.QtMultimedia.QMediaContent

Sets the next media for smooth transition.

See also

nextMedia()