aboutsummaryrefslogtreecommitdiffstats
path: root/readme.md
diff options
context:
space:
mode:
authorSam <me@sampotts.me>2016-08-29 23:36:43 +1000
committerSam <me@sampotts.me>2016-08-29 23:36:43 +1000
commit435b5c74bf14b701e97a36a09ac99519135e724e (patch)
tree050a81bfe19bca554a11eb1621c7e96397bb1610 /readme.md
parent15fd7041ab8162439790d7331fa4ecbd63748d31 (diff)
downloadplyr-435b5c74bf14b701e97a36a09ac99519135e724e.tar.lz
plyr-435b5c74bf14b701e97a36a09ac99519135e724e.tar.xz
plyr-435b5c74bf14b701e97a36a09ac99519135e724e.zip
Fixed API method, added new methods (fixes #346, #351)
- Fixed `getCurrentTime()` method (fixes #351) - Added `getVolume()` , `isMuted()` and `getDuration()` API methods (fixes #346)
Diffstat (limited to 'readme.md')
-rw-r--r--readme.md31
1 files changed, 23 insertions, 8 deletions
diff --git a/readme.md b/readme.md
index 6f8ce734..bb2c0881 100644
--- a/readme.md
+++ b/readme.md
@@ -122,7 +122,7 @@ Include the `plyr.js` script before the closing `</body>` tag and then call `ply
If you want to use our CDN for the JavaScript, you can use the following:
```html
-<script src="https://cdn.plyr.io/2.0.6/plyr.js"></script>
+<script src="https://cdn.plyr.io/2.0.7/plyr.js"></script>
```
### CSS
@@ -135,11 +135,11 @@ Include the `plyr.css` stylsheet into your `<head>`
If you want to use our CDN for the default CSS, you can use the following:
```html
-<link rel="stylesheet" href="https://cdn.plyr.io/2.0.6/plyr.css">
+<link rel="stylesheet" href="https://cdn.plyr.io/2.0.7/plyr.css">
```
### SVG Sprite
-The SVG sprite is loaded automatically from our CDN. To change this, see the [options](#Options) below. For reference, the CDN hosted SVG sprite can be found at `https://cdn.plyr.io/2.0.6/plyr.svg`.
+The SVG sprite is loaded automatically from our CDN. To change this, see the [options](#Options) below. For reference, the CDN hosted SVG sprite can be found at `https://cdn.plyr.io/2.0.7/plyr.svg`.
## Advanced
@@ -530,6 +530,26 @@ Here's a list of the methods supported:
<td>Seeks the media to the provided parameter, time in seconds.</td>
</tr>
<tr>
+ <td><code>getCurrentTime()</code></td>
+ <td>&mdash;</td>
+ <td>Will return a float with the current time in seconds.</td>
+ </tr>
+ <tr>
+ <td><code>getDuration()</code></td>
+ <td>&mdash;</td>
+ <td>Will return a float with the duration in seconds.</td>
+ </tr>
+ <tr>
+ <td><code>getVolume()</code></td>
+ <td>&mdash;</td>
+ <td>Will return a float between 0 and 1 for the current volume level.</td>
+ </tr>
+ <tr>
+ <td><code>isMuted()</code></td>
+ <td>&mdash;</td>
+ <td>Will return a boolean for whether the media is currently muted.</td>
+ </tr>
+ <tr>
<td><code>setVolume(...)</code></td>
<td>Number</td>
<td>Sets the player volume to the provided parameter. The value should be between 0 (muted) and 10 (loudest). If no parameter is provided, the default volume is used (5). Values over 10 are ignored.</td>
@@ -590,11 +610,6 @@ Here's a list of the methods supported:
<td>&mdash;</td>
<td>Restores the original element, reversing the effects of <code>setup()</code>.</td>
</tr>
- <tr>
- <td><code>getCurrentTime()</code></td>
- <td>&mdash;</td>
- <td>Will return a float with the current time in seconds.</td>
- </tr>
</tbody>
</table>