<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#000000">
<font size="-1">Hi,<br>
After some effort I was able to compile the mozilla vlc plugin under
Linux.<br>
The purpose for me was to build a simple multi-playlist under Firefox
in order to watch the "Multiposte" channels available through the
Freebox in France.<br>
This was done about 2 months ago. For this time I have been able to
listen and watch radio and TV under firefox while doing other things
with the latter.<br>
<br>
In order to compile againt the mozilla source you'll have to retreive
the source of mozilla (or firefox) and to compile it not entirely but
enough to have the directory </font><font size="-1"><tt>mozilla/dist/sdk</tt></font><font
size="-1"> compiled.<br>
<br>
It works well ... when firefox doesn't crash (that the case half time)
: I built a serie of drop down menus to select TV or Radio channels
coming from the Freebox of from elsewhere (Radio Italia for example).<br>
The OSD works and full screen is supported.<br>
<br>
Here is the modified vlcplugin.cpp that contains the necessary options
to the VLC command line. It's a diff against the 0.86b version of VLC.<br>
<br>
</font><font size="-1"><tt>------------------------------------------------------------------------<br>
<br>
50a51<br>
> p_scriptObject(NULL),<br>
74a76<br>
> char parg[30];<br>
176a179,198<br>
> else if( !strcmp( argn[i], "video"))<br>
> {<br>
> if( !boolValue(argv[i]) )<br>
> {<br>
> ppsz_argv[ppsz_argc++] = "--no-video";<br>
> }<br>
> }<br>
> else if( !strcmp( argn[i], "ts-es-id-pid" ) )<br>
> {<br>
> if( boolValue(argv[i]) )<br>
> {<br>
> ppsz_argv[ppsz_argc++] = "--ts-es-id-pid";<br>
> }<br>
> }<br>
> else if( !strcmp( argn[i], "audio-track-id" ) )<br>
> {<br>
> strcpy(parg, "--audio-track-id=") ;<br>
> strcat ( parg, argv[i] ) ;<br>
> ppsz_argv[ppsz_argc++] = parg;<br>
> }<br>
183a206,207<br>
> for( int i = 0; i < ppsz_argc ; i++ )<br>
> fprintf(stderr, "%s ", ppsz_argv[i]);<br>
285a310,311<br>
> if( p_scriptObject )<br>
> NPN_ReleaseObject(p_scriptObject);<br>
439a466,474<br>
> NPObject* VlcPlugin::getScriptObject()<br>
> {<br>
> if( NULL == p_scriptObject )<br>
> {<br>
> p_scriptObject = NPN_CreateObject(p_browser,
p_scriptClass);<br>
> }<br>
> return NPN_RetainObject(p_scriptObject);<br>
> }<br>
><br>
<br>
------------------------------------------------------------------------</tt></font><font
size="-1"><br>
<br>
Here are a few extracts of the full document written. It aims at
showing what can be done in order to build a drop down menu<br>
</font><font size="-1"><tt><br>
/* A JSON writing of the channels object */<br>
channels = {<br>
france2: {<br>
name:"France 2",<br>
type:"tv",<br>
target:"201",<br>
logo:"france2.png"<br>
},<br>
france3: {<br>
name:"France 3 national",<br>
type:"tv",<br>
target:"202",<br>
logo:"france3.png"<br>
},<br>
france5: {<br>
name:"France 5",<br>
type:"tv",<br>
target:"203",<br>
logo:"france5.png"<br>
},<br>
arte: {<br>
name:"Arte",<br>
type:"tv",<br>
target:"204",<br>
logo:"arte.png"<br>
},<br>
lemouv: {<br>
name:"Le Mouv'",<br>
type:"radio",<br>
track:"1007",<br>
target:"110022",<br>
logo:"lemouv.png"<br>
},<br>
ritalia: {<br>
name:"Radio Italia",<br>
type:"webradio",<br>
target:<a class="moz-txt-link-rfc2396E" href="mms://radioitalia.wm.p1.str3.com/rditaliahq">"mms://radioitalia.wm.p1.str3.com/rditaliahq"</a>,<br>
logo:"ritalia.png"<br>
}<br>
}<br>
<br>
/* screen points about the node corresponding to the "screen" div.
*/<br>
var screen = document.getElementById("screen");<br>
<br>
/* The plugin is embedded into the screen */<br>
var embed = document.createElement("embed");<br>
<br>
/* Correct attributes of the embed tag are set */<br>
/* depending whether it's a radio, tv or film */<br>
embed.setAttribute("type", "application/x-vlc-plugin");<br>
embed.setAttribute("name", "frame");<br>
embed.setAttribute("autoplay", "yes");<br>
if ( channel.type == "radio" ) {<br>
embed.setAttribute("hidden", "no");<br>
embed.setAttribute("video", "0");<br>
embed.setAttribute("ts-es-id-pid", "yes");<br>
embed.setAttribute("audio-track-id", channel.track);<br>
embed.setAttribute("width", "1px");<br>
embed.setAttribute("height", "1px");<br>
embed.setAttribute("target",
<a class="moz-txt-link-rfc2396E" href="rtsp://mafreebox.freebox.fr/freeboxtv/">"rtsp://mafreebox.freebox.fr/freeboxtv/"</a> + channel.target);<br>
}<br>
<br>
screen.appendChild ( embed );<br>
<br>
/* Function to play the stream */<br>
function play(){<br>
document.frame.play();<br>
}<br>
<br>
</tt></font><font size="-1"><tt> /* Function to stop the stream */</tt></font><br>
<font size="-1"><tt> function stop(){<br>
document.frame.stop();<br>
}<br>
</tt></font><font size="-1"><br>
</font><font size="-1"><tt> /* Method to make fullscreen (if you
want a button to do it beacause a double click on the screen is enough)
*/<br>
function fullscreen(){<br>
document.frame.fullscreen();<br>
}<br>
<br>
</tt></font><font size="-1">Have fun !<br>
db<br>
</font>
</body>
</html>