Merge pull request #743 from jwpage/patch-1

Fix `enabled` smartphone example in README
This commit is contained in:
Sam Potts 2018-01-03 11:45:33 +11:00 committed by GitHub
commit 888c6773d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1024,7 +1024,7 @@ Fullscreen in Plyr is supported by all browsers that [currently support it](http
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: 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 ```javascript
enabled: /Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent) enabled: !/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent)
``` ```
If a User Agent is disabled but supports `<video>` and `<audio>` natively, it will use the native player. If a User Agent is disabled but supports `<video>` and `<audio>` natively, it will use the native player.