GunJack
GunJack

Reputation: 1978

Qt get file path of current playing media?

I need to store the full path of current playing audio in QMediaPlayer in a QString Variable. I need this to get metadata using taglib library which require file path of the media.

Upvotes: 1

Views: 1759

Answers (2)

JuanDeLosMuertos
JuanDeLosMuertos

Reputation: 4620

Take a look at the docs.

You can do it by calling

mediaplayer.currentMedia().canonicalUrl().toString()

Upvotes: 3

Related Questions