Proper readme docs

This commit is contained in:
Sam Potts
2015-02-17 14:54:39 +11:00
parent 61fe24e0bf
commit a39bbec1fd
8 changed files with 231 additions and 37 deletions

View File

@ -8,5 +8,8 @@
plyr.setup({
debug: true,
title: "Video demo",
html: templates.controls.render({})
html: templates.controls.render({}),
captions: {
defaultActive: true
}
});

View File

@ -6,10 +6,6 @@
// Credits: http://paypal.github.io/accessible-html5-video-player/
// ==========================================================================
// Replace browser sniff with feature detection
// http://diveintohtml5.info/everything.html
//
/*global ActiveXObject*/
(function (api) {
@ -20,11 +16,11 @@
// Default config
var defaults = {
enabled: true, // /Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent)
enabled: true,
debug: false,
seekInterval: 10,
volume: 5,
clickToPause: true,
click: true,
selectors: {
container: ".player",
controls: ".player-controls",
@ -58,7 +54,7 @@
}
},
captions: {
defaultActive: true
defaultActive: false
},
fullscreen: {
enabled: true
@ -756,7 +752,7 @@
_on(player.buttons.fullscreen, "click", _toggleFullscreen);
// Click video
if(player.type === "video" && config.clickToPause) {
if(player.type === "video" && config.click) {
_on(player.videoContainer, "click", function() {
if(player.media.paused) {
_play();

View File

@ -387,12 +387,6 @@
}
}
// Full browser view hides toggle
&-fullscreen [data-player='fullscreen'],
&-fullscreen [data-player='fullscreen'] + label {
display: none;
}
// Some options are hidden by default
[data-player='captions'],
[data-player='captions'] + label,
@ -406,6 +400,12 @@
&.fullscreen-enabled [data-player='fullscreen'] + label {
display: inline-block;
}
// Full browser view hides toggle
&-fullscreen [data-player='fullscreen'],
&-fullscreen [data-player='fullscreen'] + label {
display: none !important;
}
}
// Fixing display for IE10+