From a95c75bda40312637460239f7fa7ea392b0269f3 Mon Sep 17 00:00:00 2001 From: Kevin Zhuang Date: Mon, 6 Aug 2012 11:53:13 +0800 Subject: [PATCH] Readme modify. --- README.md | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 876ba60..81d6279 100644 --- a/README.md +++ b/README.md @@ -14,13 +14,11 @@ How to use. <script type="text/javascript" src="vlc.js"><//script> 2. Use this vlc plugin by the following code. -

 YUI().use("vlc","node-event-delegate", function (Y) {});
 
3. Create variable and its config. -

          var    vlc, config;
          config       = {
@@ -31,16 +29,17 @@ YUI().use("vlc","node-event-delegate", function (Y) {});
 
4. Config has many setting attributes, and it still in developing. - +

     container : You can settup where your vlc plugin to show.
     url       : The streaming url you will play.
     autoPlay  : Will vlc player autoplay this streaming?
     size      : Array to control vlc player's width and height,
                 [0] is width, [1] is height.
+
5. You also can access some attributes by using YUI ATTRS access method. Just access like sample code: vlc.get("installed"); - +

     installed  : Is your browser install vlc web plugin?
     state      : The state of current vlc player state
                 ("idle", "opening", "buffering", "playing", "paused",
@@ -50,11 +49,11 @@ YUI().use("vlc","node-event-delegate", function (Y) {});
     volume     : The volume setting (0-200)
     size       : The player's width and height (using array).
     fullscrren : Set player fullscreen.
+
6. State detection - thank god the YUI ATTR has change enevt, so even origin vla web plugin state change event is not working. We can still detect its state. -

     vlc.on("buffering", function(e){ //when play is buffering
         Y.log("VLC buffering");
@@ -76,8 +75,6 @@ YUI().use("vlc","node-event-delegate", function (Y) {});
         Y.log("State change from "+e.prevVal +" to "+e.newVal );
     });
 
- - -7. Some issue: +7. Some issue The auto play attribute still has some problem, we are try to figure it out.