Page 1 of 1

Embed VLC in html

Posted: 13 Jun 2019 16:01
by devenchhillar
Hi ,

i have mpeg -2 version live recording files to play on website.

Using the https://wiki.videolan.org/Documentation:WebPlugin/ am trying to play the video.

But it doesn't play on any browser.


Code am writing
<embed type="application/x-vlc-plugin" pluginspage="http://www.videolan.org"
width="640"
height="480"
id="vlc" />


Js
<script type="text/javascript">
<!--

var id = vlc.playlist.add("Local file location", "Videoname", options);
vlc.playlist.playItem(id);
//-->
</script>


Its been 2 days am researching on it. Please help

Re: Embed VLC in html

Posted: 13 Aug 2019 23:03
by da2424
Hi,

all browsers have dropped the support for plugins, only Internet Explorer still supports it.
For Internet Explorer, the following code will work:

Code: Select all

<embed type="application/x-vlc-plugin" pluginspage="http://www.videolan.org" width="640" height="480" id="vlc" /> <script type="text/javascript"> <!-- function start(){ var id = vlc.playlist.add("Local file location"); vlc.playlist.playItem(id); } window.addEventListener("load", start, false); //--> </script>

Re: Embed VLC in html

Posted: 14 Aug 2019 10:50
by unidan
Hi,

You may want to wait for VLC.js, which is pending work currently.

Re: Embed VLC in html

Posted: 12 Apr 2020 22:46
by Jen
Any update on this VLC.js?
I see no mention of one that’s not abandoned on the wiki.