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
ecfea08f
Commit
ecfea08f
authored
Feb 23, 2010
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
activex: test.html add mouse events.
parent
2ee5ceaa
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
78 additions
and
4 deletions
+78
-4
projects/activex/test.html
projects/activex/test.html
+78
-4
No files found.
projects/activex/test.html
View file @
ecfea08f
...
...
@@ -48,6 +48,42 @@ function onVLCPluginReady()
updateVolume(0);
}
function registerVLCEvent(event, handler)
{
var vlc = getVLC("vlc");
if (vlc) {
if (vlc.attachEvent) {
// Microsoft
vlc.attachEvent (event, handler);
} else if (vlc.addEventListener) {
// Mozilla: DOM level 2
vlc.addEventListener (event, handler, false);
} else {
// DOM level 0
eval("vlc.on" + event + " = handler");
}
}
}
function unregisterVLCEvent(event, handler)
{
var vlc = getVLC("vlc");
if (vlc) {
if (vlc.detachEvent) {
// Microsoft
vlc.detachEvent (event, handler);
} else if (vlc.removeEventListener) {
// Mozilla: DOM level 2
vlc.removeEventListener (event, handler, false);
} else {
// DOM level 0
eval("vlc.on" + event + " = null");
}
}
}
//-->
</SCRIPT>
<BODY
onLoad=
"init();"
>
...
...
@@ -88,6 +124,9 @@ Insert VideoLAN.VLCPlugin.2
<TR><TD
colspan=
"2"
>
<TABLE><TR>
<TD
valign=
"top"
width=
"550"
>
mouse position:
<SPAN
id=
"cursorTextField"
style=
"text-align:center"
></SPAN><br/>
mouse click:
<SPAN
id=
"clickTextField"
style=
"text-align:center"
></SPAN><br
/>
mouse object:
<SPAN
id=
"objectTextField"
style=
"text-align:center"
></SPAN>
<!--
Insert Slider widget
-->
...
...
@@ -223,6 +262,41 @@ var rate = 0;
var prevState = 0;
var telxState = false;
function handleMousePos(event,X,Y)
{
document.getElementById("cursorTextField").innerHTML = "(" + X + "," + Y + ")";
}
function handleMouseClick(event,click)
{
if (click) {
document.getElementById("clickTextField").innerHTML = "yes";
} else {
document.getElementById("clickTextField").innerHTML = "no";
}
}
function handleMouseObject(event,moved)
{
var vlc = getVLC("vlc");
if (vlc && vlc.video) {
var newpos = "";
if (vlc.video.logo) {
newpos = "("+ vlc.video.logo.x + "," + vlc.video.logo.y+ ")";
}
if (moved) {
document.getElementById("objectTextField").innerHTML = "yes: " + newpos;
} else {
document.getElementById("objectTextField").innerHTML = "no: " + newpos;
}
}
}
registerVLCEvent('MouseMoved', handleMousePos);
registerVLCEvent('MouseClicked', handleMouseClick);
registerVLCEvent('MouseObject', handleMouseObject);
function doSetSlider()
{
var vlc = getVLC("vlc");
...
...
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