Commit a9c0c8bc authored by Jean-Paul Saman's avatar Jean-Paul Saman

Use the integer value for teletext page in test.html.

(cherry picked from commit 7d52e042be7fefecd5f8039d6fa7fa9ee445e060)
parent 02c98de6
...@@ -58,14 +58,14 @@ function init(){ ...@@ -58,14 +58,14 @@ function init(){
function getVLC(name) function getVLC(name)
{ {
if (window.document[name]) if (window.document[name])
{ {
return window.document[name]; return window.document[name];
} }
if (navigator.appName.indexOf("Microsoft Internet")==-1) if (navigator.appName.indexOf("Microsoft Internet")==-1)
{ {
if (document.embeds && document.embeds[name]) if (document.embeds && document.embeds[name])
return document.embeds[name]; return document.embeds[name];
} }
else // if (navigator.appName.indexOf("Microsoft Internet")!=-1) else // if (navigator.appName.indexOf("Microsoft Internet")!=-1)
{ {
...@@ -90,7 +90,7 @@ MRL: ...@@ -90,7 +90,7 @@ MRL:
</TD></TR> </TD></TR>
<TR><TD align="center" colspan="2"> <TR><TD align="center" colspan="2">
<!-- <!--
Insert VideoLAN.VLCPlugin.2 Insert VideoLAN.VLCPlugin.2
--> -->
<OBJECT classid="clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921" <OBJECT classid="clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921"
width="640" width="640"
...@@ -137,7 +137,7 @@ Insert Slider widget ...@@ -137,7 +137,7 @@ Insert Slider widget
<INPUT type=button value="Fullscreen" onClick='getVLC("vlc").video.toggleFullscreen();'> <INPUT type=button value="Fullscreen" onClick='getVLC("vlc").video.toggleFullscreen();'>
<INPUT type=button value="Version" onClick='alert("vlc " + getVLC("vlc").VersionInfo);'> <INPUT type=button value="Version" onClick='alert("vlc " + getVLC("vlc").VersionInfo);'>
<INPUT type=button value=" State " onClick='doState();'> <INPUT type=button value=" State " onClick='doState();'>
</TD><TD align="right"> </TD><TD align="right">
<SPAN style="text-align:center">Volume:</SPAN> <SPAN style="text-align:center">Volume:</SPAN>
<INPUT type=button value=" - " onClick='updateVolume(-10)'> <INPUT type=button value=" - " onClick='updateVolume(-10)'>
<SPAN id="volumeTextField" style="text-align:center">--</SPAN> <SPAN id="volumeTextField" style="text-align:center">--</SPAN>
...@@ -145,19 +145,19 @@ Insert Slider widget ...@@ -145,19 +145,19 @@ Insert Slider widget
<INPUT type=button value="Mute" onClick='getVLC("vlc").audio.toggleMute();'> <INPUT type=button value="Mute" onClick='getVLC("vlc").audio.toggleMute();'>
</TD> </TD>
</TR> </TR>
<TR><TD>Playlist: <TR><TD>Playlist:
<INPUT type=button value="Prev" onClick='getVLC("vlc").playlist.prev();'> <INPUT type=button value="Prev" onClick='getVLC("vlc").playlist.prev();'>
<INPUT type=button value="Next" onClick='getVLC("vlc").playlist.next();'> <INPUT type=button value="Next" onClick='getVLC("vlc").playlist.next();'>
<INPUT type=button value="Clear All" onClick='getVLC("vlc").playlist.clear(); doItemCount();'> <INPUT type=button value="Clear All" onClick='getVLC("vlc").playlist.clear(); doItemCount();'>
Aspect Ratio: Aspect Ratio:
<SELECT readonly onChange='doAspectRatio(this.value)'> <SELECT readonly onChange='doAspectRatio(this.value)'>
<OPTION value="default">Default</OPTION> <OPTION value="default">Default</OPTION>
<OPTION value="1:1">1:1</OPTION> <OPTION value="1:1">1:1</OPTION>
<OPTION value="4:3">4:3</OPTION> <OPTION value="4:3">4:3</OPTION>
<OPTION value="16:9">16:9</OPTION> <OPTION value="16:9">16:9</OPTION>
<OPTION value="221:100">221:100</OPTION> <OPTION value="221:100">221:100</OPTION>
<OPTION value="5:4">5:4</OPTION> <OPTION value="5:4">5:4</OPTION>
</SELECT> </SELECT>
</TD><TD align="right"> </TD><TD align="right">
<INPUT type=button id="itemCount" value=" Items 0 " onClick='doItemCount();'> <INPUT type=button id="itemCount" value=" Items 0 " onClick='doItemCount();'>
<INPUT size=4 value="" id="removeid"><INPUT type=submit value="Delete" onClick="doRemoveItem(document.getElementById('removeid').value);"> <INPUT size=4 value="" id="removeid"><INPUT type=submit value="Delete" onClick="doRemoveItem(document.getElementById('removeid').value);">
...@@ -197,20 +197,20 @@ Verbosity: ...@@ -197,20 +197,20 @@ Verbosity:
<INPUT type=button value="get position" onClick='doGetPosition();'> <INPUT type=button value="get position" onClick='doGetPosition();'>
</TD> </TD>
</TR> </TR>
<TR> <TR>
<TD>Video Subtitle: <TD>Video Subtitle:
<INPUT type=button value=" + " onClick='doSubtitle(1);'> <INPUT type=button value=" + " onClick='doSubtitle(1);'>
<SPAN id="spuTextField" style="text-align:center">--</SPAN> <SPAN id="spuTextField" style="text-align:center">--</SPAN>
<INPUT type=button value=" - " onClick='doSubtitle(-1);'> <INPUT type=button value=" - " onClick='doSubtitle(-1);'>
</TD> </TD>
</TR> </TR>
<TR> <TR>
<TD> <TD>
<INPUT type=button id="telx" value="Teletext off" onClick='doToggleTeletext();'> <INPUT type=button id="telx" value="Teletext off" onClick='doToggleTeletext();'>
Teletext page: Teletext page:
<INPUT size=4 value="100" id="telxPage" onClick="doTelxPage(document.getElementById('telxPage').value);"> <INPUT size=4 value="100" id="telxPage" onClick='doTelxPage(document.getElementById("telxPage").value);'>
</TD> </TD>
</TR> </TR>
</TABLE> </TABLE>
<SCRIPT language="javascript"> <SCRIPT language="javascript">
<!-- <!--
...@@ -221,7 +221,7 @@ var monitorTimerId = 0; ...@@ -221,7 +221,7 @@ var monitorTimerId = 0;
var rateTimerId = 0; var rateTimerId = 0;
var inputTrackerScrolling = false; var inputTrackerScrolling = false;
var inputTrackerIgnoreChange = false; var inputTrackerIgnoreChange = false;
var telxState = false; var telxState = false;
function doSetSlider() function doSetSlider()
{ {
...@@ -298,40 +298,36 @@ function doAspectRatio(value) ...@@ -298,40 +298,36 @@ function doAspectRatio(value)
{ {
var vlc = getVLC("vlc"); var vlc = getVLC("vlc");
vlc.video.aspectRatio = value; vlc.video.aspectRatio = value;
}; };
function doSubtitle(value) function doSubtitle(value)
{ {
var vlc = getVLC("vlc"); var vlc = getVLC("vlc");
alert(vlc.video.subtitle + value); vlc.video.subtitle = vlc.video.subtitle + value;
vlc.video.subtitle = vlc.video.subtitle + value; document.getElementById("spuTextField").innerHTML = vlc.video.subtitle;
document.getElementById("spuTextField").innerHTML = vlc.video.subtitle; };
};
function doTelxPage(value)
function doTelxPage(value) {
{ var vlc = getVLC("vlc");
var vlc = getVLC("vlc"); vlc.video.teletext = parseInt(value);
alert( value ); };
vlc.video.teletext = 889; //value;
}; function doToggleTeletext()
{
function doToggleTeletext() var vlc = getVLC("vlc");
{
var vlc = getVLC("vlc"); vlc.video.toggleTeletext();
if (telxState)
vlc.video.toggleTeletext(); {
if (telxState) document.getElementById("telx").innerHTML = "Teletext on";
{ telxState = true;
document.getElementById("telx").innerHTML = "Teletext on"; }
telxState = true; else
alert( "telextext on" ); {
} document.getElementById("telx").innerHTML = "Teletext off";
else telxState = false;
{ }
document.getElementById("telx").innerHTML = "Teletext off";
telxState = false;
alert( "telextext off" );
}
} }
function doItemCount() function doItemCount()
...@@ -399,7 +395,7 @@ function doState() ...@@ -399,7 +395,7 @@ function doState()
if( newState == 0 ) if( newState == 0 )
{ {
// current media has stopped // current media has stopped
onEnd(); onEnd();
} }
else if( newState == 1 ) else if( newState == 1 )
...@@ -430,17 +426,17 @@ function doState() ...@@ -430,17 +426,17 @@ function doState()
else if( newState == 6 ) else if( newState == 6 )
{ {
// current media is playing forward // current media is playing forward
onForward(); onForward();
} }
else if( newState == 7 ) else if( newState == 7 )
{ {
// current media is playing backward // current media is playing backward
onBackward(); onBackward();
} }
else if( newState == 8 ) else if( newState == 8 )
{ {
// current media has ended // current media has ended
onEnd(); onEnd();
} }
else if( newState == 9 ) else if( newState == 9 )
{ {
...@@ -465,7 +461,7 @@ function monitor() ...@@ -465,7 +461,7 @@ function monitor()
{ {
alert( msg.message ); alert( msg.message );
} }
document.getElementById("message").innerHTML = msg.message; document.getElementById("message").innerHTML = msg.message;
} }
// clear the log once finished to avoid clogging // clear the log once finished to avoid clogging
vlc.log.messages.clear(); vlc.log.messages.clear();
...@@ -475,7 +471,7 @@ function monitor() ...@@ -475,7 +471,7 @@ function monitor()
{ {
if( newState == 0 ) if( newState == 0 )
{ {
// current media has stopped // current media has stopped
onEnd(); onEnd();
} }
else if( newState == 1 ) else if( newState == 1 )
...@@ -498,27 +494,27 @@ function monitor() ...@@ -498,27 +494,27 @@ function monitor()
// current media is now paused // current media is now paused
onPause(); onPause();
} }
else if( newState == 5 ) else if( newState == 5 )
{ {
// current media has stopped // current media has stopped
onStop(); onStop();
} }
else if( newState == 6 ) else if( newState == 6 )
{ {
// current media is playing forward // current media is playing forward
onForward(); onForward();
} }
else if( newState == 7 ) else if( newState == 7 )
{ {
// current media is playing backward // current media is playing backward
onBackward(); onBackward();
} }
else if( newState == 8 ) else if( newState == 8 )
{ {
// current media has ended // current media has ended
onEnd(); onEnd();
} }
else if( newState == 9 ) else if( newState == 9 )
{ {
// current media encountered error // current media encountered error
onError(); onError();
...@@ -593,11 +589,11 @@ function doPlayOrPause() ...@@ -593,11 +589,11 @@ function doPlayOrPause()
if( vlc.playlist.isPlaying ) if( vlc.playlist.isPlaying )
{ {
vlc.playlist.togglePause(); vlc.playlist.togglePause();
monitor(); monitor();
} }
else if( vlc.playlist.itemCount > 0 ) else if( vlc.playlist.itemCount > 0 )
{ {
// clear the message log and enable error logging // clear the message log and enable error logging
vlc.log.verbosity = 1; vlc.log.verbosity = 1;
vlc.log.messages.clear(); vlc.log.messages.clear();
vlc.playlist.play(); vlc.playlist.play();
...@@ -605,7 +601,7 @@ function doPlayOrPause() ...@@ -605,7 +601,7 @@ function doPlayOrPause()
} }
else else
{ {
// disable log // disable log
vlc.log.verbosity = -1; vlc.log.verbosity = -1;
alert('nothing to play !'); alert('nothing to play !');
} }
...@@ -725,7 +721,7 @@ function onStop() ...@@ -725,7 +721,7 @@ function onStop()
// disable logging // disable logging
vlc.log.verbosity = -1; vlc.log.verbosity = -1;
if( !inputTracker.disabled ) if( !inputTracker.disabled )
{ {
inputTracker.setValue(inputTracker.minVal); inputTracker.setValue(inputTracker.minVal);
inputTracker.setDisabled(true); inputTracker.setDisabled(true);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment