View Single Post
marxian's Avatar
Posts: 2,448 | Thanked: 9,523 times | Joined on Aug 2010 @ Wigan, UK
#360
Originally Posted by MohammadAG View Post
Nah, I noticed that.

Have a look at http://mediadownloader.cz.cc/
It can play videos in Phonon well, and I passed the URL to QMediaPlayer manually and it worked, no cookies or forbidden stuff.

The source code did get me lost though, too many functions are tied to other classes
Fixed. Open source FTW!

All that is needed is a small amendment to the URL in the parseVideoPage() method:

Code:
QByteArray url = keyAndValue.first().replace("%2C", ",");
That's it.

I would have expected the percent encoded characters to have been replaced anyway, as I use QByteArray::fromPercentEncoding().

Since I will now be implementing the QML video player, I have a question: How am I to enable the exporting of the plugin path for end users? I have found that

Code:
viewer.engine()->addPluginPath(QString("/opt/qtm12/plugins"));
doesn't seem to work, so I am doing it from the command line:

Code:
export QT_PLUGIN_PATH=/opt/qtm12/plugins
__________________
'Men of high position are allowed, by a special act of grace, to accomodate their reasoning to the answer they need. Logic is only required in those of lesser rank.' - J K Galbraith

My website

GitHub

Last edited by marxian; 2011-05-26 at 02:14.
 

The Following 6 Users Say Thank You to marxian For This Useful Post: