aboutsummaryrefslogtreecommitdiffstats
path: root/controls.md
diff options
context:
space:
mode:
authorSam Potts <me@sampotts.me>2015-04-15 21:51:59 +1000
committerSam Potts <me@sampotts.me>2015-04-15 21:51:59 +1000
commitd04b278802f971ddd96fa8f67516265ae4d23546 (patch)
tree9691b7d0d8921296a5326deb2d9534565395b206 /controls.md
parent7345f656c1122195af0f354f8ecf8c3e350b1fab (diff)
parent530abac3a70285f3a00c99089b3faabee73eb8be (diff)
downloadplyr-d04b278802f971ddd96fa8f67516265ae4d23546.tar.lz
plyr-d04b278802f971ddd96fa8f67516265ae4d23546.tar.xz
plyr-d04b278802f971ddd96fa8f67516265ae4d23546.zip
Merge branch 'master' into develop
# Conflicts: # src/js/plyr.js
Diffstat (limited to 'controls.md')
-rw-r--r--controls.md18
1 files changed, 11 insertions, 7 deletions
diff --git a/controls.md b/controls.md
index c8f04f71..510da2de 100644
--- a/controls.md
+++ b/controls.md
@@ -2,7 +2,7 @@
This is the markup that is rendered for the Plyr controls. You can use the default controls or provide a customized version of markup based on your needs.
-The demo Plyr setup uses a Hogan template. This purely to allow for localization at a later date. Check out `controls.html` in `/src/templates` to get an idea of how the default html is structured. Alternatively check out the `plyr.js` source.
+The demo Plyr setup uses a Hogan template. This purely to allow for localization at a later date. Check out `controls.html` in `/src/templates` to get an idea of how the default html is structured.
## Requirements
@@ -13,11 +13,11 @@ You need to add several placeholders to your html template that are replaced whe
- `{id}` - the dynamically generated ID for the player (for form controls)
- `{seektime}` - 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.
+You can include only the controls you need when specifying custom html.
-## Default
+## Example
-This is the default `html` option from `plyr.js`.
+This is an example `html` option with all controls.
```javascript
["<div class='player-controls'>",
@@ -31,7 +31,7 @@ This is the default `html` option from `plyr.js`.
"<span>0</span>% buffered",
"</progress>",
"</div>",
- "<span class='player-controls-playback'>",
+ "<span class='player-controls-left'>",
"<button type='button' data-player='restart'>",
"<svg><use xlink:href='#icon-restart'></use></svg>",
"<span class='sr-only'>Restart</span>",
@@ -53,11 +53,15 @@ This is the default `html` option from `plyr.js`.
"<span class='sr-only'>Forward {seektime} secs</span>",
"</button>",
"<span class='player-time'>",
- "<span class='sr-only'>Time</span>",
+ "<span class='sr-only'>Current time</span>",
+ "<span class='player-current-time'>00:00</span>",
+ "</span>",
+ "<span class='player-time'>",
+ "<span class='sr-only'>Duration</span>",
"<span class='player-duration'>00:00</span>",
"</span>",
"</span>",
- "<span class='player-controls-sound'>",
+ "<span class='player-controls-right'>",
"<input class='inverted sr-only' id='mute{id}' type='checkbox' data-player='mute'>",
"<label id='mute{id}' for='mute{id}'>",
"<svg class='icon-muted'><use xlink:href='#icon-muted'></use></svg>",