Page 1 of 1

How can I get the playing time from the VLC?

Posted: 18 Mar 2016 11:59
by DCuellar
I want to show in website the current time of the video (not the length) that's playing in my embed VLC Player.
Can I get this time?
For example, when I skip the video to the second 00:15, can I get the number 15 or something like that ?

Thank you so much :D ,
DCuellar.

Re: How can I get the playing time from the VLC?

Posted: 18 Mar 2016 12:53
by Etoh
Are the functions handle_MediaPlayerTimeChanged(time) or handle_MediaPlayerPositionChanged(val) relevant?

Re: How can I get the playing time from the VLC?

Posted: 18 Mar 2016 13:55
by da2424
Are the functions handle_MediaPlayerTimeChanged(time) or handle_MediaPlayerPositionChanged(val) relevant?
Yes. The event MediaPlayerTimeChanged is the relevant event for you. This event fires if the time changes. If you want to get the time not over events, you can call vlc.input.time.

Re: How can I get the playing time from the VLC?

Posted: 21 Mar 2016 10:19
by DCuellar
Yes. The event MediaPlayerTimeChanged is the relevant event for you. This event fires if the time changes. If you want to get the time not over events, you can call vlc.input.time.
Thank you so much! Now I'm using vlc.input.time and it works perfectly.