Cannot embed VLC within HTML page

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
dimitris74
New Cone
New Cone
Posts: 5
Joined: 23 Dec 2010 20:21

Cannot embed VLC within HTML page

Postby dimitris74 » 23 Dec 2010 21:27

Dear experts,

Iam a newbie in VLC.
I try to create an HTML page that will embed the VLC player and play TV channels within the browser.
I use Mozilla 3.5.3 and I have installed the VLC plugin 1.0.2.

I have followed the instructions mentioned at http://wiki.videolan.org/Documentation:WebPlugin

This is my HTML code (actually it is the outcome of a Java Server Faces page):

<html>
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=windows-1253"/>
<script type="text/javascript" language="javascript">

function playVlc(){

var vlc = document.getElementById("vlc");


if (vlc.video == null)
alert('No video object found');
else{
alert ('Video object found');
vlc.video.fullscreen = true;
vlc.playlist.play();
}


}
</script>
<title>ViewTv</title>

</head>
<body><form id="form1" name="form1" style="margin:0px" onkeypress="return _submitOnEnter(event,'form1');" method="POST" action="/Hera-GUI-context-root/faces/patient/ViewTv.jsp">

<embed type="application/x-vlc-plugin"
pluginspage="http://www.videolan.org"
version="VideoLAN.VLCPlugin.2" width="640" height="480"
id="vlc"></embed>
<input id="form1:commandButton1" name="form1:commandButton1" type="submit" value="commandButton1" onclick="return _chain('playVlc()','submitForm(\'form1\',1,{source:\'form1:commandButton1\'});return false;',this,event,true)">

<input type="hidden" name="oracle.adf.faces.FORM" value="form1"><span id="_form1_Postscript"><input type="hidden" name="oracle.adf.faces.STATE_TOKEN" value="-4x9qoa5mh"><script>function _form1Validator(){return true;}var form1_SF={};</script></span><script>_submitFormCheck();</script></form></body>

</html>

When the Javascript code is executed, the alert box that the vlc.video object is null is displayed. So I deduce that the browser cannot access the VLC plugin.
The same behaviour appears for the Firefox and Internet Explorer

Can anybody identify where the problem might be ?

VLC_help
Mega Cone Master
Mega Cone Master
Posts: 25661
Joined: 13 Sep 2006 14:16

Re: Cannot embed VLC within HTML page

Postby VLC_help » 24 Dec 2010 17:54

Does about:plugins display the VLC plugin?

dimitris74
New Cone
New Cone
Posts: 5
Joined: 23 Dec 2010 20:21

Re: Cannot embed VLC within HTML page

Postby dimitris74 » 25 Dec 2010 08:35

Yes it contains the plugin

hnxzh
New Cone
New Cone
Posts: 2
Joined: 10 Sep 2012 08:07

Re: Cannot embed VLC within HTML page

Postby hnxzh » 10 Sep 2012 08:40

I have the similar problem with you ?
How to resolve this question ? Can you tell me? thks

rgkluver
Blank Cone
Blank Cone
Posts: 13
Joined: 29 Jan 2013 13:08

Re: Cannot embed VLC within HTML page

Postby rgkluver » 30 Jan 2013 02:17

You will need alternate <object> code for IE. You also never add anything to the playlist from what I see. vlc.playlist.add(mrl,name,options) ??


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 7 guests