Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [SOLVED] Phonon::VideoPlayer and Phonon::SeekSlider
QtWS25 Last Chance

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

Scheduled Pinned Locked Moved General and Desktop
2 Posts 1 Posters 937 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Raphyy
    wrote on last edited by
    #1

    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 !

    1 Reply Last reply
    0
    • R Offline
      R Offline
      Raphyy
      wrote on last edited by
      #2

      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());
      }@

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved