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
86531ae8
Commit
86531ae8
authored
Jun 06, 2009
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mozilla: use [] array initialisation in javascript
parent
8a7520b3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
100 deletions
+11
-100
projects/activex/test.html
projects/activex/test.html
+6
-97
projects/mozilla/test.html
projects/mozilla/test.html
+5
-3
No files found.
projects/activex/test.html
View file @
86531ae8
...
...
@@ -168,17 +168,6 @@ Insert Slider widget
<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>
...
...
@@ -253,16 +242,6 @@ function doReverse(rate)
vlc.input.rate = -1.0 * vlc.input.rate;
}
function doVerbosity(value)
{
var vlc = getVLC("vlc");
if( vlc )
{
vlc.log.verbosity = vlc.log.verbosity + value;
document.getElementById("verbosity").value = vlc.log.verbosity;
}
}
function doAudioChannel(value)
{
var vlc = getVLC("vlc");
...
...
@@ -355,30 +334,6 @@ function doPlaylistClearAll()
}
}
function doMessages()
{
var vlc = getVLC("vlc");
if( 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)
{
var vlc = getVLC("vlc");
...
...
@@ -467,23 +422,6 @@ function monitor()
if( vlc )
{
newState = vlc.input.state;
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 )
{
alert( msg.message );
}
document.getElementById("message").innerHTML = msg.message;
}
// clear the log once finished to avoid clogging
vlc.log.messages.clear();
}
}
if( prevState != newState )
...
...
@@ -555,13 +493,11 @@ function doGo(targetURL)
// clear() may return before the playlist has actually been cleared
// just wait for it to finish its job
}
var options =
new Array(":rtsp-tcp");
var options =
[":rtsp-tcp"];
var itemId = vlc.playlist.add(targetURL,"",options);
options = [];
if( itemId != -1 )
{
// clear the message log and enable error logging
vlc.log.verbosity = 1;
vlc.log.messages.clear();
// play MRL
vlc.playlist.playItem(itemId);
if( monitorTimerId == 0 )
...
...
@@ -571,8 +507,6 @@ function doGo(targetURL)
}
else
{
// disable log
vlc.log.verbosity = -1;
alert("cannot play at the moment !");
}
doItemCount();
...
...
@@ -582,10 +516,11 @@ function doGo(targetURL)
function doAdd(targetURL)
{
var vlc = getVLC("vlc");
var options =
new Array(":vout-filter=deinterlace", ":deinterlace-mode=linear");
var options =
[":vout-filter=deinterlace", ":deinterlace-mode=linear"];
if( vlc )
{
vlc.playlist.add(targetURL, "", options);
options = [];
doItemCount();
}
}
...
...
@@ -602,16 +537,11 @@ function doPlayOrPause()
}
else if( vlc.playlist.items.count > 0 )
{
// clear the message log and enable error logging
vlc.log.verbosity = 1;
vlc.log.messages.clear();
vlc.playlist.play();
monitor();
}
else
{
// disable log
vlc.log.verbosity = -1;
alert('nothing to play !');
}
}
...
...
@@ -670,9 +600,10 @@ function onPlay()
function onEnd()
{
document.getElementById("state").innerHTML = "End...";
doStop();
}
var liveFeedText =
new Array("Live", "((Live))", "(( Live ))", "(( Live ))");
var liveFeedText =
["Live", "((Live))", "(( Live ))", "(( Live ))"];
var liveFeedRoll = 0;
function onPlaying()
...
...
@@ -727,10 +658,7 @@ function onPause()
function onStop()
{
// disable logging
var vlc = getVLC("vlc");
if( vlc )
vlc.log.verbosity = -1;
if( inputTracker )
{
...
...
@@ -751,25 +679,6 @@ function onError()
var vlc = getVLC("vlc");
document.getElementById("state").innerHTML = "Error...";
if( 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 )
{
alert( msg.message );
}
document.getElementById("message").innerHTML = msg.message;
}
// clear the log once finished to avoid clogging
vlc.log.messages.clear();
}
}
}
function onInputTrackerScrollStart()
...
...
projects/mozilla/test.html
View file @
86531ae8
...
...
@@ -493,8 +493,9 @@ function doGo(targetURL)
// clear() may return before the playlist has actually been cleared
// just wait for it to finish its job
}
var options =
new Array(":rtsp-tcp");
var options =
[":rtsp-tcp"];
var itemId = vlc.playlist.add(targetURL,"",options);
options = [];
if( itemId != -1 )
{
// play MRL
...
...
@@ -515,10 +516,11 @@ function doGo(targetURL)
function doAdd(targetURL)
{
var vlc = getVLC("vlc");
var options =
new Array(":vout-filter=deinterlace", ":deinterlace-mode=linear");
var options =
[":vout-filter=deinterlace", ":deinterlace-mode=linear"];
if( vlc )
{
vlc.playlist.add(targetURL, "", options);
options = [];
doItemCount();
}
}
...
...
@@ -601,7 +603,7 @@ function onEnd()
doStop();
}
var liveFeedText =
new Array("Live", "((Live))", "(( Live ))", "(( Live ))");
var liveFeedText =
["Live", "((Live))", "(( Live ))", "(( Live ))"];
var liveFeedRoll = 0;
function onPlaying()
...
...
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