Commit d47e010e authored by brice's avatar brice

Update documentation

parent 359495e5
......@@ -3,12 +3,15 @@ Libcast HTML5 Player JavaScript Client
### Installation and use
The script `libcast_client-vx.y.z-min.js` must be included at the end of
the HTML page, just before the closing `</body>` tag.
The script `build/libcast_player_client.min.js` must be included either inside the `<head>` document part,
or at the end of the HTML page, just before the closing `</body>` tag.
The client must be instantiated just after the script inclusion.
Then you must instanciate one `LibcastPlayer` object per embed:
```javascript
var player = new LibcastPlayer('player_id');
```
See `example/index.html` for a complete example of how to use this client.
See `tests/single_embed.html` for a complete example of how to use this client.
After client instantiation, Libcast embeds should behave like the standard
HTML5 MediaElement API (see https://developer.mozilla.org/en/docs/Web/API/HTMLMediaElement).
......@@ -25,10 +28,12 @@ once the Libcast client has been instantiated.
- `seek(seconds)` [*] where `seconds` must be an integer or a float
- `chapter(number)` [*] where `number` must be an integer
- `mute()` [*]
- `volume(level)` where `level` must be a float between 0 and 1 (percentage)
- `setVolume(level)` [**] where `level` must be a float between 0 and 1 (percentage)
(* non HTML5 MediaElement API standard)
(** a bit different from the HTML5 MediaElement API standard because of JavaScript limitations)
### Available player attributes
The following list of attributes is available from embed `<iframe>` elements
......@@ -57,7 +62,7 @@ Libcast client has been instantiated.
### Compile source
1. Install npm
1. Install npm (Node) on your machine
2. Install grunt
```
......@@ -74,4 +79,4 @@ npm install
grunt
```
This should compile source under the root directory.
This should compile source under the `/build` directory.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment