[Solved] Accessing "tags" from the "now" playing song in QMediaPlayer
I 'm trying to access tags of the current song playing to display in my custom Media Player App.
I'm using this in media player to connect to a method to update the info.
Now, my issue is: I'm getting the song info of the previous song!!
I tried in many ways but I dn't find any solution for this.
Can any one help me how to get the current song info.
EDIT: the details are from the previous song not from the next
Thanks in Advance,
I resolved this issue.
Rather than asking currentMediaChanged() signal metaDataChanged() is more significant & reliable. I did this as following:
@QObject::connect(this, SIGNAL(durationChanged(qint64)), this, SLOT(updateSongInfo()));
QObject::connect(this, SIGNAL(metaDataChanged()), this, SLOT(updateSongInfo()));@
I'm not sure why the currentMediaChanged() did not work!
I even tried to pause the updateSongInfo() function to wait for few seconds to check if the player is not yet ready with the info. It didnt work.