3

我以这种方式为 Google Chrome 嵌入了 vlc 插件:

<embed 
  type='application/x-vlc-plugin'
  pluginspage='http://www.videolan.org'
  version='VideoLAN.VLCPlugin.2'
  width='800'
  height='600'
  id='vlc'
  loop='yes'
  autoplay='yes'
  target='rtsp://127.0.0.1:8554/realtime_1db07ff1-c5f9-4597-abf6-0d442454d06c'>
</embed>

但这种方法不适用于 Internet Explorer。

是否有任何通用方法可以将此播放器嵌入所有浏览器?

4

1 回答 1

4

I posted examples for both IE and Mozilla on the VideoLan forum a while ago here.

I wrote myself a switch that distinguishes between IE and "the rest" and embeds either one control for IE, or another one for Mozilla and Chrome.

In your particular case, the code for IE should work like this:

<object
  classid="clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921" 
  codebase="http://download.videolan.org/pub/videolan/vlc/last/win32/axvlc.cab"
  id="vlc"
  name="vlc"
  class="vlcPlayer"
  events="True">
    <param name="Src" value="rtsp://127.0.0.1:8554/realtime_1db07ff1-c5f9-4597-abf6-0d442454d06c" />
    <param name="ShowDisplay" value="True" />
    <param name="AutoLoop" value="True" />
    <param name="AutoPlay" value="True" />
 </object>

You can find further information in the VideoLan Wiki here.

The VLC cab file unfortunately isn't available in this location anymore btw. The post I referenced above is part of a whole thread in the VLC forum about why it's not being provided anymore.

于 2012-09-02T04:33:31.577 回答