Playing https source in QMediaPlayer on Windows
I am trying to use the QMediaPlayer to play an mp3 from a https source. Everything works fine on Linux and Mac, but on Windows it just doesn't work (while http works). The certificate is signed and I can access the https server via normal requests from a QNetworkAccessManager without problems. I traced the problem down to the SourceResolver in the wmf plugin. The call to
Invoke()returns OK (
0) with http files, but some error code (
-2147012721) with https. I have no idea how to go on from here. Does anybody has an idea how to debug from here on? Anybody with the same problem?
To use the HTTPS protocol, you need to install OpenSSL.
@JKSH Yes, that's what I did, and SSL access works fine in Qt via the NetworkAccessManager, if I just send GETs and POSTs. But not if I try to load a mp3 in the WMF plugin, for some reason...
OK, I found out why it doesn't work. My mp3 files are stored on a https server that requires login. On Linux and Mac URLs of the form
are supported. Those are the URLs that I use. On Windows, the wmf backend does not support those URLs, I would have to use an
That seems difficult to add from the application side, probably this should be a functionality of the QtMultimedia module...? I will try to find some workaround for now, I guess.
@pbouda, good find.
Would you be willing to submit a feature request to https://bugreports.qt.io/ ? Perhaps others need this feature like you.