Questions tagged [qmediacontent]

QMediaContent is a Qt class which provides access to the resources relating to a Qt Multimedia content.

4 questions
1
vote
2 answers

PyQt5 - Return currently playing media name from QMediaPlaylist currentMedia() function

I have this code in a function: self.playlist.currentMediaChanged.connect(lambda: self.songChanged()) and it calls this function: def songChanged(self): if self.playlist.mediaCount != 0: …
chaNcharge
  • 239
  • 1
  • 2
  • 12
0
votes
0 answers

Is it possible to make a video play instantly using QMediaPlayer?

I am using a QMediaPlayer to output a video that contains audio to a QVideoWidget. When I use a video without audio it plays instantly, but if the video has audio, it takes a few seconds to play after calling player.play(). Is there a way to make a…
Netanel
  • 103
  • 3
-1
votes
0 answers

Traceback Error: media = QMediaPlayer.Media(QMediaContent(video_url)) AttributeError: type object 'QMediaPlayer' has no attribute 'Media'

While creating a MediaPlayer file in PyQt6 using Qt6 designer. Facing the problem with QMediaConent file. QMediaContent module is not active so that it can be used and it's giving error. Traceback (most recent call last): File "filenam.py", line 32,…
Deepti
  • 1
  • 1
-1
votes
1 answer

I need to play not only mp3 links in QMediaPlayer

I have the code: def radio_create(self, url): name = QMediaPlayer(self) name.setMedia(QMediaContent(QtCore.QUrl(url)) return name But it plays only mp3 files. I need it to be able to play any kind of music or at least .aac. more details I'm making…
aart17
  • 1
  • 2