Skip to content

Commit

Permalink
Readme modify.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Zhuang committed Aug 6, 2012
1 parent f1489ff commit a95c75b
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions README.md
Expand Up @@ -14,13 +14,11 @@ How to use.
<script type="text/javascript" src="vlc.js"><//script>
</code></pre>
2. Use this vlc plugin by the following code.

<pre><code>
YUI().use("vlc","node-event-delegate", function (Y) {});
</code></pre>

3. Create variable and its config.

<pre><code>
var vlc, config;
config = {
Expand All @@ -31,16 +29,17 @@ YUI().use("vlc","node-event-delegate", function (Y) {});
</code></pre>

4. Config has many setting attributes, and it still in developing.

<pre><code>
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.
</pre></code>

5. You also can access some attributes by using YUI ATTRS access method.
Just access like sample code: vlc.get("installed");

<pre><code>
installed : Is your browser install vlc web plugin?
state : The state of current vlc player state
("idle", "opening", "buffering", "playing", "paused",
Expand All @@ -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.
</pre></code>

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.

<pre><code>
vlc.on("buffering", function(e){ //when play is buffering
Y.log("VLC buffering");
Expand All @@ -76,8 +75,6 @@ YUI().use("vlc","node-event-delegate", function (Y) {});
Y.log("State change from "+e.prevVal +" to "+e.newVal );
});
</code></pre>


7. Some issue:
7. Some issue
The auto play attribute still has some problem, we are try to figure it out.

0 comments on commit a95c75b

Please sign in to comment.