[SOLVED] Phonon::VideoPlayer and Phonon::SeekSlider



  • Hi,

    I've got a problem using Phonon Seekslider : it seems that my slider is not "linked" to the video player, so when I play the video the slider does not move.
    Here is the source code I have :

    @ void newForm::play()
    {
    QString strVideo = "C:\Users\Doe\Desktop\Aaaah.mp4";
    Phonon::MediaSource mdsrcVideo = strVideo;
    Phonon::MediaObject *mdobjVideo = new Phonon::MediaObject;
    mdobjVideo->setCurrentSource(mdsrcVideo);
    widget.slider->setMediaObject(mdobjVideo);
    widget.player->play(mdsrcVideo);
    }@

    Thanks your help !



  • I found the solution :

    @previewForm::previewForm()
    {
    mdobjVideo = new Phonon::MediaObject;
    mdobjVideo->setCurrentSource(QUrl("C:\Users\Doe\Desktop\Aaaah.mp4"));
    }@

    And :

    @void previewForm::play()
    {
    widget.phononSeekSlider->setMediaObject(widget.phononVideoPlayer->mediaObject());
    widget.phononVideoPlayer->play(mdobjVideo->currentSource());
    }@


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.