最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Cross-browser embed VLC plugin - Stack Overflow

programmeradmin0浏览0评论

I have embedded vlc plugin for Google Chrome this way:

<embed 
  type='application/x-vlc-plugin'
  pluginspage=''
  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>

But this approach doesn't work with Internet Explorer.

Are any universal methods available to embed this player in all browsers?

I have embedded vlc plugin for Google Chrome this way:

<embed 
  type='application/x-vlc-plugin'
  pluginspage='http://www.videolan'
  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>

But this approach doesn't work with Internet Explorer.

Are any universal methods available to embed this player in all browsers?

Share Improve this question edited Sep 2, 2012 at 4:48 mac 2,7345 gold badges33 silver badges44 bronze badges asked Aug 28, 2012 at 10:17 mmmaaakmmmaaak 8331 gold badge19 silver badges38 bronze badges 1
  • Both IE 8 and IE 9. Windows 7 – mmmaaak Commented Aug 28, 2012 at 10:46
Add a ment  | 

1 Answer 1

Reset to default 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/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.

发布评论

评论列表(0)

  1. 暂无评论