media_player ============ .. py:module:: qfluentwidgets.multimedia.media_player Module Contents --------------- .. autoapisummary:: qfluentwidgets.multimedia.media_player.MediaPlayerBase qfluentwidgets.multimedia.media_player.MediaPlayer .. 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:: 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