Can QMediaPlayer play a media through ftp ?
I am trying to play a media
QString strFileName = "ftp://wpglinux:email@example.com:" +QString().setNum(9954)+ //D:/VideosSongs/ims.mov";
can i play?
i think so ... QNetworkAccesManager has basic FTP support.
But beside that, why don't you just try it?? You already posted the code to use?!
@QUrl::fromLocalFile(strFileName)@ is wrong. Use @QUrl(strFileName)@ or @QUrl::fromUserInput(strfFileName)@
i am using
QString strFileName = "ftp://wpglinux:firstname.lastname@example.org:" +QString().setNum(9954)+ "//D:/VideosSongs/ims.mov";
qDebug()<<"Path : "<< strFileName;
Unsupported url scheme!
then it seems it is not supported (yet) ;)
BTW ...Is there any way ?
I haven tried it so far but this may be possible:
use QnetworkAccessManager to download file form your url using it's get() method
the returned QNetworkReply (subclass of QIODevice) can be set to QMediaPlayer::setMedia(QMediaContent(), reply);
Note that streaming is only supported on windows and unix so far - with the "shipped multimedia backends":http://qt-project.org/wiki/Qt_Multimedia_Backends.
Edit: just found "this post":http://qt-project.org/forums/viewthread/34146, which doesn't look promising. But still you can try, maybe it was already fixed in the meantime.
You may also pass QMediaPlayer::StreamPlayback in the flags of QMediaPlayer's constructor