Faceți căutări pe acest blog

marți, 18 august 2015

Using Videolan (VLC) ActiveX to play stream media

It's enough to use two methods :
- addTarget
- play

addTarget has 4 parameters.
- uri as String
- options as String
- mode as VLCPlayListMod
- Position as Long

First parameters contains the URL, second can be Null (see the third link below for more details), third can be 8 (see the second link below for more details), and fourth can be 0
See the first link below for more details.

Here is the code
*************
* Begin code
*************
PUBLIC oform
oform=CREATEOBJECT("myform")
oform.Show

DEFINE CLASS myform AS form
    Height = 600
    Width = 850
    ADD OBJECT cmd as commandbutton WITH autosize = .T., caption = 'Click and Play'
    ADD OBJECT vlc AS olecontrol WITH top = 50, Height = 600, Width = 800, OleClass = "VideoLAN.VLCPlugin.1"
    PROCEDURE cmd.Click
        ThisForm.vlc.OBJECT.addTarget("https://www.youtube.com/watch?v=-1lj0mZDrIw",,8,0)
        ThisForm.vlc.oBJECT.play()
    ENDPROC
ENDDEFINE

*************
* End code
*************

https://wiki.videolan.org/ActiveX/
https://wiki.videolan.org/VLCPlaylistMode/
https://wiki.videolan.org/VLC_command-line_help

VLC media player is a free and open source utility. Reliable and has no need for decoders.
http://www.videolan.org/ 

Related posts
http://praisachion.blogspot.com/2015/08/using-videolan-vlc-activex-to-play_18.html
http://praisachion.blogspot.com/2015/08/using-videolan-vlc-activex-to-play.html

Niciun comentariu:

Trimiteți un comentariu