Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
c3537d93
Commit
c3537d93
authored
Dec 07, 2005
by
Antoine Cellerier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* misc fixes. Should now work in IE
parent
4bc7b47e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
24 deletions
+32
-24
share/http/functions.js
share/http/functions.js
+29
-21
share/http/index.html
share/http/index.html
+3
-3
No files found.
share/http/functions.js
View file @
c3537d93
...
...
@@ -58,19 +58,19 @@ function format_time( s )
function
in_play
()
{
input
=
value
(
'
input_mrl
'
);
input
_iesuxx
=
value
(
'
input_mrl
'
);
if
(
value
(
'
sout_mrl
'
)
!=
''
)
input
+=
'
'
+
value
(
'
sout_mrl
'
);
url
=
'
requests/status.xml?command=in_play&input=
'
+
escape
(
input
);
input
_iesuxx
+=
'
'
+
value
(
'
sout_mrl
'
);
url
=
'
requests/status.xml?command=in_play&input=
'
+
escape
(
input
_iesuxx
);
loadXMLDoc
(
url
,
parse_status
);
setTimeout
(
'
update_playlist()
'
,
1000
);
}
function
in_enqueue
()
{
input
=
value
(
'
input_mrl
'
);
input
_iesuxx
=
value
(
'
input_mrl
'
);
if
(
value
(
'
sout_mrl
'
)
!=
''
)
input
+=
'
'
+
value
(
'
sout_mrl
'
);
url
=
'
requests/status.xml?command=in_enqueue&input=
'
+
escape
(
input
);
input
_iesuxx
+=
'
'
+
value
(
'
sout_mrl
'
);
url
=
'
requests/status.xml?command=in_enqueue&input=
'
+
escape
(
input
_iesuxx
);
loadXMLDoc
(
url
,
parse_status
);
setTimeout
(
'
update_playlist()
'
,
1000
);
}
...
...
@@ -129,19 +129,27 @@ function update_playlist()
loadXMLDoc
(
'
requests/playlist.xml
'
,
parse_playlist
);
}
function
set_text
(
id
,
val
)
{
elt
=
document
.
getElementById
(
id
);
while
(
elt
.
hasChildNodes
()
)
elt
.
removeChild
(
elt
.
firstChild
);
elt
.
appendChild
(
document
.
createTextNode
(
val
)
);
}
function
parse_status
()
{
if
(
req
.
readyState
==
4
)
{
if
(
req
.
status
==
200
)
{
status
=
req
.
responseXML
.
documentElement
;
document
.
getElementById
(
'
time
'
).
textContent
=
format_time
(
status
.
getElementsByTagName
(
'
time
'
)[
0
].
firstChild
.
data
);
document
.
getElementById
(
'
length
'
).
textContent
=
format_time
(
status
.
getElementsByTagName
(
'
length
'
)[
0
].
firstChild
.
data
);
if
(
status
.
getElementsByTagName
(
'
volume
'
).
length
!=
0
)
document
.
getElementById
(
'
volume
'
).
textContent
=
Math
.
floor
(
status
.
getElementsByTagName
(
'
volume
'
)[
0
].
firstChild
.
data
/
5.12
)
+
"
%
"
;
document
.
getElementById
(
'
state
'
).
textContent
=
status
.
getElementsByTagName
(
'
state
'
)[
0
].
firstChild
.
data
;
if
(
status
.
getElementsByTagName
(
'
state
'
)[
0
].
firstChild
.
data
==
"
playing
"
)
status
_iesuxx
=
req
.
responseXML
.
documentElement
;
set_text
(
'
time
'
,
format_time
(
status_iesuxx
.
getElementsByTagName
(
'
time
'
)[
0
].
firstChild
.
data
)
);
set_text
(
'
length
'
,
format_time
(
status_iesuxx
.
getElementsByTagName
(
'
length
'
)[
0
].
firstChild
.
data
)
);
if
(
status
_iesuxx
.
getElementsByTagName
(
'
volume
'
).
length
!=
0
)
set_text
(
'
volume
'
,
Math
.
floor
(
status_iesuxx
.
getElementsByTagName
(
'
volume
'
)[
0
].
firstChild
.
data
/
512
)
+
'
%
'
)
;
set_text
(
'
state
'
,
status_iesuxx
.
getElementsByTagName
(
'
state
'
)[
0
].
firstChild
.
data
)
;
if
(
status
_iesuxx
.
getElementsByTagName
(
'
state
'
)[
0
].
firstChild
.
data
==
"
playing
"
)
{
document
.
getElementById
(
'
btn_pause_img
'
).
setAttribute
(
'
src
'
,
'
images/pause.png
'
);
}
...
...
@@ -164,7 +172,7 @@ function parse_playlist()
if
(
req
.
status
==
200
)
{
answer
=
req
.
responseXML
.
documentElement
;
playtree
=
document
.
getElementById
(
'
playtree
'
);
playtree
_iesuxx
=
document
.
getElementById
(
'
playtree
'
);
/* pos = playtree; */
pos
=
document
.
createElement
(
"
div
"
);
pos_top
=
pos
;
...
...
@@ -211,9 +219,9 @@ function parse_playlist()
pos
=
pos
.
parentNode
;
}
}
while
(
playtree
.
hasChildNodes
()
)
playtree
.
removeChild
(
playtree
.
firstChild
);
playtree
.
appendChild
(
pos_top
);
while
(
playtree
_iesuxx
.
hasChildNodes
()
)
playtree
_iesuxx
.
removeChild
(
playtree
.
firstChild
);
playtree
_iesuxx
.
appendChild
(
pos_top
);
}
else
{
...
...
@@ -681,7 +689,7 @@ function parse_browse_dir( )
if
(
req
.
status
==
200
)
{
answer
=
req
.
responseXML
.
documentElement
;
browser
=
document
.
getElementById
(
'
browser
'
);
browser
_iesuxx
=
document
.
getElementById
(
'
browser
'
);
pos
=
document
.
createElement
(
"
div
"
);
elt
=
answer
.
firstChild
;
while
(
elt
)
...
...
@@ -711,9 +719,9 @@ function parse_browse_dir( )
}
elt
=
elt
.
nextSibling
;
}
while
(
browser
.
hasChildNodes
()
)
browser
.
removeChild
(
browser
.
firstChild
);
browser
.
appendChild
(
pos
);
while
(
browser
_iesuxx
.
hasChildNodes
()
)
browser
_iesuxx
.
removeChild
(
browser
.
firstChild
);
browser
_iesuxx
.
appendChild
(
pos
);
}
else
{
...
...
share/http/index.html
View file @
c3537d93
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >
< index.html: VLC media player web interface
< - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >
...
...
@@ -21,8 +23,6 @@
< Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
< - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns=
"http://www.w3.org/1999/xhtml"
>
<head>
...
...
@@ -45,7 +45,7 @@
Browse
</div>
<div
id=
"browser"
>
<a
href=
"javascript:browse_dir(
'~'
);"
>
Lets browse !
</a>
<a
href=
"javascript:browse_dir(
document.getElementById( 'browse_lastdir' ).value
);"
>
Lets browse !
</a>
</div>
<div
class=
"controls"
>
<button
id=
"btn_browse_close"
onclick=
"hide('browse');"
>
...
...
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