VLC on vb.net HELP!!!

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
Student guest

VLC on vb.net HELP!!!

Postby Student guest » 05 Aug 2006 12:48

HI all
iam doing a school project and i need some help.

when i use the vlc activex control i used the following code

Private Sub btnPlay_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnplay.Click

AxVLCPlugin1.addTarget(url, Nothing, AXVLC.VLCPlaylistMode.VLCPlayListAppendAndGo, 0)
AxVLCPlugin1.play()

End Sub


ok this works fine, but this code only plays videos from website links and not from the local sourse like C: drive. I tried replaceing the url bit with "c:\video.mpg" BUT IT DOESNT WORK. Plx help. iam new at this so please excuse me if this question is very basic.

thanks in advance

Jack L
Blank Cone
Blank Cone
Posts: 15
Joined: 12 Jul 2006 16:00
Contact:

Postby Jack L » 07 Aug 2006 02:53

It works for me. I have 2 differences in my code:

For the 3rd parameter I use the constant 8. Forget what it translates to, but that works for me. You are using 12.

Using play and go you do not need to issue a play command after the addtarget

dead-man

Postby dead-man » 15 Aug 2006 23:57

using open file dialog box to select the files

dlgFile.ShowDialog() 'openfile dialog box
Dim fname As String
fname = dlgFile.FileName.ToString 'the selected file will be played
TextBox1.Text = fname 'shows the file name that is being played in atextbox
Dim MRLstring As String = Strings.Trim(fname) 'gets the filename from the variable:-fname
VLC.addTarget(MRLstring, Nothing, AXVLC.VLCPlaylistMode.VLCPlayListAppendAndGo, -666)

Jack L
Blank Cone
Blank Cone
Posts: 15
Joined: 12 Jul 2006 16:00
Contact:

Postby Jack L » 16 Aug 2006 02:50

using open file dialog box to select the files

dlgFile.ShowDialog() 'openfile dialog box
Dim fname As String
fname = dlgFile.FileName.ToString 'the selected file will be played
TextBox1.Text = fname 'shows the file name that is being played in atextbox
Dim MRLstring As String = Strings.Trim(fname) 'gets the filename from the variable:-fname
VLC.addTarget(MRLstring, Nothing, AXVLC.VLCPlaylistMode.VLCPlayListAppendAndGo, -666)
Why not try this

dlgFile.ShowDialog() 'openfile dialog box
Dim fname As String
fname = dlgFile.FileName.ToString 'the selected file will be played
TextBox1.Text = fname 'shows the file name that is being played in atextbox
Dim MRLstring As String = Strings.Trim(fname) 'gets the filename from the variable:-fname

msgbox (MRLstring)

VLC.addTarget(MRLstring, Nothing, AXVLC.VLCPlaylistMode.VLCPlayListAppendAndGo, 0)


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 42 guests