By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,989 Members | 2,392 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,989 IT Pros & Developers. It's quick & easy.

how do i detect the current position in vlc video-playback in vb.net?

P: 1
how do i detect the current position in vlc video-playback in vb.net?

Basically as the clip is playing, I want in a label for it to say "02:58/21:35" relating to the current clip being played.

So I'll need to somehow figure out how to detect current position and end position. Does anyone know how to do this?


Code so far:
Expand|Select|Wrap|Line Numbers
  1.  Public Class Form1
  2.         Dim Paused As Boolean = False
  3.         Dim Started As Boolean = False
  4.         Dim PlayedSecond As Boolean = True
  5.         Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
  6.             PlayedSecond = False
  7.             AxVLCPlugin21.playlist.items.clear()
  8.             AxVLCPlugin21.playlist.add("https://vula.uct.ac.za/access/content/group/fe879ca4-927a-4fca-9cc9-33b12c348b37/vids/Lessig-ItIsAboutTimeGettingOurValuesAroundCopyright522.flv")
  9.             AxVLCPlugin21.playlist.play()
  10.             Started = True
  11.         End Sub
  12.  
  13.         Sub playsecond()
  14.                 AxVLCPlugin21.playlist.items.clear()
  15.                 AxVLCPlugin21.playlist.add("http://lsta2011.wikispaces.com/file/view/Rogue%20Waves.mp4")
  16.                 AxVLCPlugin21.playlist.play()
  17.                 PlayedSecond = True
  18.                 Started = False
  19.         End Sub
  20.  
  21.         Private Sub AxVLCPlugin21_pause(sender As Object, e As EventArgs) Handles AxVLCPlugin21.pause
  22.                 Paused = True
  23.         End Sub
  24.  
  25.         Private Sub IsFinished_Tick(sender As Object, e As EventArgs) Handles IsFinished.Tick
  26.             If Not AxVLCPlugin21.playlist.isPlaying And Paused = False And Started = True And PlayedSecond = False Then
  27.                 playsecond()
  28.                 Started = True
  29.             End If
  30.         End Sub
  31.  
  32.         Private Sub AxVLCPlugin21_play(sender As Object, e As EventArgs) Handles AxVLCPlugin21.play
  33.             Paused = False
  34.         End Sub
  35.     End Class
Jan 27 '13 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.