Seek to a position before playing

This forum is about all development around libVLC.
abdolahsa
New Cone
New Cone
Posts: 5
Joined: 25 Jun 2015 07:12

Seek to a position before playing

Postby abdolahsa » 27 Jun 2015 06:43

I want to seek to a position before playing a video :

Code: Select all

player= new VlcMediaPlayer(instance); player->setPosition(pos); player->setTime(time); player->play();
but it does not work and instead I used this code:

Code: Select all

player= new VlcMediaPlayer(instance); player->play(); player->setPosition(pos); player->setTime(time);
it now works but first plays the video (and shows some frames of the begining of the file) , is there any way to seek to a position before playing?

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Seek to a position before playing

Postby Jean-Baptiste Kempf » 09 Jul 2015 22:16

You can start as paused, IIRC, but maybe just for 3.0
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 23 guests