aboutsummaryrefslogtreecommitdiffstats
path: root/readme.md
diff options
context:
space:
mode:
Diffstat (limited to 'readme.md')
-rw-r--r--readme.md8
1 files changed, 5 insertions, 3 deletions
diff --git a/readme.md b/readme.md
index 98fa1889..39d7d916 100644
--- a/readme.md
+++ b/readme.md
@@ -295,15 +295,15 @@ element.addEventListener('ready', event => {
### Methods
-An example method:
+Methods are not chainable. An example use of a method:
```javascript
-player.pause();
+player.play();
```
| Method | Parameters | Description |
| ------------------------- | ---------------- | ---------------------------------------------------------------------------------------------------------- |
-| `play()` | - | Start playback. |
+| `play()`¹ | - | Start playback. |
| `pause()` | - | Pause playback. |
| `togglePlay(toggle)` | Boolean | Toggle playback, if no parameters are passed, it will toggle based on current status. |
| `stop()` | - | Stop playback and reset to start. |
@@ -321,6 +321,8 @@ player.pause();
| `supports(type)` | String | Check support for a mime type. |
| `destroy()` | - | Destroy the instance and garbage collect any elements. |
+1. `play()` will return a [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) in _some_ browsers - WebKit and Mozilla [according to MDN](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/play) at time of writing.
+
### Getters and Setters
An example setter: