TogglePlay API method (Fixes #86), Volume border (Fixes #87), Chrome Subs (Fixes #90)

This commit is contained in:
Sam Potts
2015-06-07 23:00:26 +10:00
parent df84ce6e90
commit 4c17f98520
14 changed files with 255 additions and 42 deletions

View File

@ -37,7 +37,7 @@ If you have any cool ideas or features, please let me know by [creating an issue
Check `docs/index.html` and `docs/dist/docs.js` for an example setup.
**Heads up**, the example `index.html` file needs to be served from a webserver (such as Apache, Nginx, IIS or similar) unless you change the file sources to include http or https. e.g. change `//cdn.plyr.io/1.1.10/plyr.js` to `https://cdn.plyr.io/1.1.10/plyr.js`
**Heads up**, the example `index.html` file needs to be served from a webserver (such as Apache, Nginx, IIS or similar) unless you change the file sources to include http or https. e.g. change `//cdn.plyr.io/1.1.11/plyr.js` to `https://cdn.plyr.io/1.1.11/plyr.js`
### Bower
If bower is your thang, you can grab Plyr using:
@ -57,11 +57,11 @@ More info is on [npm](https://www.npmjs.com/package/ember-cli-plyr) and [GitHub]
If you want to use our CDN, you can use the following:
```html
<link rel="stylesheet" href="https://cdn.plyr.io/1.1.10/plyr.css">
<script src="https://cdn.plyr.io/1.1.10/plyr.js"></script>
<link rel="stylesheet" href="https://cdn.plyr.io/1.1.11/plyr.css">
<script src="https://cdn.plyr.io/1.1.11/plyr.js"></script>
```
You can also access the `sprite.svg` file at `https://cdn.plyr.io/1.1.10/sprite.svg`.
You can also access the `sprite.svg` file at `https://cdn.plyr.io/1.1.11/sprite.svg`.
### CSS
If you want to use the default css, add the `plyr.css` file from /dist into your head, or even better use `plyr.less` or `plyr.sass` file included in `/src` in your build to save a request.
@ -301,6 +301,11 @@ Here's a list of the methods supported:
<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>
</tr>
<tr>
<td><code>togglePlay()</code></td>
<td>Boolean</td>
<td>Toggles playback for the player based on either the boolean argument or it's current state.</td>
</tr>
<tr>
<td><code>toggleMute()</code></td>
<td>&mdash;</td>