X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=projects%2Fmozilla%2Ftest.html;h=ff9645aa591fb01d5647499786ba7d67fd72bba8;hb=69ec164abb756871a3b7421493d28da1288a6bad;hp=2f6086089134f97a81cde1cd358c279909349447;hpb=256c86bfd984cd72d1fcb0460e2ff2630acb26f5;p=vlc diff --git a/projects/mozilla/test.html b/projects/mozilla/test.html index 2f60860891..ff9645aa59 100644 --- a/projects/mozilla/test.html +++ b/projects/mozilla/test.html @@ -115,6 +115,7 @@ Insert VideoLAN.VLCPlugin.2 width="640" height="480" toolbar="true" + text="Waiting for video" name="vlc"> @@ -168,17 +169,6 @@ Insert Slider widget -Messages: - -Verbosity: - - - - - -
no message
- - Audio Channel: -- + + @@ -207,9 +199,52 @@ Verbosity: -- + + +Deinterlacing: + + + + + + +Marquee video filter: + + + + + + + +Logo video filter: + + + + + + + Teletext page: @@ -253,16 +288,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"); @@ -292,8 +317,8 @@ function doSubtitle(value) var vlc = getVLC("vlc"); if( vlc ) { - vlc.video.subtitle = vlc.video.subtitle + value; - document.getElementById("spuTextField").innerHTML = vlc.video.subtitle; + vlc.subtitle.track = vlc.subtitle.track + value; + document.getElementById("spuTextField").innerHTML = vlc.subtitle.track; } } @@ -355,30 +380,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 +468,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 +539,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 +553,6 @@ function doGo(targetURL) } else { - // disable log - vlc.log.verbosity = -1; alert("cannot play at the moment !"); } doItemCount(); @@ -582,10 +562,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 +583,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 +646,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 +704,7 @@ function onPause() function onStop() { - // disable logging var vlc = getVLC("vlc"); - if( vlc ) - vlc.log.verbosity = -1; if( inputTracker ) { @@ -751,25 +725,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() @@ -799,6 +754,56 @@ function onInputTrackerChange(inputTracker, value, pos) } } +function doMarqueeOption(option, value) +{ + var vlc = getVLC("vlc"); + val = parseInt(value); + if( vlc ) + { + if (option == 1) + vlc.video.marquee.color = val; + if (option == 2) + vlc.video.marquee.opacity = val; + if (option == 3) + vlc.video.marquee.position = value; + if (option == 4) + vlc.video.marquee.refresh = val; + if (option == 5) + vlc.video.marquee.size = val; + if (option == 6) + vlc.video.marquee.text = value; + if (option == 7) + vlc.video.marquee.timeout = val; + if (option == 8) + vlc.video.marquee.x = val; + if (option == 9) + vlc.video.marquee.y = val; + } +} + +function doLogoOption(option, value) +{ + var vlc = getVLC("vlc"); + if( vlc ) + { + if (option == 1) + vlc.video.logo.file(value); + if (option == 2) + vlc.video.logo.position = value; + val = parseInt(value); + if (option == 3) + vlc.video.logo.opacity = val; + if (option == 4) + vlc.video.logo.repeat = val; + if (option == 5) + vlc.video.logo.delay = val; + if (option == 6) + vlc.video.logo.x = val; + if (option == 7) + vlc.video.logo.y = val; + } +} + //-->