properties and methods of VLC ActiveX v2

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
tourgui
New Cone
New Cone
Posts: 3
Joined: 31 Aug 2010 07:18

properties and methods of VLC ActiveX v2

Postby tourgui » 02 Sep 2010 08:31

how can i use properties and methods of VLC ActiveX v2 in a windows form , I read about VLC ActiveX v2 (http://wiki.videolan.org/ActiveX) but could not generate anything usefull from that , a sample code using VLC ActiveX v2 could be ideal
Thank you.

cctvcam
Blank Cone
Blank Cone
Posts: 29
Joined: 20 Jul 2010 15:29

Re: properties and methods of VLC ActiveX v2

Postby cctvcam » 02 Sep 2010 11:49

I have tried the activex in VS2005 from C# in a forms app.

after adding a reference to the activeX under the COM tab and adding the control to the form from the toolbox, I used the following code to test the video and the logo methods.

Code: Select all

int id = axVLCPlugin21.playlist.add("rtsp://172.16.100.181:554/mpeg4/media.amp", "camera", null); axVLCPlugin21.playlist.play(); Thread.Sleep(500); axVLCPlugin21.video.logo.file("http://localhost/logo.png"); axVLCPlugin21.video.logo.opacity = 150; axVLCPlugin21.video.logo.enable();
hope this helps you out.

p.s. the sleep was needed for the logo to work.

tourgui
New Cone
New Cone
Posts: 3
Joined: 31 Aug 2010 07:18

Re: properties and methods of VLC ActiveX v2

Postby tourgui » 02 Sep 2010 15:43

thanks for the reply.
can i give a http link instead of a rtsp ? , if im giving a http link what should i give as the second argument of the add()
thank you

cctvcam
Blank Cone
Blank Cone
Posts: 29
Joined: 20 Jul 2010 15:29

Re: properties and methods of VLC ActiveX v2

Postby cctvcam » 03 Sep 2010 16:34

yes you can give an http link. the second param is just a name, can be whatever you like.

If you are unsure if the http link works in vlc. use the main vlc player application and select file open network stream and enter the http link here.

Patricknet
New Cone
New Cone
Posts: 2
Joined: 13 May 2014 14:04

Re: properties and methods of VLC ActiveX v2

Postby Patricknet » 13 May 2014 14:09

das ist auch kein Problem ihr müsst euch ein Logo machen und das vor den Player mit eine Picturebox einbinden und in den Timer


diese Funktion rein setzen

wenn ihr diese Funktion nicht habt, dann gebe ich euch die

Code: Select all

Function formatTime(ByVal timeVal As Integer) Dim timeHour As Integer Dim timeSec As Integer Dim timeMin As Integer timeHour = Math.Round(timeVal \ 1000) timeSec = timeHour Mod 60 If timeSec < 10 Then timeSec = "00" & timeSec timeHour = (timeHour - timeSec) \ 60 timeMin = timeHour Mod 60 End If If timeMin < 10 Then timeMin = "00" & timeMin timeHour = (timeHour - timeMin) \ 60 End If If timeHour < 0 Then Return timeHour & ":" & timeMin & ":" & timeSec Else Return timeHour & ":" & timeSec End If End Function

Code: Select all

Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick With TrackBar1 .Value = AxVLCPlugin21.input.Time .Maximum = AxVLCPlugin21.input.Length End With Label7.Text = formatTime(AxVLCPlugin21.input.Time.ToString) Label9.Text = formatTime(AxVLCPlugin21.input.Length.ToString) If Label7.Text = "0:1" Then PictureBox9.Hide() End If If Timer1.Enabled = False Then PictureBox9.Show() End If End Sub
damit klappt es auf jeden Fall, denn so Funkt es bei mir auch 8)

Patricknet
New Cone
New Cone
Posts: 2
Joined: 13 May 2014 14:04

Re: properties and methods of VLC ActiveX v2

Postby Patricknet » 15 May 2014 16:32

Hier habe ich noch einen zweiten beispiel, ich habe einen Filter eingesetzt, was mir ermöglicht, die Filter in eine If Schleife zu setzen, wenn z.b mp3 oder wav ab Spielt, dann wird das Logo bestehen bleiben, wenn ein Video gespielt wird geht dieses Logo verschwinden...

Code: Select all

If op.FilterIndex = 2 = True Then If Label7.Text = "0:1" = True Then PictureBox9.Hide() AxVLCPlugin21.FullscreenEnabled = True AxVLCPlugin21.Toolbar = True End If End If If op.FilterIndex = 1 Then PictureBox9.Show() AxVLCPlugin21.FullscreenEnabled = False AxVLCPlugin21.Toolbar = False End If


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 17 guests