VLC Player in VB.NET won't seem to detect end of playback, a

Microsoft Windows specific usage questions
Forum rules
Please post only Windows specific questions in this forum category. If you don't know where to post, please read the different forums' rules. Thanks.
NotVLCWorking
Blank Cone
Blank Cone
Posts: 14
Joined: 21 Jan 2013 18:54

VLC Player in VB.NET won't seem to detect end of playback, a

Postby NotVLCWorking » 25 Jan 2013 13:32

VLC Player in VB.NET won't seem to detect end of playback, am I doing something wrong?

My intention was to use "_MediaPlayerEndReached" to make the player move onto the next video but instead once playback of a video completes nothing happens, it just stops (as in image below).


Rather than moving onto next video it just stays like this:

FYI: Clips used for testing are free trailers.

Image

Code:

Code: Select all

Public Class Form1 Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click AxVLCPlugin21.playlist.items.clear() AxVLCPlugin21.playlist.add("file:///C:/Users/Adminx/Downloads/The_Hobbit_Full_Length_Trailer_2_HD.mp4") AxVLCPlugin21.playlist.play() End Sub Private Sub AxVLCPlugin21_MediaPlayerEndReached(sender As Object, e As EventArgs) Handles AxVLCPlugin21.MediaPlayerEndReached AxVLCPlugin21.playlist.items.clear() AxVLCPlugin21.playlist.add("file:///C:/Users/Adminx/Downloads/ShortestVid.avi") AxVLCPlugin21.playlist.play() End Sub End Class

NotVLCWorking
Blank Cone
Blank Cone
Posts: 14
Joined: 21 Jan 2013 18:54

Re: VLC Player in VB.NET won't seem to detect end of playbac

Postby NotVLCWorking » 25 Jan 2013 15:16

I've figured out how to do it

Code:

Public Class Form1
Dim Paused As Boolean = False
Dim Started As Boolean = False
Dim PlayedSecond As Boolean = True
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
PlayedSecond = False
AxVLCPlugin21.playlist.items.clear()
AxVLCPlugin21.playlist.add("file:///C:/Users/Adminx/Downloads/The_Hobbit_Full_Length_Trailer_2_HD.mp4")
AxVLCPlugin21.playlist.play()
Started = True
End Sub

Sub playsecond()
AxVLCPlugin21.playlist.items.clear()
AxVLCPlugin21.playlist.add("file:///C:/Users/Adminx/Downloads/ShortestVid.avi")
AxVLCPlugin21.playlist.play()
PlayedSecond = True
Started = False
End Sub

Private Sub AxVLCPlugin21_pause(sender As Object, e As EventArgs) Handles AxVLCPlugin21.pause
Paused = True
End Sub

Private Sub IsFinished_Tick(sender As Object, e As EventArgs) Handles IsFinished.Tick
If Not AxVLCPlugin21.playlist.isPlaying And Paused = False And Started = True And PlayedSecond = False Then
playsecond()
Started = True
End If
End Sub

Private Sub AxVLCPlugin21_play(sender As Object, e As EventArgs) Handles AxVLCPlugin21.play
Paused = False
End Sub
End Class

PirSoft
New Cone
New Cone
Posts: 4
Joined: 25 Jan 2013 14:08

Re: VLC Player in VB.NET won't seem to detect end of playbac

Postby PirSoft » 25 Jan 2013 15:22

i can't using "AxVLCPlugin" control with Vb.net (2010)

Vb.net error message:
"An error occurred creating the form. See Exception.InnerException for details. The error is: Unable to get the window handle for the 'AxVLCPlugin2' control. Windowless ActiveX controls are not supported."

what is this problem?

NotVLCWorking
Blank Cone
Blank Cone
Posts: 14
Joined: 21 Jan 2013 18:54

Re: VLC Player in VB.NET won't seem to detect end of playbac

Postby NotVLCWorking » 25 Jan 2013 15:28

Steps:

1. Create a new vb program
2. Goto Toolbox
3. Right Click
4. Click Choose Items
5. Click Com Components
6. Select AXVLC.dll (v2)
7. Then click okay.
8. Then you should be able to see it, in the toolbox

If you have another issue I'll need to see your code

PirSoft
New Cone
New Cone
Posts: 4
Joined: 25 Jan 2013 14:08

Re: VLC Player in VB.NET won't seem to detect end of playbac

Postby PirSoft » 25 Jan 2013 15:40

1. Create a new vb program
2. Goto Toolbox
3. Right Click
4. Click Choose Items
5. Click Com Components
6. Select AXVLC.dll (v2)
7. Then click okay.
8. Then you should be able to see it, in the toolbox
9. added to form v2.
10. started debuging (F5)
11. bellow error occured

Vb.net error message:
"An error occurred creating the form. See Exception.InnerException for details. The error is: Unable to get the window handle for the 'AxVLCPlugin2' control. Windowless ActiveX controls are not supported."

NotVLCWorking
Blank Cone
Blank Cone
Posts: 14
Joined: 21 Jan 2013 18:54

Re: VLC Player in VB.NET won't seem to detect end of playbac

Postby NotVLCWorking » 25 Jan 2013 15:47

All I can suggest is, upload your project files. Also make sure you're using the 32 version of vlc


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: Google [Bot] and 24 guests