Merge branch 'master' into develop

This commit is contained in:
Sam Potts 2016-04-25 19:11:00 +10:00
commit fdaeecbb06

View File

@ -389,7 +389,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: 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 ```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: Or you can use the returned object from your call to the setup method:
@ -488,20 +488,8 @@ Here's a list of the methods supported:
<td> <td>
Get/Set the media source. Get/Set the media source.
<br><br> <br><br>
<strong>array</strong><br> <strong>Object</strong><br>
<pre><code>.source([ See <a href="#source-method">below</a>
{
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.
<br><br> <br><br>
<strong>YouTube</strong><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.) 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.)