aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorprince <mc.prince.0203@gmail.com>2016-03-12 14:07:37 +0900
committerprince <mc.prince.0203@gmail.com>2016-03-12 14:07:37 +0900
commit58342cfae8c1c8bd71aff5e507176ce42c80101f (patch)
tree27c65981f72f5513884b469fb22545a9aeebb85d
parent193103cb2d84a2c99f0d434ae0d7a103fc57161b (diff)
downloadplyr-58342cfae8c1c8bd71aff5e507176ce42c80101f.tar.lz
plyr-58342cfae8c1c8bd71aff5e507176ce42c80101f.tar.xz
plyr-58342cfae8c1c8bd71aff5e507176ce42c80101f.zip
Update outdated contents in readme.md
-rw-r--r--readme.md18
1 files changed, 3 insertions, 15 deletions
diff --git a/readme.md b/readme.md
index f984bf71..78576131 100644
--- a/readme.md
+++ b/readme.md
@@ -385,7 +385,7 @@ A `plyr` object is added to any element that Plyr is initialized on. You can the
There are two ways to access the instance, firstly you re-query the element container you used for setup (e.g. `.js-plyr`) like so:
```javascript
-var player = document.querySelector('.js-plyr');
+var player = document.querySelector('.js-plyr').plyr;
```
Or you can use the returned object from your call to the setup method:
@@ -484,20 +484,8 @@ Here's a list of the methods supported:
<td>
Get/Set the media source.
<br><br>
- <strong>array</strong><br>
- <pre><code>.source([
- {
- src: "/path/to/video.webm",
- type: "video/webm",
- ...more attributes...
- },
- {
- src: "/path/to/video.mp4",
- type: "video/mp4",
- ...more attributes...
- }
- ])`</code></pre><br>
- This will inject a child `source` element for every element in the array with the specified attributes. `src` is the only required attribute although adding `type` is recommended as it helps the browser decide which file to download and play.
+ <strong>Object</strong><br>
+ See <a href="#source-method">below</a>
<br><br>
<strong>YouTube</strong><br>
Currently this API method only accepts a YouTube ID when used with a YouTube player. I will add URL support soon, along with being able to swap between types (e.g. YouTube to Audio or Video and vice versa.)