我试着用下面的代码在vlc activex中设置一个文本,但它不起作用,欢迎任何帮助。
<embed type="application/x-vlc-plugin"
pluginspage="http://www.videolan.org"
version="VideoLAN.VLCPlugin.2"
width="300px"
height="300px"
id="vlc"
windowless="true"
loop="yes"
autoplay="no"
text="loading..."
enablejavascript="true"
allowfullscreen="false"
target="rtp://@:port/">
</embed>
发布于 2015-03-13 13:34:19
根据Vlc Web插件来源here和here的说法,没有办法在Vlc ActiveX中绘制任何自定义文本。您仍然可以选择使用Marque object,但不确定它是否有效。
发布于 2015-03-20 20:32:19
使用WebChimera很容易做到这一点(它是基于libVLC.dll的,所以它可以播放任何支持VLC的视频/音频类型)。
正如你在评论中提到的,WebChimera没有"text“参数,这是因为WebChimera Player有一个jQuery like JS architecture。因此,要设置开始文本,您需要使用以下JS代码:
wjs("#player_wrapper").addPlayer({ id: "webchimera", theme: "sleek", autoplay: 1 });
wjs("#webchimera").addPlaylist([video-url]);
wjs("#webchimera").qmlLoaded(function() {
wjs("#webchimera").setOpeningText("hello world");
});其中video-url是您的视频的url。View the Example Online
文档链接:
.setOpeningText() Wiki Page
WebChimera Player JS API
https://stackoverflow.com/questions/29016994
复制相似问题