summaryrefslogtreecommitdiffstats
path: root/src/plugins/android/src/mediaplayer
diff options
context:
space:
mode:
authorVal Doroshchuk <valentyn.doroshchuk@qt.io>2019-03-07 12:53:45 +0100
committerVaL Doroshchuk <valentyn.doroshchuk@qt.io>2019-03-25 08:42:06 +0000
commit1057d6a89ab4c19825ab2d5d12aed31496b89423 (patch)
treebf45508e49297398d75eeb7966cf2a608c723e68 /src/plugins/android/src/mediaplayer
parent95b7fc4950c1f0d895896cf3086c69126d45e061 (diff)
Android: Introduce HTTP headers to MediaPlayer
Added using the headers from QNetworkRequest to be sent together with the request for the data in MediaPlayer::setDataSource. The MediaPlayer requires also a Context object, together with headers, to resolve the Uri. It will try to find a content provider. Since no content providers are implemented, this produces a warning: "MediaPlayer: Couldn't open file on client side; trying server side: java.io.FileNotFoundException: No content provider" Task-number: QTBUG-74073 Change-Id: I1566953b523e84400882ba9d3a968cec6b4a61cf Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Diffstat (limited to 'src/plugins/android/src/mediaplayer')
-rw-r--r--src/plugins/android/src/mediaplayer/qandroidmediaplayercontrol.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/android/src/mediaplayer/qandroidmediaplayercontrol.cpp b/src/plugins/android/src/mediaplayer/qandroidmediaplayercontrol.cpp
index 4bfcce5bc..13a8cdbbb 100644
--- a/src/plugins/android/src/mediaplayer/qandroidmediaplayercontrol.cpp
+++ b/src/plugins/android/src/mediaplayer/qandroidmediaplayercontrol.cpp
@@ -384,7 +384,7 @@ void QAndroidMediaPlayerControl::setMedia(const QMediaContent &mediaContent,
if ((mMediaPlayer->display() == 0) && mVideoOutput)
mMediaPlayer->setDisplay(mVideoOutput->surfaceTexture());
- mMediaPlayer->setDataSource(mediaContent.canonicalUrl().toString(QUrl::FullyEncoded));
+ mMediaPlayer->setDataSource(mediaContent.canonicalRequest());
mMediaPlayer->prepareAsync();
}