diff options
author | Sam Potts <sam@potts.es> | 2017-12-23 18:42:52 +0000 |
---|---|---|
committer | Sam Potts <sam@potts.es> | 2017-12-23 18:42:52 +0000 |
commit | 965fc0b2f5a377f16c8521b57e8667358b9ca38d (patch) | |
tree | 8d37c05fc00dc21b53c000a9fc5370880e0719c6 /readme.md | |
parent | 98ac98b4c2c1e1bf9e6b5352e042187a12e4e9d1 (diff) | |
download | plyr-965fc0b2f5a377f16c8521b57e8667358b9ca38d.tar.lz plyr-965fc0b2f5a377f16c8521b57e8667358b9ca38d.tar.xz plyr-965fc0b2f5a377f16c8521b57e8667358b9ca38d.zip |
Docs, restored loadSprite and supported static methods
Diffstat (limited to 'readme.md')
-rw-r--r-- | readme.md | 18 |
1 files changed, 17 insertions, 1 deletions
@@ -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 |