Video Play
-
Videos doesnt work on simulator, to test videos use a mobile to deploy and test :)
-
thanks for reply
now i have try following code
@
/********************************************/
playlist = new QMediaPlaylist;
QString filepath;
filepath.clear();
filepath.append("E:\data/abc.3gp");
QMediaResource resource(QUrl::fromLocalFile(filepath));
QMediaContent content(resource);
playlist->addMedia(content);
playlist->setCurrentIndex(1);player = new QMediaPlayer;
connect(player, SIGNAL(positionChanged(qint64)), this, SLOT(positionChanged(qint64)));
connect(player, SIGNAL(mediaStatusChanged(QMediaPlayer::MediaStatus)), this, SLOT(mediaStatusChanged(QMediaPlayer::MediaStatus)));
connect(player, SIGNAL(error(QMediaPlayer::Error)), this, SLOT(error(QMediaPlayer::Error)));
connect(player, SIGNAL(stateChanged(QMediaPlayer::State)), this, SLOT(stateChanged(QMediaPlayer::State)));
player->setPlaylist(playlist);
Qm_pQVideoWidget = new QVideoWidget(this);
player->setVideoOutput(Qm_pQVideoWidget);
Qm_pQVideoWidget->show();
Qm_pQVideoWidget->activateWindow();
Qm_pQVideoWidget->showFullScreen();
/********************************************/
@
when i run this code on simulator only i can listen video,i can't see videoand when i run on device it crash.....
[Edit: Please wrap code in @ tags; mlong]
-
Sorry i only worked with video using the QML Video Element