View Single Post
MohammadAG's Avatar
Posts: 2,473 | Thanked: 12,265 times | Joined on Oct 2009 @ Jerusalem, PS/IL
#311
Originally Posted by marxian View Post
Ditto. You can always use Phonon, which I found to work OK. I have found that QMediaPlayer (via the QML video component) works on Symbian, but not with Maemo. I think the solution may be to set a cookie jar for the QNetworkAccessManager, but I haven't got round to trying it yet. I'm not sure how you would get the QMediaPlayer instance to use the cookie jar when making the HTTP request. I think it will be possible using QDeclarativeNetworkAccessManagerFactory, but that doesn't apply in your case.

BTW, if you are using the code I posted to get the YouTube url, you might want to take a look at the updated code, as I have since updated it to enable playback of videos that normally require age verification.
I'm trying to stay far from Phonon, not sure why though

I did some digging around:
QMediaPlayer::setMedia( const QMediaContent & media, QIODevice * stream = 0 )

One of QMediaContent's constructors is:
QMediaContent ( const QNetworkRequest & request )

http://doc.qt.nokia.com/latest/qnetw...html#setHeader

QNetworkRequest::CookieHeader 4 corresponds to the HTTP Cookie header and contains a QList<QNetworkCookie> representing the cookies to be sent back to the server

So I guess it can be done, now to see how I could get that cookie...
 

The Following 4 Users Say Thank You to MohammadAG For This Useful Post: