Docs, restored loadSprite and supported static methods

This commit is contained in:
Sam Potts
2017-12-23 18:42:52 +00:00
parent 98ac98b4c2
commit 965fc0b2f5
10 changed files with 144 additions and 35 deletions

View File

@ -73,7 +73,7 @@ Plyr extends upon the standard HTML5 markup so that's all you need for those typ
#### HTML5 Video
```html
<video poster="/path/to/poster.jpg" id="player" controls>
<video poster="/path/to/poster.jpg" id="player" playsinline controls>
<source src="/path/to/video.mp4" type="video/mp4">
<source src="/path/to/video.webm" type="video/webm">
@ -586,6 +586,22 @@ Plyr supports the last 2 versions of most _modern_ browsers. IE11 is also suppor
2. Native player used (no support for `<progress>` or `<input type="range">`) but the API is supported (v1.0.28+)
3. IE10 has no native fullscreen support, fallback can be used (see [options](#options))
### Checking for support
You can use the static method to check for support. For example
```javascript
const supported = Plyr.supported('video', 'html5', true);
```
The arguments are:
* Media type (`audio` or `video`)
* Provider (`html5`, `youtube` or `vimeo`)
* Whether the player has the `playsinline` attribute (only applicable to iOS 10+)
### Disable support programatically
The `enabled` option can be used to disable certain User Agents. For example, if you don't want to use Plyr for smartphones, you could use:
```javascript