pyqt-music-player-widget
PyQt music player widget
Requirements
PyQt5 >= 5.8
Setup
python -m pip install pyqt-music-player-widget
Included Packages
This is using mutagen to get the full length of the media.
This only works for mp3 extension.
Method/Signal Overview
-
Methods -
play(),pause(),stop() -
Signals -
played(bool),positionUpdated(int),durationUpdated(int)
Example
from PyQt5.QtWidgets import QWidget, QVBoxLayout, QApplication, QFormLayout
from pyqt_find_path_widget import FindPathWidget # https://github.com/yjg30737/pyqt-find-path-widget.git
from pyqt_music_player_widget import MusicPlayerWidget
class MusicPlayerExample(QWidget):
def __init__(self):
super().__init__()
self.__initUi()
def __initUi(self):
self.__findPathWidget = FindPathWidget()
self.__findPathWidget.setExtOfFiles('Audio Files (*.mp3)')
self.__findPathWidget.added.connect(self.__added)
lay = QFormLayout()
lay.addRow('Audio File', self.__findPathWidget)
lay.setContentsMargins(0, 0, 0, 0)
pathFindWidget = QWidget()
pathFindWidget.setLayout(lay)
self.__musicPlayerWidget = MusicPlayerWidget()
lay = QVBoxLayout()
lay.addWidget(pathFindWidget)
lay.addWidget(self.__musicPlayerWidget)
self.setLayout(lay)
def __added(self, filename: str):
self.__musicPlayerWidget.setMedia(filename)
if __name__ == "__main__":
import sys
app = QApplication(sys.argv)
player = MusicPlayerExample()
player.show()
sys.exit(app.exec_())
Result
Metadata
Release files for pyqt-music-player-widget 0.0.31
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyqt-music-player-widget-0.0.31.tar.gz | 5.2 kB | Without provenance | Details for pyqt-music-player-widget-0.0.31.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyqt_music_player_widget-0.0.31-py3-none-any.whl | Python 3 | none | any | Details for pyqt_music_player_widget-0.0.31-py3-none-any.whl |
Total release size: 12.3 kB
Release files / pyqt-music-player-widget-0.0.31.tar.gz
| Download URL | pyqt-music-player-widget-0.0.31.tar.gz |
|---|---|
| Size | 5.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
26c2addafd55b59e908b06fe77ad12a6e00d02aab49804893815fe861a601630
|
|
BLAKE2b-256 checksum How to use checksums |
d2ac901c88798daf531a5e507190bf6c1fa38eddbceedce8a8d09e87a6d0ca10
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/0.0.0 CPython/3.7.6
|
Release files / pyqt_music_player_widget-0.0.31-py3-none-any.whl
| Download URL | pyqt_music_player_widget-0.0.31-py3-none-any.whl |
|---|---|
| Size | 7.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
023970e6a284719212d7c459be447f46d5a3409e783cdf117b3af83bb0d2778a
|
|
BLAKE2b-256 checksum How to use checksums |
1667e07854c876c3603a9a51998e0c0973325cf36cbd8541a382ab91197dfda5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/0.0.0 CPython/3.7.6
|
Security for pyqt-music-player-widget 0.0.31
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.