Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
6c59d976
Commit
6c59d976
authored
Oct 01, 2006
by
Damien Fouilleul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- test.html: use position rather than time to update slider
parent
a4119701
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
13 deletions
+22
-13
activex/test.html
activex/test.html
+22
-13
No files found.
activex/test.html
View file @
6c59d976
...
...
@@ -68,6 +68,7 @@ Insert MSComctlLib.Slider.2 activex control
var prevState = 0;
var monitorTimerId = 0;
var sliderScrolling = false;
var ignoreSliderChange = false;
function updateVolume(deltaVol)
{
...
...
@@ -139,7 +140,8 @@ function doGo(targetURL)
var vlc = document.getElementById("vlc");
var options = new Array(":vout-filter=deinterlace", ":deinterlace-mode=linear");
vlc.playlist.clear();
vlc.playlist.add(targetURL, null, options);
//vlc.playlist.add(targetURL, null, options);
vlc.playlist.add(targetURL);
vlc.playlist.play();
if( monitorTimerId == 0 )
{
...
...
@@ -211,9 +213,11 @@ function onPlaying()
{
// seekable media
slider.Enabled = true;
slider.Max = vlc.input.length/1000;
slider.Value = vlc.input.time/1000;
info.innerHTML = formatTime(vlc.input.time)+"/"+formatTime(vlc.input.length);
slider.Max = slider.width;
ignoreSliderChange = true;
slider.Value = vlc.input.position*slider.width;
ignoreSliderChange = false;
document.getElementById("info").innerHTML = formatTime(vlc.input.time)+"/"+formatTime(vlc.input.length);
}
else
{
...
...
@@ -224,7 +228,7 @@ function onPlaying()
slider.Enabled = false;
}
liveFeedRoll = liveFeedRoll & 3;
info
.innerHTML = liveFeedText[liveFeedRoll++];
document.getElementById("info")
.innerHTML = liveFeedText[liveFeedRoll++];
}
}
};
...
...
@@ -257,26 +261,31 @@ function onVLCStateChange()
};
function slider::Scroll()
{
var newPos = slider.Value * 1000;
var vlc = document.getElementById("vlc");
slider.Text = formatTime(newPos);
info.innerHTML = slider.Text+"/"+formatTime(vlc.input.length);
if( (vlc.input.state == 3) && (vlc.input.time != newPos) )
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.time = 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()
{
var newPos = slider.Value * 1000;
var vlc = document.getElementById("vlc");
var slider = document.getElementById("slider");
var oldPos = vlc.input.position;
var newPos = slider.Value/slider.width;
if( sliderScrolling )
{
sliderScrolling = false;
}
else if(
(vlc.input.state == 3) && (vlc.input.time
!= newPos) )
else if(
!ignoreSliderChange && (vlc.input.state == 3) && (oldPos
!= newPos) )
{
vlc.input.
time
= newPos;
vlc.input.
position
= newPos;
}
};
//-->
...
...
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