Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
None
-
5.11.1, 5.13.0
-
None
Description
OSX 10.13.5
Android 6
IOS 11
QT 5.11.1
I am loading a base64 encoded mp3 into a QBuffer. Then attempt to play it using a QMediaPlayer object. This sample code plays fine on Windows10 but does not output any song.
The code works if I replace the QBuffer by a QFile with the extension .mp3
It seems that playing a sound from a QBuffer is not implemented on OSX, Android and IOS. This breaks the expectation that a QT code should be running on any platform.
buffer.open(QIODevice::ReadWrite); buffer.write(QByteArray::fromBase64(QJsonDocument::fromJson(reply->readAll()) .object()["audioContent"].toString().toUtf8()));
buffer.seek(0);
player.setMedia(QMediaContent(),&buffer);
player.play();
Attachments
Issue Links
- is duplicated by
-
QTBUG-65063 QMediaPlayer don't play sound from QByteArray in macOS
-
- Closed
-
For Gerrit Dashboard: QTBUG-69101 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
290640,6 | Android: Introduce playing from the QIODevice | dev | qt/qtmultimedia | Status: NEW | +1 | 0 |