[vlc-devel] commit: activex: sync test.html page with mozilla test.html page ( Jean-Paul Saman )

git version control git at videolan.org
Tue May 5 11:48:47 CEST 2009


vlc | branch: master | Jean-Paul Saman <jpsaman at videolan.org> | Mon Apr 20 22:36:20 2009 +0200| [d42e4f90f7974b952dbcc0a20f0595fcbc8abf9f] | committer: Jean-Paul Saman 

activex: sync test.html page with mozilla test.html page

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d42e4f90f7974b952dbcc0a20f0595fcbc8abf9f
---

 projects/activex/test.html |   28 +++++++++++++++++++++-------
 1 files changed, 21 insertions(+), 7 deletions(-)

diff --git a/projects/activex/test.html b/projects/activex/test.html
index 702b3d1..c618e30 100644
--- a/projects/activex/test.html
+++ b/projects/activex/test.html
@@ -153,7 +153,7 @@ Insert Slider widget
 <TR><TD>Playlist:
 <INPUT type=button value="Prev" onClick='getVLC("vlc").playlist.prev();'>
 <INPUT type=button value="Next" onClick='getVLC("vlc").playlist.next();'>
-<INPUT type=button value="Clear All" onClick='getVLC("vlc").playlist.clear(); doItemCount();'>
+<INPUT type=button value="Clear All" onClick='doPlaylistClearAll();'>
     Aspect Ratio:
     <SELECT readonly onChange='doAspectRatio(this.value)'>
       <OPTION value="default">Default</OPTION>
@@ -329,7 +329,7 @@ function doItemCount()
     var vlc = getVLC("vlc");
     if( vlc )
     {
-        var count = vlc.playlist.itemCount;
+        var count = vlc.playlist.items.count;
         document.getElementById("itemCount").value = " Items " + count + " ";
     }
 }
@@ -338,7 +338,21 @@ function doRemoveItem(item)
 {
     var vlc = getVLC("vlc");
     if( vlc )
-        vlc.playlist.removeItem(item);
+        vlc.playlist.items.remove(item);
+}
+
+function doPlaylistClearAll()
+{
+    var vlc = getVLC("vlc");
+    if( vlc )
+    {
+        vlc.playlist.items.clear();
+        while( vlc.playlist.items.count > 0)
+        {
+            // wait till playlist empties.
+        }
+        doItemCount();
+    }
 }
 
 function doMessages()
@@ -532,8 +546,8 @@ function doGo(targetURL)
 
     if( vlc )
     {
-        vlc.playlist.clear();
-        while( vlc.playlist.itemCount > 0 )
+        vlc.playlist.items.clear();
+        while( vlc.playlist.items.count > 0 )
         {
             // clear() may return before the playlist has actually been cleared
             // just wait for it to finish its job
@@ -546,7 +560,7 @@ function doGo(targetURL)
             vlc.log.verbosity = 1;
             vlc.log.messages.clear();
             // play MRL
-            vlc.playlist.play();
+            vlc.playlist.playItem(itemId);
             if( monitorTimerId == 0 )
             {
                 monitor();
@@ -583,7 +597,7 @@ function doPlayOrPause()
             vlc.playlist.togglePause();
             monitor();
         }
-        else if( vlc.playlist.itemCount > 0 )
+        else if( vlc.playlist.items.count > 0 )
         {
             // clear the message log and enable error logging
             vlc.log.verbosity = 1;




More information about the vlc-devel mailing list