Playing https source in QMediaPlayer on Windows
-
Hi,
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 tom_sourceResolver->EndCreateObjectFromURL()
inresourceresolver.cpp
->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? -
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
https://user:password@domain.com/file.mp3
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
IMFNetCredentialManager
:https://msdn.microsoft.com/en-us/library/windows/desktop/aa473824(v=vs.85).aspx
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.