but i can't found where i put the transcode line
Code: Select all
<html>
<head>
<title>MCE Freebox</title>
<link rel="STYLESHEET" type="text/css" href="./Main.css">
<script src="./BasicFunctions.js" type="text/javascript"></script>
<script src="./Scrolling.js" type="text/javascript"></script>
<script src="./MoveFocus.js" type="text/javascript"></script>
<script language="JScript">
var RefreshXMLInterval=5*60; //in second
var ZapInterval=10; // in sec
var InfoBarDelay=8;
var format=":aspect-ratio=4:3";
var FullScreen=false;
var CurrentChannelID=0;
var LastChannelID=2;
var top;
var height;
var oXmlData2 = new ActiveXObject("Msxml2.DOMDocument.3.0");
var oXmlData = new ActiveXObject("Msxml2.DOMDocument.3.0");
var oNodesEPG;
var oNodesLIST;
var marge=0;
var vv=document.getElementById("vlcTable");
var timer=false;
var timerXML=false;
var timerZap=false;
var Zapping=false;
oXmlData2.async = false;
oXmlData.async = false;
oXmlData.load("list.xml");
oNodesLIST = oXmlData.selectNodes("/channels/channel");
if (oXmlData.parseError.errorCode != 0) alert('Erreur liste chaine');
function ReadXML()
{
oXmlData2.load("http://audience.free.fr/audience15.xml");
oNodesEPG = oXmlData2.selectNodes("/audience15/channel");
if (oXmlData2.parseError.errorCode != 0) alert('Erreur Audience Free');
}
function GetVal(Elem)
{
if (Elem) return Elem.text;
else return '';
}
</script>
<script language="JScript" id="clientEventHandlersJS">
function pageunLoadFunctions()
{
setBGColor("#0E4C97");
//window.external.MediaCenter.DirectXExclusive = true;
}
function pageLoadFunctions()
{
setBGColor("#0E4C97");
//window.external.MediaCenter.DirectXExclusive = false;
checkSVP();
setCounter();
setArray();
startFocus();
Clock();
Play();
document.vlc.play();
}
function RefreshXML()
{
if (timerXML) window.clearTimeout(timerXML);
ReadXML();
for (var i=0; i<oNodesLIST.length; i++)
document.getElementById(i+200).innerHTML=PrintInfo(oNodesLIST.item(i).selectNodes("name").item(0).text);
timerXML=window.setTimeout("RefreshXML();", RefreshXMLInterval*1000); //
}
function Play()
{
oCurFocus = document.getElementById(''+(CurrentChannelID+200));
oCurFocus.focus();
/*if (CurrentChannelID==8) // NRJ12
format=":aspect-ratio=16:9";*/
var options = new Array(":input-repeat=0");
var targetURL = "rtsp://mafreebox.freebox.fr/freeboxtv/" + oNodesLIST.item(CurrentChannelID).selectNodes("id").item(0).text
document.vlc.addTarget(targetURL, options, 4+8, -666);
if (FullScreen) ShowChannel();
}
function ShowChannel(Text)
{
if (timer) window.clearTimeout(timer);
if (FullScreen)
{
var vlcTable=document.getElementById("vlcTable");
var vlc=document.getElementById("vlc");
vlc.style.height=document.body.clientHeight-top-51;
}
var chan=document.getElementById('Channel');
chan.style.visibility='visible';
chan.style.top=document.body.clientHeight-53;
//chan.style.width=document.body.clientwidth;
//chan.style.zorder=0;
var now = new Date();
var html;
html='<center><table><tr><td width=70 height=51><img src="icon/';
html+=oNodesLIST.item(CurrentChannelID).selectNodes("img").item(0).text;
html+='" width=62 height=48 hspace=10 vspace=0 align=absmiddle></td><td style=" FONT-WEIGHT: bold; FONT-SIZE: 20pt; font-family: arial; padding-left: 10; color: #f2f2f2; padding-top: 2">';
html+=PrintInfo(oNodesLIST.item(CurrentChannelID).selectNodes("name").item(0).text);
html+='</td><td style=" FONT-WEIGHT: bold; FONT-SIZE: 28pt; font-family: arial; padding-left: 10; color: #f2f2f2; padding-top: 2">';
var m=now.getMinutes();
if (m<10) m='0'+m;
html+=' '+now.getHours()+':'+m;
if (Text) html+=' '+Text;
if (Zapping) html+=' <img src=remote.gif>';
html+='</td></tr></table></center>';
chan.innerHTML=html;
timer=window.setTimeout("HideChannel();", InfoBarDelay*1000);
}
function HideChannel()
{
document.getElementById('Channel').style.visibility='hidden';
if (FullScreen) document.getElementById('vlc').style.height=height;
timer=false;
}
function Clock()
{
// refresh the xml data ...
var now = new Date();
var html;
html='<font style=" FONT-WEIGHT: bold; FONT-SIZE: 28pt; font-family: arial; color: #f2f2f2;">';
var m=now.getMinutes();
if (m<10) m='0'+m;
html+=''+now.getHours()+':'+m;
html+='<font>';
document.getElementById('Clock').innerHTML=html;
window.setTimeout("Clock();", 60*1000);
}
function PrintInfo(Name)
{
var buffer='';
for (var i=0; i<oNodesEPG.length; i++)
{
if (Name==oNodesEPG.item(i).selectNodes("name").item(0).text)
{
buffer='';
buffer+='<font style="font-size=22px"><b><nobr>';
buffer+=GetVal(oNodesEPG.item(i).selectNodes("epg_title").item(0));
buffer+='</nobr></font><br>';
buffer+='<font style="font-size=16px">';
buffer+=GetVal(oNodesEPG.item(i).selectNodes("epg_start").item(0));
buffer+=' - ';
buffer+=GetVal(oNodesEPG.item(i).selectNodes("epg_end").item(0));
buffer+=' ';
buffer+=GetVal(oNodesEPG.item(i).selectNodes("epg_type").item(0));
//buffer+=' <b>';
//buffer+=GetVal(oNodesEPG.item(i).selectNodes("rank").item(0));
//buffer+='/15</b>';
buffer+=' </font>';
rank=GetVal(oNodesEPG.item(i).selectNodes("rank").item(0));
if (rank!="")
{
r=Number(rank);
if (r<6)
{
r=6-r;
for (;r>0;r--) buffer+='<img align=absmiddle src=etoile.gif>';
}
}
break;
}
}
if (buffer=='') buffer=Name;
return buffer;
}
function Zap()
{
if (Zapping==false) return 0;
LastChannelID=CurrentChannelID;
if (CurrentChannelID<oNodesLIST.length-1)
CurrentChannelID++;
else
CurrentChannelID=0;
Play();
window.setTimeout("Zap();", ZapInterval*1000);
}
function doKeyDown(keyChar)
{
//alert(keyChar);
switch(keyChar)
{
case 8:// Keyboard Backspace selected
case 166:// Remote Control Back button
if (FullScreen)
{
FullScreen=false;
var vv=document.getElementById("vlcTable");
vv.style.top=450;
vv.style.left=10;
document.vlc.style.width=280;
document.vlc.style.height=210;
Zapping=false;
if (TimerZap) window.clearTimeout(timerZap);
}
else
{
window.external.MediaCenter.CloseApplication();
}
break;
case 33: // Channel+
case 176:
LastChannelID=CurrentChannelID;
if (CurrentChannelID<oNodesLIST.length-1)
CurrentChannelID++;
else
CurrentChannelID=0;
Play();
break;
case 34: // Channel-
case 177:
LastChannelID=CurrentChannelID;
if (CurrentChannelID>0)
CurrentChannelID--;
else
CurrentChannelID=oNodesLIST.length-1
Play();
break;
case 250: // play
Play();
//window.external.MediaCenter.CustomViewPort.focus();
break;
case 178: // stop
document.vlc.stop();
break;
case -100: // info
if (FullScreen)
{
//RefreshXML();
ShowChannel();
}
else
window.navigate("./apropos.htm");
break;
case 51: //#
if (timer)
HideChannel();
else
{
ShowChannel('Loading EPG...');
window.setTimeout("RefreshEPG();", 100);
//RefreshXML();
//ShowChannel();
}
break;
case 56: // etoile
Zapping=!Zapping;
if (Zapping)
{
window.setTimeout("Zap();", ZapInterval*1000);
//ShowChannel("Zapping ON");
}
else
{
window.clearTimeout(timerZap);
//ShowChannel("Zapping OFF");
}
ShowChannel();
break;
/*case 49: // button 1
break;*/
default: // ID of button
{
//alert(Number(keyChar)); break;
var k=Number(keyChar)-49;
if(k>=0&&k<10&&CurrentChannelID!=k)
{
LastChannelID=CurrentChannelID;
CurrentChannelID=k;
Play();
}
break;
}
}
}
function RefreshEPG()
{
RefreshXML();
ShowChannel();
}
function doSelect()
{
if (FullScreen)
{
if (Zapping)
{
Zapping=false;
if (TimerZap) window.clearTimeout(timerZap);
}
else
{
if (LastChannelID!=CurrentChannelID)
var temp=CurrentChannelID;
CurrentChannelID=LastChannelID;
LastChannelID=temp;
Play();
}
return true;
}
var vv=document.getElementById("vlcTable");
switch(oCurFocus.id)
{
case "apropos": // ID of button
{
window.navigate("./apropos.htm");
break;
}
case "retour": // ID of button
{
window.external.MediaCenter.CloseApplication();
break;
}
case "fullscreen4": // ID of button
{
top=-marge;
height=document.body.clientHeight+marge*2;
vv.style.left=-marge;
document.vlc.style.width=document.body.clientWidth+marge*2;
document.vlc.style.height=height;
vv.style.top=top;
FullScreen=true;
if (format!=":aspect-ratio=4:3")
{
format=":aspect-ratio=4:3";
Play();
}
ShowChannel();
break;
}
case "Zoom": // ID of button
{
vv.style.left=-marge;
document.vlc.style.width=document.body.clientWidth+marge*2;
var h=document.body.clientWidth*3/4;
if (h>document.body.clientHeight)
top=-(h-document.body.clientHeight)/2-marge;
else
top=-marge;
height=h+marge*2;
document.vlc.style.height=height;
vv.style.top=top;
FullScreen=true;
if (format!=":aspect-ratio=4:3")
{
format=":aspect-ratio=4:3";
Play();
}
ShowChannel();
break;
}
case "fullscreen16": // ID of button
{
vv.style.left=-marge;
document.vlc.style.width=document.body.clientWidth+marge*2;
top=-marge;
height=document.body.clientHeight+marge*2;
document.vlc.style.height=height;
vv.style.top=top;
FullScreen=true;
if (format!=":aspect-ratio=16:9")
{
format=":aspect-ratio=16:9";
Play();
}
ShowChannel();
break;
}
case "Panoramique": // ID of button
{
var h=document.body.clientWidth*10/16;
vv.style.left=-marge;
document.vlc.style.width=document.body.clientWidth+marge*2;
if (h>document.body.clientHeight)
top=-(h-document.body.clientHeight)/2-marge;
else
top=-marge;
height=h+marge*2;
document.vlc.style.height=height;
vv.style.top=top;
FullScreen=true;
if (format!=":aspect-ratio=16:11")
{
format=":aspect-ratio=16:11";
Play();
}
ShowChannel();
break;
}
// .. and so on. Create a case for each button on the page.
default: // ID of button
{
if (CurrentChannelID!=Number(oCurFocus.id)-200)
{
LastChannelID=CurrentChannelID;
CurrentChannelID=Number(oCurFocus.id)-200;
Play();
}
break;
}
}
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
.style1 {color: #F2F2F2}
-->
</style>
</head>
<body id="body" MCFocusStart="retour" onunload="pageunLoadFunctions()" onload="pageLoadFunctions()" onkeydown="onRemoteEvent(window.event.keyCode)">
<div id="Channel" style="z-index:9999; visibility: hidden; position: absolute; top: 0px; left: 0px;" name="Channel">
</div>
<div id="Clock" style="position: absolute; top: 20px; left: 890px;" name="Clock">
</div>
<div id="vlcTable" style="position: absolute; top: 450px; left: 10px;" name="vlcTable">
<OBJECT classid="clsid:E23FE9C6-778E-49D4-B537-38FCDE4887D8" codebase="http://downloads.videolan.org/pub/videolan/vlc/latest/win32/axvlc.cab"
width="280" height="210" id="vlc" events="false">
<param name="MRL" value="" />
<param name="AutoLoop" value="0" />
<param name="AutoPlay" value="1" />
<param name="ExtentWidth" value="7408">
<param name="ExtentHeight" value="5556">
<param name="Visible" value="-1">
<param name="Volume" value="100">
</OBJECT></div>
<!-- Start span used as stand-in for Shared Viewport -->
<span style="position: absolute; top: 0; left: 0; height: 100%;">
<table style="position: absolute; top: 0; left: 0; height: 100%;" cellspacing="0" cellpadding="0">
<tr>
<td valign="bottom" height="100%"> <span id="SVP" style="width: 308; height: 216; vertical-align: bottom" MCFocusable="true"></span>
</td>
</tr>
</table>
</span>
<!-- End span used as stand-in for Shared Viewport -->
<!-- Item counter at lower right. Displays only if button menu is scrollable -->
<span id="itemCounterSpan" style="font: 17pt Arial; color: #f2f2f2; width: 617; Height: 42; text-align: right; display: block; position: absolute; top: 626; left: 350;">
<span id="counterNum">1</span> of <span id="counterTotal"></span>
<span id="arrowUp" class="arrowUp" onclick = "pageUpDown('up')"></span>
<span id="arrowDown" class="arrowDown" onclick = "pageUpDown('down')"></span>
</span>
<!-- End item counter at lower right -->
<!-- Headline -->
<span id="title" class="text1" style="position: absolute; top: 56; left: 355;"><b>FreeBox TV </b></span>
<!-- Table for buttons at left -->
<table id="listTable" border="0" cellpadding="0" cellspacing="3" style="position: absolute; top: 97; left: 10; width: 178px;">
<tr>
<td><span id="retour" class="button1" MCFocusable="true">Retour</span></td>
</tr><tr>
<td><span id="apropos" class="button1" MCFocusable="true">A propos</span></td>
</tr>
<!--------------------------------------------------------------------------------------------------->
<tr><td><span id="fullscreen4" class="button1" MCFocusable="true">4:3</span></td></tr>
<tr><td><span id="Panoramique" class="button1" MCFocusable="true">Panoramique</span></td></tr>
<tr><td><span id="Zoom"class="button1" MCFocusable="true">Zoom</span></td></tr>
<tr><td><span id="fullscreen16" class="button1" MCFocusable="true">16:9</span></td></tr>
</table>
<!-- End table for buttons at left -->
<span id="scrollspan" MCScrollable="true" style="position: relative; top: 100; left: 300; width: 800; height: 510; overflow: hidden">
<!-- Do not set table's position to absolute, or scrolling will not work -->
<table border="0" cellpadding="0" cellspacing="0">
<script>
ReadXML();
var html='';
for (var i=0; i<oNodesLIST.length; i++)
{
html+='<tr><td><img src=icon/';
html+= oNodesLIST.item(i).selectNodes("img").item(0).text;
html+=' width=62 height=48 hspace=10 vspace=0 align=absmiddle></td><td><span id=';
html+=200+i;
html+=' class=button2 style="width:607; padding-top: 2" MCFocusable=true>';
html+=PrintInfo(oNodesLIST.item(i).selectNodes("name").item(0).text);
html+='</span></td></tr>';
}
document.write (html);
timerXML=window.setTimeout("RefreshXML();", RefreshXMLInterval*1000);
</script>
</table>
<SPAN class=text1><br>
</SPAN>
</span>
</body>
</html>