How can I get the playing time from the VLC?

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
DCuellar
New Cone
New Cone
Posts: 3
Joined: 18 Mar 2016 11:44

How can I get the playing time from the VLC?

Postby DCuellar » 18 Mar 2016 11:59

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.

Etoh
Blank Cone
Blank Cone
Posts: 60
Joined: 12 Jan 2013 16:33

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

Postby Etoh » 18 Mar 2016 12:53

Are the functions handle_MediaPlayerTimeChanged(time) or handle_MediaPlayerPositionChanged(val) relevant?

da2424
Cone that earned his stripes
Cone that earned his stripes
Posts: 310
Joined: 16 Apr 2013 16:57

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

Postby da2424 » 18 Mar 2016 13:55

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.

DCuellar
New Cone
New Cone
Posts: 3
Joined: 18 Mar 2016 11:44

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

Postby DCuellar » 21 Mar 2016 10:19

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.


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 9 guests