Fix WinRT Audio elements cannot play Qt resouce audio files
URL argument of Windows media API SetSourceFromByteStream can not be empty. Initial proper value for playing audio stream case. Task-number: QTBUG-42263 Change-Id: If0bb44b60d517228bfe8b6cb30afeeb4a8ac62d3 Reviewed-by: Andrew Knight <qt@panimo.net> Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
This commit is contained in:
@@ -752,7 +752,7 @@ void QWinRTMediaPlayerControl::setMedia(const QMediaContent &media, QIODevice *s
|
||||
}
|
||||
emit mediaChanged(media);
|
||||
|
||||
QString urlString;
|
||||
QString urlString = media.canonicalUrl().toString();
|
||||
if (!d->stream) {
|
||||
// If we can read the file via Qt, use the byte stream approach
|
||||
foreach (const QMediaResource &resource, media.resources()) {
|
||||
|
||||
Reference in New Issue
Block a user