multimedia ========== .. py:module:: qfluentwidgets.multimedia .. toctree:: :titlesonly: :maxdepth: 1 media_play_bar/index.rst media_player/index.rst video_widget/index.rst Package Contents ---------------- .. autoapisummary:: qfluentwidgets.multimedia.MediaPlayer qfluentwidgets.multimedia.MediaPlayerBase qfluentwidgets.multimedia.MediaPlayBarButton qfluentwidgets.multimedia.SimpleMediaPlayBar qfluentwidgets.multimedia.StandardMediaPlayBar qfluentwidgets.multimedia.VideoWidget .. py:class:: MediaPlayer(parent=None) Bases: :py:obj:`PyQt5.QtMultimedia.QMediaPlayer` Media player .. py:attribute:: sourceChanged .. py:method:: isPlaying() .. py:method:: source() -> PyQt5.QtCore.QUrl Return the active media source being used .. py:method:: setSource(media: PyQt5.QtCore.QUrl) Sets the current source .. py:class:: MediaPlayerBase(parent=None) Bases: :py:obj:`PyQt5.QtCore.QObject` Media player base class .. py:attribute:: mediaStatusChanged .. py:attribute:: playbackRateChanged .. py:attribute:: positionChanged .. py:attribute:: durationChanged .. py:attribute:: sourceChanged .. py:attribute:: volumeChanged .. py:attribute:: mutedChanged .. py:method:: isPlaying() :abstractmethod: Whether the media is playing .. py:method:: mediaStatus() -> PyQt5.QtMultimedia.QMediaPlayer.MediaStatus :abstractmethod: Return the status of the current media stream .. py:method:: playbackState() -> PyQt5.QtMultimedia.QMediaPlayer.State :abstractmethod: Return the playback status of the current media stream .. py:method:: duration() :abstractmethod: Returns the duration of the current media in ms .. py:method:: position() :abstractmethod: Returns the current position inside the media being played back in ms .. py:method:: volume() :abstractmethod: Return the volume of player .. py:method:: source() -> PyQt5.QtCore.QUrl :abstractmethod: Return the active media source being used .. py:method:: pause() :abstractmethod: Pause playing the current source .. py:method:: play() :abstractmethod: Start or resume playing the current source .. py:method:: stop() :abstractmethod: Stop playing, and reset the play position to the beginning .. py:method:: playbackRate() -> float :abstractmethod: Return the playback rate of the current media .. py:method:: setPosition(position: int) :abstractmethod: Sets the position of media in ms .. py:method:: setSource(media: PyQt5.QtCore.QUrl) :abstractmethod: Sets the current source .. py:method:: setPlaybackRate(rate: float) :abstractmethod: Sets the playback rate of player .. py:method:: setVolume(volume: int) :abstractmethod: Sets the volume of player .. py:method:: setMuted(isMuted: bool) :abstractmethod: .. py:method:: videoOutput() -> PyQt5.QtCore.QObject :abstractmethod: Return the video output to be used by the media player .. py:method:: setVideoOutput(output: PyQt5.QtCore.QObject) -> None :abstractmethod: Sets the video output to be used by the media player .. py:class:: MediaPlayBarButton(parent: PyQt5.QtWidgets.QWidget = None) Bases: :py:obj:`qfluentwidgets.components.widgets.button.TransparentToolButton` Media play bar button .. py:class:: SimpleMediaPlayBar(parent=None) Bases: :py:obj:`MediaPlayBarBase` simple media play bar .. py:attribute:: hBoxLayout .. py:method:: addButton(button: MediaPlayBarButton) add button to the right side of play bar .. py:class:: StandardMediaPlayBar(parent=None) Bases: :py:obj:`MediaPlayBarBase` Standard media play bar .. py:attribute:: vBoxLayout .. py:attribute:: timeLayout .. py:attribute:: buttonLayout .. py:attribute:: leftButtonContainer .. py:attribute:: centerButtonContainer .. py:attribute:: rightButtonContainer .. py:attribute:: leftButtonLayout .. py:attribute:: centerButtonLayout .. py:attribute:: rightButtonLayout .. py:attribute:: skipBackButton .. py:attribute:: skipForwardButton .. py:attribute:: currentTimeLabel .. py:attribute:: remainTimeLabel .. py:method:: skipBack(ms: int) Back up for specified milliseconds .. py:method:: skipForward(ms: int) Fast forward specified milliseconds .. py:class:: VideoWidget(parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QGraphicsView` Video widget .. py:attribute:: isHover :value: False .. py:attribute:: timer .. py:attribute:: vBoxLayout .. py:attribute:: videoItem .. py:attribute:: graphicsScene .. py:attribute:: playBar .. py:method:: setVideo(url: PyQt5.QtCore.QUrl) set the video to play .. py:method:: hideEvent(e) .. py:method:: wheelEvent(e) .. py:method:: enterEvent(e) .. py:method:: leaveEvent(e) .. py:method:: play() .. py:method:: pause() .. py:method:: stop() .. py:method:: togglePlayState() toggle play state .. py:method:: resizeEvent(e) .. py:property:: player