Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
84476bb3
Commit
84476bb3
authored
Jun 14, 2008
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update test HTML page.
parent
a4bb6352
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
506 additions
and
102 deletions
+506
-102
projects/activex/test.html
projects/activex/test.html
+506
-102
No files found.
projects/activex/test.html
View file @
84476bb3
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HTML>
<TITLE>
VLC ActiveX plugin test page
</TITLE>
<TITLE>
VLC Plugin test page
</TITLE>
<BODY>
<STYLE>
.inputTrackerInput {
height:20;
width:30;
font-family : Arial, Helvetica, sans-serif;
font-size : 12px;
}
</STYLE>
<SCRIPT
type=
"text/javascript"
src=
"blueshoes-4.5/javascript/lib/LibCrossBrowser.js"
></SCRIPT>
<SCRIPT
type=
"text/javascript"
src=
"blueshoes-4.5/javascript/lib/EventHandler.js"
></SCRIPT>
<SCRIPT
type=
"text/javascript"
src=
"blueshoes-4.5/javascript/core/form/Bs_FormUtil.lib.js"
></SCRIPT>
<SCRIPT
type=
"text/javascript"
src=
"blueshoes-4.5/javascript/components/slider/Bs_Slider.class.js"
></SCRIPT>
<SCRIPT
language=
"JavaScript"
>
<!--
function init(){
inputTracker = new Bs_Slider();
inputTracker.attachOnChange(onInputTrackerChange);
inputTracker.attachOnSlideStart(onInputTrackerScrollStart);
inputTracker.attachOnSlideEnd(onInputTrackerScrollEnd);
inputTracker.width = 530 ;
inputTracker.height = 15;
inputTracker.minVal = 0;
inputTracker.maxVal = 1.0;
inputTracker.valueDefault = 0;
inputTracker.valueInterval = 1/530;
inputTracker.setDisabled(true);
inputTracker.imgDir = 'blueshoes-4.5/javascript/components/slider/img/';
inputTracker.setBackgroundImage('aluminumalloyvolcanic/horizontal_background.gif', 'repeat');
inputTracker.setArrowIconLeft('aluminumalloyvolcanic/horizontal_backgroundLeft.gif', 2, 19);
inputTracker.setArrowIconRight('aluminumalloyvolcanic/horizontal_backgroundRight.gif', 2, 19);
inputTracker.setSliderIcon('aluminumalloyvolcanic/horizontal_knob.gif', 15, 19);
inputTracker.useInputField = 0;
inputTracker.draw('inputTrackerDiv');
if( navigator.appName.indexOf("Microsoft Internet")==-1 )
{
onVLCPluginReady()
}
else if( document.readyState == 'complete' )
{
onVLCPluginReady();
}
else
{
/* Explorer loads plugins asynchronously */
document.onreadystatechange=function() {
if( document.readyState == 'complete' )
{
onVLCPluginReady();
}
}
}
};
function getVLC(name)
{
if (window.document[name])
{
return window.document[name];
}
if (navigator.appName.indexOf("Microsoft Internet")==-1)
{
if (document.embeds && document.embeds[name])
return document.embeds[name];
}
else // if (navigator.appName.indexOf("Microsoft Internet")!=-1)
{
return document.getElementById(name);
}
};
function onVLCPluginReady()
{
updateVolume(0);
};
//-->
</SCRIPT>
<BODY
onLoad=
"init();"
>
<TABLE>
<TABLE>
<TR><TD
colspan=
"2"
>
<TR><TD
colspan=
"2"
>
MRL:
MRL:
<INPUT
size=
"90"
id=
"targetTextField"
value=
""
>
<INPUT
size=
"90"
id=
"targetTextField"
value=
""
>
<INPUT
type=
submit
value=
"Go"
onClick=
"doGo(document.getElementById('targetTextField').value);"
>
<INPUT
type=
submit
value=
"Go"
onClick=
"doGo(document.getElementById('targetTextField').value);"
>
<INPUT
type=
submit
value=
"Add"
onClick=
"doAdd(document.getElementById('targetTextField').value);"
>
</TD></TR>
</TD></TR>
<TR><TD
colspan=
"2"
>
<TR><TD
align=
"center"
colspan=
"2"
>
<!--
<!--
Insert VideoLAN.VLCPlugin.2
activex control
Insert VideoLAN.VLCPlugin.2
-->
-->
<OBJECT
classid=
"clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921"
<OBJECT
classid=
"clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921"
codebase=
"http://downloads.videolan.org/pub/videolan/vlc/latest/win32/axvlc.cab#Version=0,8,6,0"
width=
"640"
width=
"640"
height=
"480"
height=
"480"
id=
"vlc"
id=
"vlc"
...
@@ -23,59 +103,220 @@ Insert VideoLAN.VLCPlugin.2 activex control
...
@@ -23,59 +103,220 @@ Insert VideoLAN.VLCPlugin.2 activex control
<param
name=
"AutoPlay"
value=
"False"
/>
<param
name=
"AutoPlay"
value=
"False"
/>
<param
name=
"Volume"
value=
"50"
/>
<param
name=
"Volume"
value=
"50"
/>
<param
name=
"StartTime"
value=
"0"
/>
<param
name=
"StartTime"
value=
"0"
/>
<EMBED
pluginspage=
"http://www.videolan.org"
type=
"application/x-vlc-plugin"
version=
"VideoLAN.VLCPlugin.2"
width=
"640"
height=
"480"
name=
"vlc"
>
</EMBED>
</OBJECT>
</OBJECT>
</TD></TR>
</TD></TR>
<TR><TD>
<TR><TD
colspan=
"2"
>
<TABLE><TR>
<TD
valign=
"top"
width=
"550"
>
<!--
<!--
Insert
MSComctlLib.Slider.2 activex control
Insert
Slider widget
-->
-->
<OBJECT
classid=
"clsid:F08DF954-8592-11D1-B16A-00C0F0283628"
<DIV
id=
"inputTrackerDiv"
</
DIV
>
width=
"540"
height=
"20"
id=
"slider"
events=
"True"
>
<param
name=
"TickStyle"
value=
"3"
/>
<param
name=
"Min"
value=
"0"
/>
<param
name=
"Max"
value=
"0"
/>
<param
name=
"Value"
value=
"0"
/>
<param
name=
"Enabled"
value=
"False"
/>
</OBJECT>
</TD><TD
width=
"15%"
>
</TD><TD
width=
"15%"
>
<DIV
id=
"info"
style=
"text-align:center"
>
-:--:--/-:--:--
</DIV>
<DIV
id=
"info"
style=
"text-align:center"
>
-:--:--/-:--:--
</DIV>
<DIV
id=
"state"
style=
"text-align:center"
>
Stopped...
</DIV>
</TD></TR></TABLE>
</TD></TR>
</TD></TR>
<TR><TD
colspan=
"2"
>
<TR><TD>
<INPUT
type=
button
id=
"PlayOrPause"
value=
" Play "
onClick=
'doPlayOrPause();'
>
<INPUT
type=
button
id=
"PlayOrPause"
value=
" Play "
onClick=
'doPlayOrPause();'
>
<INPUT
type=
button
value=
"Stop"
onClick=
'doStop();'
>
<INPUT
type=
button
value=
"Stop"
onClick=
'doStop();'
>
<INPUT
type=
button
value=
" << "
onClick=
'doPlaySlower();'
>
<INPUT
type=
button
value=
" << "
onClick=
'doPlaySlower();'
>
<INPUT
type=
button
value=
" >> "
onClick=
'doPlayFaster();'
>
<INPUT
type=
button
value=
" >> "
onClick=
'doPlayFaster();'
>
<INPUT
type=
button
value=
"Backward"
onClick=
'doBackwardPlay(500);'
>
<INPUT
type=
button
value=
"Show"
onClick=
'document.getElementById("vlc").Visible = true;'
>
<INPUT
type=
button
value=
"Forward"
onClick=
'doForwardPlay(500);'
>
<INPUT
type=
button
value=
"Hide"
onClick=
'document.getElementById("vlc").Visible = false;'
>
<INPUT
type=
button
value=
"Fullscreen"
onClick=
'getVLC("vlc").video.toggleFullscreen();'
>
<INPUT
type=
button
value=
"Version"
onClick=
'alert("vlc " + getVLC("vlc").VersionInfo);'
>
<INPUT
type=
button
id=
"VersionBut"
value=
"Version"
onClick=
'alert(document.getElementById("vlc").VersionInfo);'
>
<INPUT
type=
button
value=
" State "
onClick=
'doState();'
>
</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>
<INPUT
type=
button
value=
" + "
onClick=
'updateVolume(+10)'
>
<INPUT
type=
button
value=
" + "
onClick=
'updateVolume(+10)'
>
<INPUT
type=
button
value=
"Mute"
onClick=
'document.getElementById("vlc").audio.toggleMute();'
>
<INPUT
type=
button
value=
"Mute"
onClick=
'getVLC("vlc").audio.toggleMute();'
>
</TD>
</TR>
<TR><TD>
Playlist:
<INPUT
type=
button
value=
"Prev"
onClick=
'getVLC("vlc").playlist.prev();'
>
<INPUT
type=
button
value=
"Next"
onClick=
'getVLC("vlc").playlist.next();'
>
<INPUT
type=
button
value=
"Clear All"
onClick=
'getVLC("vlc").playlist.clear(); doItemCount();'
>
<INPUT
size=
4
value=
"1:1"
id=
"aspect"
><INPUT
type=
submit
value=
"AspectRatio"
onClick=
"doAspectRatio(document.getElementById('aspect').value);"
>
</TD><TD
align=
"right"
>
<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);"
>
</TD>
</TR>
<TR><TD>
Messages:
<INPUT
type=
button
value=
"Messages"
onClick=
'doMessages();'
>
Verbosity:
<INPUT
size=
2
value=
"1"
id=
"verbosity"
onClick=
"doVerbosity(document.getElementById('verbosity').value);"
>
<INPUT
type=
button
value=
" + "
onClick=
'doVerbosity(1);'
>
<INPUT
type=
button
value=
" - "
onClick=
'doVerbosity(-1);'
>
</TD>
<TD>
<DIV
id=
"message"
style=
"text-align:center"
>
no message
</DIV>
</TD>
</TR>
<TR><TD>
Audio Channel:
<SELECT
readonly
onClick=
'doAudioChannel(this.value);'
>
<OPTION
value=
1
>
Stereo
</OPTION>
<OPTION
value=
2
>
Reverse Stereo
</OPTION>
<OPTION
value=
3
>
Left
</OPTION>
<OPTION
value=
4
>
Right
</OPTION>
<OPTION
value=
5
>
Dolby
</OPTION>
</SELECT>
</TD>
<TD>
<INPUT
type=
button
value=
"current channel"
onClick=
'alert(getVLC("vlc").audio.channel);'
>
</TD>
</TR>
<TR><TD>
Audio Track:
<INPUT
type=
button
value=
" + "
onClick=
'doAudioTrack(1);'
>
<SPAN
id=
"trackTextField"
style=
"text-align:center"
>
--
</SPAN>
<INPUT
type=
button
value=
" - "
onClick=
'doAudioTrack(-1);'
>
</TD>
<TD>
<INPUT
type=
button
value=
"set slider"
onClick=
'doSetSlider();'
>
<INPUT
type=
button
value=
"get position"
onClick=
'doGetPosition();'
>
</TD>
</TD>
</TR>
</TR>
</TABLE>
</TABLE>
<SCRIPT
language=
"javascript"
>
<SCRIPT
language=
"javascript"
>
<!--
<!--
var rate = 0;
var prevState = 0;
var prevState = 0;
var monitorTimerId = 0;
var monitorTimerId = 0;
var sliderScrolling = false;
var rateTimerId = 0;
var ignoreSliderChange = false;
var inputTrackerScrolling = false;
var inputTrackerIgnoreChange = false;
function doSetSlider()
{
var vlc = getVLC("vlc");
if (vlc.input)
{
// set slider to new position
vlc.input.time = (vlc.input.length/2);
}
};
function doGetPosition()
{
var vlc = getVLC("vlc");
if (vlc.input)
{
// set slider to new position
alert( "position is " + vlc.input.time);
}
};
function doForwardPlay(speed)
{
if (rateTimerId == 0)
{
rateTimerId = setInterval("ratechange()", speed);
rate = speed;
}
else rate = rate + speed;
};
function doBackwardPlay(speed)
{
if (rateTimerId == 0)
{
rateTimerId = setInterval("ratechange()", speed);
rate = -speed;
}
else rate = rate - speed;
};
function ratechange()
{
if (rateTimerId != 0)
{
var vlc = getVLC("vlc");
vlc.input.time = vlc.input.time + rate;
}
};
function doVerbosity(value)
{
var vlc = getVLC("vlc");
vlc.log.verbosity = vlc.log.verbosity + value;
document.getElementById("verbosity").value = vlc.log.verbosity;
};
function doAudioChannel(value)
{
var vlc = getVLC("vlc");
vlc.audio.channel = parseInt(value);
};
function doAudioTrack(value)
{
var vlc = getVLC("vlc");
vlc.audio.track = vlc.audio.track + value;
document.getElementById("trackTextField").innerHTML = vlc.audio.track;
};
function doAspectRatio(value)
{
var vlc = getVLC("vlc");
vlc.video.aspectRatio = value;
document.getElementById("aspect").value = vlc.video.aspectRatio;
}
function doItemCount()
{
var vlc = getVLC("vlc");
var count = vlc.playlist.itemCount;
document.getElementById("itemCount").value = " Items " + count + " ";
};
function doRemoveItem(item)
{
var vlc = getVLC("vlc");
vlc.playlist.removeItem(item);
};
function doMessages()
{
var vlc = getVLC("vlc");
if( vlc.log.messages.count > 0 )
{
// there is one or more messages in the log
var iter = vlc.log.messages.iterator();
while( iter.hasNext )
{
var msg = iter.next();
if( msg.severity <= 1 )
{
document.getElementById("message").innerHTML = msg.message;
}
}
// clear the log once finished to avoid clogging
vlc.log.messages.clear();
}
};
function updateVolume(deltaVol)
function updateVolume(deltaVol)
{
{
var vlc =
document.getElementById
("vlc");
var vlc =
getVLC
("vlc");
vlc.audio.volume += deltaVol;
vlc.audio.volume += deltaVol;
document.getElementById("volumeTextField").innerHTML = vlc.audio.volume+"%";
document.getElementById("volumeTextField").innerHTML = vlc.audio.volume+"%";
};
};
function formatTime(timeVal)
function formatTime(timeVal)
{
{
var timeHour = Math.round(timeVal / 1000);
var timeHour = Math.round(timeVal / 1000);
...
@@ -92,20 +333,81 @@ function formatTime(timeVal)
...
@@ -92,20 +333,81 @@ function formatTime(timeVal)
else
else
return timeMin+":"+timeSec;
return timeMin+":"+timeSec;
};
};
function doState()
{
var vlc = getVLC("vlc");
var newState = vlc.input.state;
if( newState == 0 )
{
// current media has stopped
onStop();
}
else if( newState == 1 )
{
// current media is openning/connecting
onOpen();
}
else if( newState == 2 )
{
// current media is buffering data
onBuffer();
}
else if( newState == 3 )
{
// current media is now playing
onPlay();
}
else if( newState == 4 )
{
// current media is now paused
onPause();
}
else if( newState == 5 )
{
// current media has stopped
onStop();
}
else if( newState == 6 )
{
// current media is playing forward
onForward();
}
else if( newState == 7 )
{
// current media is playing backward
onBackward();
}
else if( newState == 8 )
{
// current media encountered error
onError();
}
};
function monitor()
function monitor()
{
{
var vlc =
document.getElementById
("vlc");
var vlc =
getVLC
("vlc");
var newState = vlc.input.state;
var newState = vlc.input.state;
if( vlc.log.messages.count > 0 )
if( vlc.log.messages.count > 0 )
{
{
// there is one or more messages in the log
var iter = vlc.log.messages.iterator();
var iter = vlc.log.messages.iterator();
while( iter.hasNext )
while( iter.hasNext )
{
{
var msg = iter.next();
var msg = iter.next();
alert( msg );
if( msg.severity == 1 )
{
alert( msg.message );
}
document.getElementById("message").innerHTML = msg.message;
}
}
// clear the log once finished to avoid clogging
vlc.log.messages.clear();
vlc.log.messages.clear();
}
}
if( prevState != newState )
if( prevState != newState )
{
{
if( newState == 0 )
if( newState == 0 )
...
@@ -128,11 +430,31 @@ function monitor()
...
@@ -128,11 +430,31 @@ function monitor()
// current media is now playing
// current media is now playing
onPlay();
onPlay();
}
}
else if(
vlc.input.s
tate == 4 )
else if(
newS
tate == 4 )
{
{
// current media is now paused
// current media is now paused
onPause();
onPause();
}
}
else if( newState == 5 )
{
// current media has stopped
onStop();
}
else if( newState == 6 )
{
// current media is playing forward
onForward();
}
else if( newState == 7 )
{
// current media is playing backward
onBackward();
}
else if( newState == 8 )
{
// current media encountered error
onError();
}
prevState = newState;
prevState = newState;
}
}
else if( newState == 3 )
else if( newState == 3 )
...
@@ -140,61 +462,112 @@ function monitor()
...
@@ -140,61 +462,112 @@ function monitor()
// current media is playing
// current media is playing
onPlaying();
onPlaying();
}
}
monitorTimerId = setTimeout("monitor()", 1000);
if( monitorTimerId == 0 )
{
monitorTimerId = setInterval("monitor()", 1000);
}
};
};
/* actions */
/* actions */
function doGo(targetURL)
function doGo(targetURL)
{
{
var vlc =
document.getElementById
("vlc");
var vlc =
getVLC
("vlc");
var options = new Array(":vout=directx");
vlc.playlist.clear();
vlc.playlist.clear();
//vlc.playlist.add(targetURL, null, options);
while( vlc.playlist.itemCount > 0 )
vlc.playlist.add(targetURL);
vlc.playlist.play();
vlc.log.verbosity = 3;
vlc.log.messages.clear();
if( monitorTimerId == 0 )
{
{
monitor();
// clear() may return before the playlist has actually been cleared
// just wait for it to finish its job
}
//vlc.playlist.add(targetURL);
//vlc.playlist.play();
var itemId = vlc.playlist.add(targetURL);
if( itemId != -1 )
{
// clear the message log and enable error logging
vlc.log.verbosity = 1;
vlc.log.messages.clear();
// play MRL
vlc.playlist.play();
if( monitorTimerId == 0 )
{
monitor();
}
}
}
else
{
// disable log
vlc.log.verbosity = -1;
alert("cannot play at the moment !");
}
doItemCount();
if (rateTimerId != 0)
{
clearInterval("ratechange()");
}
rateTimerId = 0;
};
function doAdd(targetURL)
{
var vlc = getVLC("vlc");
var options = new Array(":vout-filter=deinterlace", ":deinterlace-mode=linear");
vlc.playlist.add(targetURL);
doItemCount();
};
};
function doPlayOrPause()
function doPlayOrPause()
{
{
var vlc =
document.getElementById
("vlc");
var vlc =
getVLC
("vlc");
if( vlc.playlist.isPlaying )
if( vlc.playlist.isPlaying )
{
{
vlc.playlist.togglePause();
vlc.playlist.togglePause();
monitor();
}
}
else
else
if( vlc.playlist.itemCount > 0 )
{
{
// clear the message log and enable error logging
vlc.log.verbosity = 1;
vlc.log.messages.clear();
vlc.log.messages.clear();
vlc.playlist.play();
vlc.playlist.play();
if( monitorTimerId == 0 )
monitor();
{
}
monitor();
else
}
{
// disable log
vlc.log.verbosity = -1;
alert('nothing to play !');
}
if (rateTimerId != 0)
{
clearInterval("ratechange()");
}
}
rateTimerId = 0;
};
};
function doStop()
function doStop()
{
{
document.getElementById
("vlc").playlist.stop();
getVLC
("vlc").playlist.stop();
if( monitorTimerId != 0 )
if( monitorTimerId != 0 )
{
{
clear
Timeout
(monitorTimerId);
clear
Interval
(monitorTimerId);
monitorTimerId = 0;
monitorTimerId = 0;
}
}
onStop();
onStop();
};
};
function doPlaySlower()
function doPlaySlower()
{
{
var vlc =
document.getElementById
("vlc");
var vlc =
getVLC
("vlc");
vlc.input.rate = vlc.input.rate / 2;
vlc.input.rate = vlc.input.rate / 2;
};
};
function doPlayFaster()
function doPlayFaster()
{
{
var vlc =
document.getElementById
("vlc");
var vlc =
getVLC
("vlc");
vlc.input.rate = vlc.input.rate * 2;
vlc.input.rate = vlc.input.rate * 2;
};
};
...
@@ -202,104 +575,135 @@ function doPlayFaster()
...
@@ -202,104 +575,135 @@ function doPlayFaster()
function onOpen()
function onOpen()
{
{
document.getElementById("
info
").innerHTML = "Opening...";
document.getElementById("
state
").innerHTML = "Opening...";
document.getElementById("PlayOrPause").value = "Pause";
document.getElementById("PlayOrPause").value = "Pause";
};
};
function onBuffer()
function onBuffer()
{
{
document.getElementById("
info
").innerHTML = "Buffering...";
document.getElementById("
state
").innerHTML = "Buffering...";
document.getElementById("PlayOrPause").value = "Pause";
document.getElementById("PlayOrPause").value = "Pause";
};
};
function onPlay()
function onPlay()
{
{
onPlaying()
;
document.getElementById("state").innerHTML = "Playing..."
;
document.getElementById("PlayOrPause").value = "Pause";
document.getElementById("PlayOrPause").value = "Pause";
onPlaying();
};
};
function onForward()
{ // Event is reserved for future enhancements
document.getElementById("state").innerHTML = "Forward playing...";
};
function onBackward()
{ // Event is reserved for future enhancements
document.getElementById("state").innerHTML = "Backward playing...";
};
var liveFeedText = new Array("Live", "((Live))", "(( Live ))", "(( Live ))");
var liveFeedText = new Array("Live", "((Live))", "(( Live ))", "(( Live ))");
var liveFeedRoll = 0;
var liveFeedRoll = 0;
function onPlaying()
function onPlaying()
{
{
if( !
slid
erScrolling )
if( !
inputTrack
erScrolling )
{
{
var slider = document.getElementById("slider");
var vlc = getVLC("vlc");
if( vlc.input.length > 0 )
var info = document.getElementById("info");
var mediaLen = vlc.input.length;
inputTrackerIgnoreChange = true;
if( mediaLen > 0 )
{
{
// seekable media
// seekable media
slider.Enabled = true;
if( inputTracker.maxVal == 1.0 )
slider.Max = slider.width;
{
ignoreSliderChange = true;
inputTracker.setDisabled(false);
slider.Value = vlc.input.position*slider.width;
inputTracker.maxVal = 1.0;
ignoreSliderChange = false;
}
document.getElementById("info").innerHTML = formatTime(vlc.input.time)+"/"+formatTime(vlc.input.length);
inputTracker.setValue(vlc.input.position);
info.innerHTML = formatTime(vlc.input.time)+"/"+formatTime(mediaLen);
}
}
else
else
{
{
// non-seekable "live" media
// non-seekable "live" media
if(
slider.Enabled
)
if(
inputTracker.maxVal != 0.0
)
{
{
slider.Value = slider.Min;
inputTracker.maxVal = 0.0;
slider.Enabled = false;
inputTracker.setValue(0.0);
inputTracker.setDisabled(true);
}
}
liveFeedRoll = liveFeedRoll & 3;
liveFeedRoll = liveFeedRoll & 3;
document.getElementById("info")
.innerHTML = liveFeedText[liveFeedRoll++];
info
.innerHTML = liveFeedText[liveFeedRoll++];
}
}
inputTrackerIgnoreChange = false;
}
}
};
};
function onPause()
function onPause()
{
{
document.getElementById("PlayOrPause").value = " Play ";
document.getElementById("PlayOrPause").value = " Play ";
};
};
function onStop()
function onStop()
{
{
// disable logging
vlc.log.verbosity = -1;
vlc.log.verbosity = -1;
if( slider.Enabled )
if( ! inputTracker.disabled )
{
{
slider.Value = slider.Min
;
inputTracker.setValue(inputTracker.minVal)
;
slider.Enabled = false
;
inputTracker.setDisabled(true)
;
}
}
document.getElementById("info").innerHTML = "-:--:--/-:--:--";
document.getElementById("info").innerHTML = "-:--:--/-:--:--";
document.getElementById("state").innerHTML = "Stopped...";
document.getElementById("PlayOrPause").value = " Play ";
document.getElementById("PlayOrPause").value = " Play ";
};
};
//-->
</SCRIPT>
<SCRIPT
language=
"JScript"
>
<!--
document.onreadystatechange=onVLCStateChange;
function onError()
function onVLCStateChange()
{
{
if( document.readyState == 'complete' )
var vlc = getVLC("vlc");
document.getElementById("state").innerHTML = "Error...";
if( vlc.log.messages.count > 0 )
{
{
updateVolume(0);
// there is one or more messages in the log
var iter = vlc.log.messages.iterator();
while( iter.hasNext )
{
var msg = iter.next();
if( msg.severity <= 1 )
{
alert( msg.message );
}
document.getElementById("message").innerHTML = msg.message;
}
// clear the log once finished to avoid clogging
vlc.log.messages.clear();
}
}
};
};
function slider::Scroll()
function onInputTrackerScrollStart()
{
{
var vlc = document.getElementById("vlc");
inputTrackerScrolling = true;
var slider = document.getElementById("slider");
var oldPos = vlc.input.position;
var newPos = slider.Value/slider.width;
if( (vlc.input.state == 3) && (oldPos != newPos) )
{
vlc.input.position = newPos;
slider.Text = formatTime(vlc.input.time);
document.getElementById("info").innerHTML = slider.Text+"/"+formatTime(vlc.input.length);
}
sliderScrolling = true;
};
};
function slider::Change()
function onInputTrackerScrollEnd(inputTracker, value, pos)
{
{
var vlc = document.getElementById("vlc");
inputTrackerScrolling = false;
var slider = document.getElementById("slider");
};
var oldPos = vlc.input.position;
var newPos = slider.Value/slider.width;
function onInputTrackerChange(inputTracker, value, pos)
if( sliderScrolling )
{
{
if( ! inputTrackerIgnoreChange )
sliderScrolling = false;
}
else if( !ignoreSliderChange && (vlc.input.state == 3) && (oldPos != newPos) )
{
{
vlc.input.position = newPos;
var vlc = getVLC("vlc");
if( (vlc.input.state == 3) && (vlc.input.position != value) )
{
var info = document.getElementById("info");
vlc.input.position = value;
info.innerHTML = formatTime(vlc.input.time)+"/"+formatTime(vlc.input.length);
}
}
}
};
};
//-->
//-->
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment