diff --git a/controls.md b/controls.md new file mode 100644 index 00000000..fa4c7c35 --- /dev/null +++ b/controls.md @@ -0,0 +1,80 @@ +# Controls HTML + +This is the markup that is rendered for controls. It is a seperate option to allow full customisation of markup based on your needs. The default Plyr setup uses a Hogan template, this is to allow for localisation at a later date. If you check `controls.html` in `/src/templates` to get an idea of how the default html works. + +## Requirements + +The classes and data attributes used in your template should match the `selectors` option. + +You need to add two placeholders to your html template: + +- {id} for the dynamically generated ID for the player (for form controls) +- {aria-label} for the dynamically generated play button label for screen readers +- {seek-time} for the seek time specified in options for fast forward and rewind + +Currently all buttons and inputs need to be present for Plyr to work but later we'll make it more dynamic so if you omit a button or input, it'll still work. + +## Vanilla HTML template + +You can of course, just specify vanilla HTML. Here's an example snippet: + +```javascript +var controls = [ +'
html |
String | — |
- This is **required**. It is the markup used for the controls. In the demo, we use Hogan templates as we are already using them. You can of course, just specify vanilla html. The only requirement is your selectors should match the `selectors` option below. If you check `controls.html` in `/assets/templates` to get an idea of how the default html works. - - You need to add two placeholders to your html template: - - {id} for the dynamically generated ID for the player (for form controls) - - {aria_label} for the dynamically generated play button label for screen readers | +This is **required**. See [controls.md](controls.md) for more info on how the html needs to be structured. | |||||
debug |
@@ -154,7 +153,7 @@ You can pass the following settings:
Display debugging information on what Plyr is doing. | ||||||||
seekInterval |
+ seekTime |
Number | 10 |
The time, in seconds, to seek when a user hits fast forward or rewind. | @@ -175,7 +174,7 @@ You can pass the following settings:selectors |
Object | — | -See `plyr.js` in `/assets` for more info. The only option you might want to change is `player` which is the hook used for Plyr, the default is `.player`. | +See `plyr.js` in `/src` for more info. The only option you might want to change is `player` which is the hook used for Plyr, the default is `.player`. |
classes |
@@ -283,12 +282,31 @@ A complete list of events can be found here:
## Fullscreen
Fullscreen in Plyr is supported for all browsers that [currently support it](http://caniuse.com/#feat=fullscreen). If you're using the default CSS, you can also use a "full browser" mode which will use the full browser window by adding the `player-fullscreen` class to your container.
-## Support
-- Chrome: full support
-- Safari: full support
-- Firefox: full support
-- Internet Explorer 10, 11: full support
-- Internet Explorer 9: native player used (no support for `