`
zhy589
  • 浏览: 39521 次
  • 性别: Icon_minigender_1
  • 来自: 上海
文章分类
社区版块
存档分类
最新评论

VLC Activex控件(VideoLAN.VLCPlugin.1 VideoLAN.VLCPlugin.2)的所有方法 属性及使用 在一个老外的网站上找到的

阅读更多
无意中在老外的网站上发现了关于VideoLAN.VLCPlugin.1和VideoLAN.VLCPlugin.2所有方法和属性~~公布出来~~以免大家浪费时间去寻找~~(注意你使用的VLC的版本)







If you open a link to a video file handled by the VLC plugin (To get the list of handled types, browse to about:plugins) or a page with an embedded video, the plugin should open and read the video.

Build HTML pages that use the plugin (version <= 0.8.5)
The following API description is only valid uptill version 0.8.5 of the mozilla plugin.

Additionally to viewing video on all pages, you can build custom pages that will use the advanced features of the plugin, using Javascript functions to control playback or extract information from the plugin.

The vlc plugin supports the following function calls:

•play() : Start playing media in the plugin.

•pause() : Pause playback.

•stop() : Stop media playback.

•fullscreen() : Switch the video to full screen.

•set_volume(vol) : Set the volume. vol has to be an int in the 0-200 range.

•get_volume() : Get the current volume setting.

•mute() : Toggle volume muting.

•set_int_variable(var_name, value) :

•set_bool_variable(var_name, value) :

•set_str_variable(var_name, value) :

•get_int_variable(var_name) :

•get_bool_variable(var_name) :

•get_str_variable(var_name) :

•clear_playlist() : Clear the playlist.

•add_item(mrl) : Append an item whose location is given by the Media Resource Locator to the playlist.

•next()

•previous()

•isplaying() : return true if the plugin is playing something.

•get_length() : Get the media's length in seconds.

•get_position() : Get the current position in the media in percent.

•get_time() : Get the current position in the media in seconds.

•seek(seconds,is_relative) : If is_relative is true, seek relatively to current time, else seek from beginning of the stream. Seek time is specified in seconds.

Here are a few examples of HTML pages that use the Mozilla plugin.

Example 1
In this example, the plugin will read an HTTP stream inside the web page. If the user goes fullscreen, he will have to press f to go back in normal view.

<html> <head><title>Demo of VLC mozilla plugin</title></head> <body> <h1>Demo of VLC mozilla plugin - Example 1</h1> <embed type="application/x-vlc-plugin" name="video1" autoplay="no" loop="yes" width="400" height="300" target="http://server.example.org/video1.vob" /> <br /> <a href="javascript:;" onclick='document.video1.play()'>Play video1</a> <a href="javascript:;" onclick='document.video1.pause()'>Pause video1</a> <a href="javascript:;" onclick='document.video1.stop()'>Stop video1</a> <a href="javascript:;" onclick='document.video1.fullscreen()'>Fullscreen</a> </body> </html>
Example 2
In this example, the plugin will read a multicast RTP/UDP stream in a dedicated video output window.

<html> <head><title>Demo of VLC mozilla plugin</title></head> <body> <h1>Demo of VLC mozilla plugin - Example 2</h1> <embed type="application/x-vlc-plugin" name="video2" autoplay="no" loop="no" hidden="yes" target="rtp://@239.255.12.42:5004" /> <br /> <a href="javascript:;" onclick='document.video2.play()'>Play video2</a> <a href="javascript:;" onclick='document.video2.stop()'>Stop video2</a> <a href="javascript:;" onclick='document.video2.fullscreen()'>Fullscreen</a> </body> </html>
Build HTML pages that use the plugin (version > 0.8.5.1)
Additionally to viewing video on all pages, you can build custom pages that will use the advanced features of the plugin, using Javascript functions to control playback or extract information from the plugin.

The vlc plugin exports serveral objects that can be accessed for setting and getting information. When used improperly the API's will throw an exception that includes a string that explains what happened. For example when asking for vlc.input.length when there is no playlist item playing.

The vlc plugin knows the following objects:

•audio : Access audio properties.

•input : Access input properties.

•playlist : Access playlist properties.

•video : Access video properties.

•log : Access log properties.

•messages : Access to log message properties.

•iterator : Access to log iterator properties.

The following JavaScript code shows howto get a reference to the vlc plugin. This reference can then be used to access the objects of the vlc plugin.

<html> <title>VLC Mozilla plugin test page</title> <body> <embed type="application/x-vlc-plugin" pluginspage="http://www.videolan.org" version="VideoLAN.VLCPlugin.2" width="640" height="480" id="vlc"> </embed> <script language="Javascript"> <!-- var vlc = document.getElementById("vlc"); vlc.audio.toggleMute(); !--> </script> </body> </html>
Root object
readonly properties

•VersionInfo : returns version information string

read/write properties

•none

methods

•vlc.versionInfo() : returns version information string

Audio object
readonly properties

•none

read/write properties

•vlc.audio.mute : boolean value to mute and ummute the audio

•vlc.audio.volume : a value between [0-200] which indicates a percentage of the volume.

•vlc.audio.track : a value between [0-65535] which indicates the audio track to play or that is playing. (supported in vlc version > 0.8.6)

•vlc.audio.channel : an integer between 1 and 5 that indicates which audio channel mode is used, values can be: "1=stereo", "2=reverse stereo", "3=left", "4=right", "5=dolby". Use vlc.audio.channel to check if setting of the new audio channel has succeeded. (supported in vlc version > 0.8.6)

Audio Channel: <SELECT readonly onChange='doAudioChannel(this.value)'> <OPTION value=1>Stereo</OPTION'> <OPTION value=2>Reverse stereo</OPTION'> <OPTION value=3>Left</OPTION'> <OPTION value=4>Right</OPTION'> <OPTION value=5>Dolby</OPTION'> </SELECT'> <SCRIPT language="javascript"'> <!-- function doAudioChannel(value) { var vlc = getVLC("vlc"); vlc.audio.channel = parseInt(value); alert(vlc.audio.channel); }; --'>
methods

•vlc.audio.toggleMute() : boolean toggle that mutes and unmutes the audio based upon the previous state

Input object
readonly properties

•vlc.input.length : length of the input file in number of milliseconds

•vlc.input.fps : frames per second returned as a float

•vlc.input.hasVout : a boolean that returns true when the video is being displayed, it returns false when video is not displayed

read/write properties

•vlc.input.position : normalized position in multimedia stream item given as a float value between [0.0 - 1.0]

•vlc.input.time : the absolute position in time given in milliseconds, this property can be used to seek through the stream

<!-- absolute seek in stream !--> vlc.input.time = <absolute seek> <!-- relative seek in stream !--> vlc.input.time = vlc.input.time + <relative seek>
•vlc.input.state : current state of the input chain given as enumeration (IDLE/CLOSE=0, OPENING=1, BUFFERING=2, PLAYING=3, PAUSED=4, STOPPING=5, ERROR=6)

•vlc.input.rate : input speed given as float (1.0 for normal speed, 0.5 for half speed, 2.0 for twice as fast, etc.)

methods

•none

Playlist object
readonly properties

•vlc.playlist.itemCount : number that returns the amount of items currently in the playlist

•vlc.playlist.isPlaying : a boolean that returns true if the current playlist item is playing and false when it is not playing

read/write properties

•none

methods

•vlc.playlist.add(mrl) : add a playlist item as MRL (Multimedia Resource Locator). The MRL must be given as a string.

•vlc.playlist.add(mrl,name,options) : add a playlist item as MRL (Multimedia Resource Locator), with metaname 'name' and options 'options'. All input values must be given as string.

•vlc.playlist.play() : start playing the current playlist item

•vlc.playlist.togglePause() : toggle the pause state for the current playlist item

•vlc.playlist.stop() : stop playing the current playlist item

•vlc.playlist.next() : iterate to the next playlist item

•vlc.playlist.prev() : iterate to the previous playlist item

•vlc.playlist.clear() : empty the current playlist, all items will be deleted from the playlist

•vlc.playlist.removeItem(number) : remove the given item number (which cannot be greater then vlc.playlist.itemCount)

Video object
readonly properties

•vlc.video.width : returns the horizontal size of the video

•vlc.video.height : returns the vertical size of the video

read/write properties

•vlc.video.fullscreen : when set to true the video will be displayed in fullscreen mode, when set to false the video will be shown inside the video output size. The property takes a boolean as input.

•vlc.video.aspectRatio : get and set the aspect ratio to use in the video screen. The property takes a string as input value. Valid values are: "1:1", "4:3", "16:9", "16:10", "221:100" and "5:4"

methods

•vlc.video.toggleFullscreen() : toggle the fullscreen mode based on the previous setting

Log object
readonly properties

•vlc.log.messages : returns a messages object

read/write properties

•vlc.log.verbosity : write number [-1,0,1,2,3] for changing the verbosity level of the log messages. The numbers have the following meaning: -1 disable, 0 info, 1 error, 2 warning, 3 debug.

methods

•none

Messages object
readonly properties

•messages.count : returns number of messages in the log

•messages.severity : number that indicates the severity of the log message (0 = info, 1 = error, 2 = warning, 3 = debug)

•message.name : name of VLC module that printed the log message (e.g: main, http, directx, etc...)

•message.type : type of VLC module that printed the log message (eg: input, access, vout, sout, etc...)

•message.message : the message text

read/write properties

•none

methods

•messages.clear() : clear the current log buffer. It should be called as frequently as possible to not overflow the plugins logging buffer. Call this method after the log messages of interest are read.

•messages.iterator() : returns a messages iterator object, which is used to iterate over the messages in the log. Don't clear the log buffer while holding an iterator object.

Iterator object
readonly properties

•iterator.hasNext : returns a boolean that indicates when true, that wheter vlc.log.messages.next() returns the next message.

read/write properties

•none

methods

•iterator.next() : returns the next message object it the log


分享到:
评论

相关推荐

    VLCPlugin:一个Cordova插件,仅在org.videolan.libvlc上使用VLC播放仅适用于android的视频

    VLCPlugin 一个Cordova插件,仅在org.videolan.libvlc版本1.0.6上使用VLC播放仅适用于android的视频cordova.plugins.VLCPlugin.play(url,result =&gt; {console.log(“ result:”,result);},error =&gt; console....

    调用VLC ActiveX控件

    VS2010调用VLC-0.9.9 ActiveX控件,对本地视频文件进行网络流输出。 执行时需要注册VLC ActiveX控件,VLC只有低于0.9.9版本的ActiveX支持视频流化输出。

    videolan.libvlc.windows.3.0.4

    LibVLC是VideoLAN项目的一部分,是一个开源且跨平台的多媒体框架,广泛应用于各种媒体播放器,如知名的VLC Media Player。这个版本(3.0.4)是专为Windows系统设计的,提供了对32位和64位架构的支持。 首先,让我们...

    使用非官方 Google 服务在 GUI 中的语音演示:GUI 使 Matlab 通过使用 VLC 作为 ActiveX 组件的非官方 Google 服务说话-matlab开发

    这是一个演示如何使用 ActiveX VideoLAN.VLCPlugin.2 结合非官方的谷歌文本到语音 (TTS) 引擎从文本生成语音。 您需要安装 VLC-Media-Player 并具有 Internet 连接才能调用 google 服务。 在此演示中有一个弹出窗口...

    VLC播放控件

    VLC播放控件是一种在网页中嵌入VLC媒体播放器的方法,允许用户通过JavaScript进行交互操作,以实现多媒体内容的播放、控制和管理。VLC播放器本身是一款开源、跨平台的多媒体播放器,其强大的解码能力使得它可以处理...

    基于VLC的ActiveX视频实时流播放控件

    "基于VLC的ActiveX视频实时流播放控件"就是这样一个解决方案,它允许开发者在网页中嵌入VLC的功能,实现实时rtsp流的播放。 ActiveX是一种由微软开发的技术,主要用于Internet Explorer浏览器,它允许开发者创建可...

    vlcj-1.2.2-sources.jar.gz_VLC jar Java_VideoLan_videolan.vlc jav

    Videolan vlc java bindings. Jou can use vlc player in your java projects.

    调用vlc+抓图.rar_labview调用vLc_vlc_vlc activex_抓图_抓网络图

    然后,可以在LabVIEW的虚拟仪器面板上添加一个ActiveX控件,通过编程设置其属性和方法,如播放、暂停、停止视频以及控制摄像头等。 在"调用vlc+抓图.vi"这个文件中,主要包含以下步骤: 1. **初始化VLC**:在...

    vlc的activeX控件

    网页实时视频播放器,支持rtsp,http,等多种流媒体协议,支持录像,截图,带有网页demo-Real-time Web video player, support rtsp, http, and other streaming media protocols to support video capture, with web demo

    Vlc.DotNet.rar

    Vlc.DotNet是一个开源项目,它是VideoLAN的VLC媒体播放器与.NET Framework的集成,允许开发者在他们的.NET应用程序中嵌入VLC播放器的功能。这个压缩包"Vlc.DotNet.rar"包含了使用WPF(Windows Presentation ...

    C#调用vlc播放器所用到的库(libvlc)

    4. **初始化VLC播放器**:在代码中,你需要创建一个`VlcControl`对象,它是Vlc.DotNet提供的一个窗体控件,可以直接在应用程序界面上显示视频。设置好路径到VLC的dll文件,这通常是在`VlcConnection`对象的构造函数...

    开源免费播放器 VLC Media Player(VideoLAN) 1.0.1源码

    流行的跨平台媒体播放器 VLC media player 已发布 1.0.0 正式版本。VLC 1.0.0 为用户带来了大量新功能,主要包括:Live 录制、即时暂停与 Frame-by-Frame 支持、新的 HD 解码器(AES3, Dolby Digital Plus, TrueHD, ...

    WPF基于Vlc.DotNet.Wpf封装的视频播放器

    在本文中,我们将深入探讨如何使用WPF(Windows Presentation Foundation)和Vlc.DotNet.Wpf库来封装一个自定义的视频播放器。WPF是.NET Framework中的一个UI框架,提供了丰富的图形渲染和用户交互能力。而Vlc....

    vlc-3.0.11-win64.exe

    VLC多媒体播放器(最初命名为VideoLAN客户端)是VideoLAN计划的多媒体播放器。它支持众多音频与视频解码器及文件格式,并支持DVD影音光盘,VCD影音光盘及各类流式协议。它也能作为unicast或 multicast的流式服务器在...

    android实现vlc播放本地视频

    在Android平台上,开发人员经常需要集成视频播放功能,而VLC(VideoLAN Client)是一个流行的开源多媒体播放器,它支持多种视频和音频格式以及流媒体协议。本教程将详细介绍如何在Android应用中实现使用VLC播放本地...

    android端使用VLC预览、播放视频

    在Android平台上,使用VLC(VideoLAN Client)预览和播放视频是一项常见的需求,尤其是在处理实时流媒体内容时。VLC是一款开源、免费且跨平台的多媒体播放器,支持多种视频格式和网络流协议,因此它非常适合在...

    Attachments from VLC scripting in LabVIEW..._流媒体_网络摄像头_rtsp_labv

    2. 导入ActiveX控件:在LabVIEW中,通过工具栏的“选择VI库资源对话框”导入VLC的ActiveX控件,将其添加到工具面板供后续使用。 3. 创建连接:使用LabVIEW的ActiveX函数建立与VLC的连接,并指定RTSP流的URL。URL通常...

    C#WinformVLC视频播放器

    2. 创建播放器对象:在代码中创建一个VLC播放器实例,这通常是通过`VlcControl`或`Vlc.DotNet`等封装库完成的。 3. 配置参数:设置VLC播放器的配置参数,如解码器、网络连接、播放控制等。 4. 加载媒体:指定要播放...

Global site tag (gtag.js) - Google Analytics