multimedia#

Package Contents#

MediaPlayer

Media player

MediaPlayerBase

Media player base class

MediaPlayBarButton

Media play bar button

SimpleMediaPlayBar

simple media play bar

StandardMediaPlayBar

Standard media play bar

VideoWidget

Video widget

class MediaPlayer(parent=None)#

Bases: PyQt5.QtMultimedia.QMediaPlayer

Media player

sourceChanged#
isPlaying()#
source() PyQt5.QtCore.QUrl#

Return the active media source being used

setSource(media: PyQt5.QtCore.QUrl)#

Sets the current source

class MediaPlayerBase(parent=None)#

Bases: PyQt5.QtCore.QObject

Media player base class

mediaStatusChanged#
playbackRateChanged#
positionChanged#
durationChanged#
sourceChanged#
volumeChanged#
mutedChanged#
abstract isPlaying()#

Whether the media is playing

abstract mediaStatus() PyQt5.QtMultimedia.QMediaPlayer.MediaStatus#

Return the status of the current media stream

abstract playbackState() PyQt5.QtMultimedia.QMediaPlayer.State#

Return the playback status of the current media stream

abstract duration()#

Returns the duration of the current media in ms

abstract position()#

Returns the current position inside the media being played back in ms

abstract volume()#

Return the volume of player

abstract source() PyQt5.QtCore.QUrl#

Return the active media source being used

abstract pause()#

Pause playing the current source

abstract play()#

Start or resume playing the current source

abstract stop()#

Stop playing, and reset the play position to the beginning

abstract playbackRate() float#

Return the playback rate of the current media

abstract setPosition(position: int)#

Sets the position of media in ms

abstract setSource(media: PyQt5.QtCore.QUrl)#

Sets the current source

abstract setPlaybackRate(rate: float)#

Sets the playback rate of player

abstract setVolume(volume: int)#

Sets the volume of player

abstract setMuted(isMuted: bool)#
abstract videoOutput() PyQt5.QtCore.QObject#

Return the video output to be used by the media player

abstract setVideoOutput(output: PyQt5.QtCore.QObject) None#

Sets the video output to be used by the media player

class MediaPlayBarButton(parent: PyQt5.QtWidgets.QWidget = None)#

Bases: qfluentwidgets.components.widgets.button.TransparentToolButton

Media play bar button

class SimpleMediaPlayBar(parent=None)#

Bases: MediaPlayBarBase

simple media play bar

addButton(button: MediaPlayBarButton)#

add button to the right side of play bar

class StandardMediaPlayBar(parent=None)#

Bases: MediaPlayBarBase

Standard media play bar

skipBack(ms: int)#

Back up for specified milliseconds

skipForward(ms: int)#

Fast forward specified milliseconds

class VideoWidget(parent=None)#

Bases: PyQt5.QtWidgets.QGraphicsView

Video widget

property player#
setVideo(url: PyQt5.QtCore.QUrl)#

set the video to play

hideEvent(e)#
wheelEvent(e)#
enterEvent(e)#
leaveEvent(e)#
play()#
pause()#
stop()#
togglePlayState()#

toggle play state

resizeEvent(e)#