The response is regularly printed on the console or, say, written in a file, so I don't think there's much to do with that on the client side if it lacks data or misses some value.
Читать полностью…Isn't there a way to monitor scrollPosition
it seems like it doesn't trigger onScrollPositionChanged
or any kind of binding
i need a way to stream data while checking for new metadata that icycast provides within the stream contents
Читать полностью…I checked MSVC 2019 64-bit. I'm not sure but that seemed to install just QtCreator for that platform, and not the compiler. However, after installing Visual Studio, QtCreator was able to use its compiler without modifying the QtCreator installation.
Читать полностью…#include <QAudioDevice>
#include <QAudioOutput>
#include <QCoreApplication>
#include <QFile>
#include <QMediaDevices>
#include <QMediaMetaData>
#include <QMediaPlayer>
int main(int argc, char **argv)
{
QCoreApplication app(argc, argv);
QMediaPlayer *mediaPlayer = new QMediaPlayer;
QAudioOutput *audioOutput = new QAudioOutput(QMediaDevices::defaultAudioOutput());
mediaPlayer->setSource(
QUrl("https://scdn.nrjaudio.fm/adwz1/fr/30079/"
"mp3_128.mp3?origine=radiogarden&listening-from-radio-garden=1673884209"));
mediaPlayer->setAudioOutput(audioOutput);
mediaPlayer->play();
QObject::connect(mediaPlayer, &QMediaPlayer::metaDataChanged, &app,
[mediaPlayer]
{
qDebug() << mediaPlayer->metaData().stringValue(QMediaMetaData::Title);
});
return app.exec();
}
""
after some little time
Читать полностью…
Welcome to the group, @Mehrrrrrrad! :-)
Wanna share your story of how you started with Qt, QML or C++? Maybe some nice feature that made you stick with it.
Rules are set on the description of the group. :)
already tried, and the signal is called mediaStatusChanged, you have to check if the new status is LoadedMedia
Читать полностью…i already know how to get the metadata but i dont know how to stream data into qmediaplayer
Читать полностью…icycast/shoutcast gives metadata after every x bytes (to find x you must pass Icy-MetaData: 1
header with the network request and in the response read header Icy-MetaInt
)