简体   繁体   中英

QMediaPlayer - How to obtain metadata from online radio?

I'm using QMediaPlayer from Qt 5.1 to play online radio. Some radio stations have extra data like title of playing music. How to get this info from QMediaPlayer? I suppose that it is possible because Amarok player from KDE is using Qt and can show titles.

Regards

If you have access to media file's URL, then you can call

QMediaPlayer::metaData(QMediaMetaData::Title)

to get the title.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM