Compare commits
14 Commits
Author | SHA1 | Date | |
---|---|---|---|
c7c48bbe3c | |||
484617e2d7 | |||
841cc957c9 | |||
e89e87de62 | |||
b7ea8c3875 | |||
a67e495910 | |||
97d6216409 | |||
c55faa3505 | |||
f8d71829e0 | |||
bde1df7a98 | |||
9827e6a0bc | |||
fc2bb9fcb4 | |||
c0254d76e3 | |||
d00b9dc44b |
@ -6,8 +6,6 @@
|
|||||||
// Credits: http://paypal.github.io/accessible-html5-video-player/
|
// Credits: http://paypal.github.io/accessible-html5-video-player/
|
||||||
// ==========================================================================
|
// ==========================================================================
|
||||||
|
|
||||||
/*global ActiveXObject*/
|
|
||||||
|
|
||||||
(function (api) {
|
(function (api) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
@ -41,7 +39,9 @@
|
|||||||
seekTime: ".player-seek-time"
|
seekTime: ".player-seek-time"
|
||||||
},
|
},
|
||||||
classes: {
|
classes: {
|
||||||
videoContainer: "player-video",
|
video: "player-video",
|
||||||
|
videoWrapper: "player-video-wrapper",
|
||||||
|
audio: "player-audio",
|
||||||
stopped: "stopped",
|
stopped: "stopped",
|
||||||
playing: "playing",
|
playing: "playing",
|
||||||
muted: "muted",
|
muted: "muted",
|
||||||
@ -170,7 +170,7 @@
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
var className = (" " + element.className + " ").replace(/\s+/g, " ").replace(" " + name + " ", "");
|
var className = (" " + element.className + " ").replace(/\s+/g, " ").replace(" " + name + " ", "");
|
||||||
element.className = className + (state ? " " + name : "")
|
element.className = className + (state ? " " + name : "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -247,7 +247,12 @@
|
|||||||
|
|
||||||
if (typeof document[fullscreen.prefix + "CancelFullScreen"] != "undefined") {
|
if (typeof document[fullscreen.prefix + "CancelFullScreen"] != "undefined") {
|
||||||
fullscreen.supportsFullScreen = true;
|
fullscreen.supportsFullScreen = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
// Special case for MS (when isn't it?)
|
||||||
|
else if (typeof document.msExitFullscreen != "undefined" && document.msFullscreenEnabled) {
|
||||||
|
fullscreen.prefix = "ms";
|
||||||
|
fullscreen.supportsFullScreen = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -269,15 +274,20 @@
|
|||||||
return document.fullScreen;
|
return document.fullScreen;
|
||||||
case "webkit":
|
case "webkit":
|
||||||
return document.webkitIsFullScreen;
|
return document.webkitIsFullScreen;
|
||||||
|
case "ms":
|
||||||
|
// Docs say document.msFullScreenElement returns undefined
|
||||||
|
// if no element is full screem but it returns null, cheers
|
||||||
|
// https://msdn.microsoft.com/en-us/library/ie/dn265028%28v=vs.85%29.aspx
|
||||||
|
return (document.msFullscreenElement !== null);
|
||||||
default:
|
default:
|
||||||
return document[this.prefix + "FullScreen"];
|
return document[this.prefix + "FullScreen"];
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
fullscreen.requestFullScreen = function(element) {
|
fullscreen.requestFullScreen = function(element) {
|
||||||
return (this.prefix === "") ? element.requestFullScreen() : element[this.prefix + "RequestFullScreen"](this.prefix === "webkit" ? element.ALLOW_KEYBOARD_INPUT : null);
|
return (this.prefix === "") ? element.requestFullScreen() : element[this.prefix + (this.prefix == "ms" ? "RequestFullscreen" : "RequestFullScreen")](this.prefix === "webkit" ? element.ALLOW_KEYBOARD_INPUT : null);
|
||||||
};
|
};
|
||||||
fullscreen.cancelFullScreen = function() {
|
fullscreen.cancelFullScreen = function() {
|
||||||
return (this.prefix === "") ? document.cancelFullScreen() : document[this.prefix + "CancelFullScreen"]();
|
return (this.prefix === "") ? document.cancelFullScreen() : document[this.prefix + (this.prefix == "ms" ? "ExitFullscreen" : "CancelFullScreen")]();
|
||||||
};
|
};
|
||||||
fullscreen.element = function() {
|
fullscreen.element = function() {
|
||||||
return (this.prefix === "") ? document.fullscreenElement : document[this.prefix + "FullscreenElement"];
|
return (this.prefix === "") ? document.fullscreenElement : document[this.prefix + "FullscreenElement"];
|
||||||
@ -410,20 +420,23 @@
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If there's no autoplay attribute, assume the video is stopped
|
|
||||||
_toggleClass(player.container, config.classes.stopped, (player.media.getAttribute("autoplay") === null));
|
|
||||||
|
|
||||||
// Remove native video controls
|
// Remove native video controls
|
||||||
player.media.removeAttribute("controls");
|
player.media.removeAttribute("controls");
|
||||||
|
|
||||||
// Set type
|
// Set media type
|
||||||
player.type = (player.media.tagName.toLowerCase() == "video" ? "video" : "audio");
|
player.type = (player.media.tagName.toLowerCase() == "video" ? "video" : "audio");
|
||||||
|
|
||||||
|
// Add type class
|
||||||
|
_toggleClass(player.container, config.classes[player.type], true);
|
||||||
|
|
||||||
|
// If there's no autoplay attribute, assume the video is stopped and add state class
|
||||||
|
_toggleClass(player.container, config.classes.stopped, (player.media.getAttribute("autoplay") === null));
|
||||||
|
|
||||||
// Inject the player wrapper
|
// Inject the player wrapper
|
||||||
if(player.type === "video") {
|
if(player.type === "video") {
|
||||||
// Create the wrapper div
|
// Create the wrapper div
|
||||||
var wrapper = document.createElement("div");
|
var wrapper = document.createElement("div");
|
||||||
wrapper.setAttribute("class", config.classes.videoContainer);
|
wrapper.setAttribute("class", config.classes.videoWrapper);
|
||||||
|
|
||||||
// Wrap the video in a container
|
// Wrap the video in a container
|
||||||
_wrap(player.media, wrapper);
|
_wrap(player.media, wrapper);
|
||||||
@ -556,30 +569,23 @@
|
|||||||
|
|
||||||
if (captionSrc !== "") {
|
if (captionSrc !== "") {
|
||||||
// Create XMLHttpRequest Object
|
// Create XMLHttpRequest Object
|
||||||
var xhr;
|
var xhr = new XMLHttpRequest();
|
||||||
if (window.XMLHttpRequest) {
|
|
||||||
xhr = new XMLHttpRequest();
|
|
||||||
}
|
|
||||||
else if (window.ActiveXObject) { // IE8
|
|
||||||
xhr = new ActiveXObject("Microsoft.XMLHTTP");
|
|
||||||
}
|
|
||||||
xhr.onreadystatechange = function() {
|
xhr.onreadystatechange = function() {
|
||||||
if (xhr.readyState === 4) {
|
if (xhr.readyState === 4) {
|
||||||
if (xhr.status === 200) {
|
if (xhr.status === 200) {
|
||||||
if (config.debug) {
|
|
||||||
console.log("xhr = 200");
|
|
||||||
}
|
|
||||||
|
|
||||||
player.captions = [];
|
player.captions = [];
|
||||||
var records = [],
|
var records = [],
|
||||||
record,
|
record,
|
||||||
req = xhr.responseText;
|
req = xhr.responseText;
|
||||||
|
|
||||||
records = req.split("\n\n");
|
records = req.split("\n\n");
|
||||||
for (var r=0; r < records.length; r++) {
|
for (var r=0; r < records.length; r++) {
|
||||||
record = records[r];
|
record = records[r];
|
||||||
player.captions[r] = [];
|
player.captions[r] = [];
|
||||||
player.captions[r] = record.split("\n");
|
player.captions[r] = record.split("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove first element ("VTT")
|
// Remove first element ("VTT")
|
||||||
player.captions.shift();
|
player.captions.shift();
|
||||||
|
|
||||||
@ -587,14 +593,14 @@
|
|||||||
console.log("Successfully loaded the caption file via ajax.");
|
console.log("Successfully loaded the caption file via ajax.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else if (config.debug) {
|
||||||
if (config.debug) {
|
console.error("There was a problem loading the caption file via ajax.");
|
||||||
console.log("There was a problem loading the caption file via ajax.");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
xhr.open("get", captionSrc, true);
|
xhr.open("get", captionSrc, true);
|
||||||
|
|
||||||
xhr.send();
|
xhr.send();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -955,7 +961,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Get the players
|
// Get the players
|
||||||
var elements = document.querySelectorAll(config.selectors.container);
|
var elements = document.querySelectorAll(config.selectors.container), players = [];
|
||||||
|
|
||||||
// Create a player instance for each element
|
// Create a player instance for each element
|
||||||
for (var i = elements.length - 1; i >= 0; i--) {
|
for (var i = elements.length - 1; i >= 0; i--) {
|
||||||
@ -964,6 +970,11 @@
|
|||||||
|
|
||||||
// Setup a player instance and add to the element
|
// Setup a player instance and add to the element
|
||||||
element.plyr = new Plyr(element);
|
element.plyr = new Plyr(element);
|
||||||
|
|
||||||
|
// Add to return array
|
||||||
|
players.push(element.plyr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return players;
|
||||||
}
|
}
|
||||||
}(this.plyr = this.plyr || {}));
|
}(this.plyr = this.plyr || {}));
|
@ -3,33 +3,32 @@
|
|||||||
// ==========================================================================
|
// ==========================================================================
|
||||||
|
|
||||||
// Reset
|
// Reset
|
||||||
@import "lib/normalize.less";
|
@import "docs/normalize.less";
|
||||||
// Mixins
|
// Mixins
|
||||||
@import "lib/mixins.less";
|
@import "docs/mixins.less";
|
||||||
|
|
||||||
@font-face {
|
// Variables
|
||||||
font-family: "Avenir";
|
// ---------------------------------------
|
||||||
src: url("../../assets/fonts/AvenirLTStd-Medium.woff2") format("woff2"),
|
// Colors
|
||||||
url("../../assets/fonts/AvenirLTStd-Medium.woff") format("woff"),
|
@blue: #3498DB;
|
||||||
url("../../assets/fonts/AvenirLTStd-Medium.ttf") format("truetype");
|
@gray-dark: #343f4a;
|
||||||
font-style: normal;
|
@gray: #565d64;
|
||||||
font-weight: 400;
|
@gray-light: #cbd0d3;
|
||||||
}
|
|
||||||
|
|
||||||
@font-face {
|
// Elements
|
||||||
font-family: "Avenir";
|
@link-color: @blue;
|
||||||
src: url("../../assets/fonts/AvenirLTStd-Heavy.woff2") format("woff2"),
|
@padding-base: 20px;
|
||||||
url("../../assets/fonts/AvenirLTStd-Heavy.woff") format("woff"),
|
|
||||||
url("../../assets/fonts/AvenirLTStd-Heavy.ttf") format("truetype");
|
// Breakpoints
|
||||||
font-style: normal;
|
@screen-md: 768px;
|
||||||
font-weight: 600;
|
|
||||||
}
|
|
||||||
|
|
||||||
// BORDER-BOX ALL THE THINGS!
|
// BORDER-BOX ALL THE THINGS!
|
||||||
// http://paulirish.com/2012/box-sizing-border-box-ftw/
|
// http://paulirish.com/2012/box-sizing-border-box-ftw/
|
||||||
*, *::after, *::before {
|
*, *::after, *::before {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Base
|
||||||
html {
|
html {
|
||||||
font-size: 62.5%;
|
font-size: 62.5%;
|
||||||
}
|
}
|
||||||
@ -41,14 +40,15 @@ body {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
color: #6D797F;
|
color: #6D797F;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Type
|
||||||
h1,
|
h1,
|
||||||
h2 {
|
h2 {
|
||||||
letter-spacing: -.025em;
|
letter-spacing: -.025em;
|
||||||
color: #2E3C44;
|
color: #2E3C44;
|
||||||
margin: 0 0 10px;
|
margin: 0 0 (@padding-base / 2);
|
||||||
line-height: 1.2;
|
line-height: 1.2;
|
||||||
-webkit-font-smoothing: antialiased;
|
.font-smoothing();
|
||||||
-moz-osx-font-smoothing: grayscale;
|
|
||||||
}
|
}
|
||||||
h1 {
|
h1 {
|
||||||
.font-size(64);
|
.font-size(64);
|
||||||
@ -56,34 +56,67 @@ h1 {
|
|||||||
}
|
}
|
||||||
p,
|
p,
|
||||||
small {
|
small {
|
||||||
margin: 0 0 20px;
|
margin: 0 0 @padding-base;
|
||||||
}
|
}
|
||||||
small {
|
small {
|
||||||
display: block;
|
display: block;
|
||||||
|
padding: 0 (@padding-base / 2);
|
||||||
.font-size(14);
|
.font-size(14);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Header
|
||||||
header {
|
header {
|
||||||
padding: 60px 0;
|
padding: @padding-base;
|
||||||
margin-bottom: 20px;
|
margin-bottom: @padding-base;
|
||||||
|
|
||||||
p {
|
p {
|
||||||
.font-size(18);
|
.font-size(18);
|
||||||
}
|
}
|
||||||
|
@media (min-width: 560px) {
|
||||||
|
padding-top: (@padding-base * 3);
|
||||||
|
padding-bottom: (@padding-base * 3);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Sections
|
||||||
|
section {
|
||||||
|
padding-bottom: @padding-base;
|
||||||
|
|
||||||
|
@media (min-width: 560px) {
|
||||||
|
padding-bottom: (@padding-base * 2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Links & Buttons
|
||||||
a {
|
a {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: #3498DB;
|
color: @link-color;
|
||||||
border-bottom: 1px solid currentColor;
|
border-bottom: 1px solid currentColor;
|
||||||
transition: color .3s ease, border .3s ease;
|
transition: all .3s ease;
|
||||||
|
|
||||||
&:hover,
|
&:hover,
|
||||||
&:focus {
|
&:focus {
|
||||||
color: #000;
|
color: #000;
|
||||||
}
|
}
|
||||||
|
&:focus {
|
||||||
|
.tab-focus();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
.btn {
|
||||||
|
display: inline-block;
|
||||||
|
padding: (@padding-base / 2) (@padding-base * 1.5);
|
||||||
|
background: @link-color;
|
||||||
|
border: 0;
|
||||||
|
color: #fff;
|
||||||
|
.font-smoothing(on);
|
||||||
|
font-weight: 600;
|
||||||
|
border-radius: 3px;
|
||||||
|
|
||||||
section {
|
&:hover,
|
||||||
padding-bottom: 80px;
|
&:focus {
|
||||||
|
color: #fff;
|
||||||
|
background: darken(@link-color, 5%);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Players
|
// Players
|
||||||
@ -95,10 +128,14 @@ section {
|
|||||||
}
|
}
|
||||||
.example-audio .player,
|
.example-audio .player,
|
||||||
.example-video .player {
|
.example-video .player {
|
||||||
margin: 0 auto 20px;
|
margin: 0 auto @padding-base;
|
||||||
|
|
||||||
&:fullscreen,
|
&:fullscreen,
|
||||||
&-fullscreen {
|
&-fullscreen {
|
||||||
max-width: none;
|
max-width: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Fonts
|
||||||
|
// Last to not block rendering
|
||||||
|
@import "docs/fontface.less";
|
16
assets/less/docs/fontface.less
Normal file
16
assets/less/docs/fontface.less
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
@font-face {
|
||||||
|
font-family: "Avenir";
|
||||||
|
src: url("../../assets/fonts/AvenirLTStd-Medium.woff2") format("woff2"),
|
||||||
|
url("../../assets/fonts/AvenirLTStd-Medium.woff") format("woff"),
|
||||||
|
url("../../assets/fonts/AvenirLTStd-Medium.ttf") format("truetype");
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 400;
|
||||||
|
}
|
||||||
|
@font-face {
|
||||||
|
font-family: "Avenir";
|
||||||
|
src: url("../../assets/fonts/AvenirLTStd-Heavy.woff2") format("woff2"),
|
||||||
|
url("../../assets/fonts/AvenirLTStd-Heavy.woff") format("woff"),
|
||||||
|
url("../../assets/fonts/AvenirLTStd-Heavy.ttf") format("truetype");
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
@ -3,6 +3,7 @@
|
|||||||
// ==========================================================================
|
// ==========================================================================
|
||||||
|
|
||||||
// Contain floats: nicolasgallagher.com/micro-clearfix-hack/
|
// Contain floats: nicolasgallagher.com/micro-clearfix-hack/
|
||||||
|
// ---------------------------------------
|
||||||
.clearfix() {
|
.clearfix() {
|
||||||
zoom: 1;
|
zoom: 1;
|
||||||
&:before,
|
&:before,
|
||||||
@ -11,6 +12,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Webkit-style focus
|
// Webkit-style focus
|
||||||
|
// ---------------------------------------
|
||||||
.tab-focus() {
|
.tab-focus() {
|
||||||
// Default
|
// Default
|
||||||
outline: thin dotted @gray-dark;
|
outline: thin dotted @gray-dark;
|
||||||
@ -20,8 +22,20 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Use rems for font sizing
|
// Use rems for font sizing
|
||||||
|
// ---------------------------------------
|
||||||
.font-size(@font-size: 16){
|
.font-size(@font-size: 16){
|
||||||
@rem: (@font-size / 10);
|
@rem: (@font-size / 10);
|
||||||
font-size: @font-size * 1px;
|
font-size: @font-size * 1px;
|
||||||
font-size: ~"@{rem}rem";
|
font-size: ~"@{rem}rem";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Font smoothing
|
||||||
|
// ---------------------------------------
|
||||||
|
.font-smoothing(@mode: on) when (@mode = on) {
|
||||||
|
-moz-osx-font-smoothing: grayscale;
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
|
}
|
||||||
|
.font-smoothing(@mode: on) when (@mode = off) {
|
||||||
|
-moz-osx-font-smoothing: auto;
|
||||||
|
-webkit-font-smoothing: subpixel-antialiased;
|
||||||
|
}
|
@ -54,7 +54,6 @@
|
|||||||
outline-offset: 1px;
|
outline-offset: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Range styling
|
// Range styling
|
||||||
// ---------------------------------------
|
// ---------------------------------------
|
||||||
.range-thumb() {
|
.range-thumb() {
|
||||||
@ -104,10 +103,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// For video
|
// For video
|
||||||
&-video {
|
&-video-wrapper {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
video {
|
video {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: auto;
|
height: auto;
|
||||||
@ -125,7 +123,12 @@
|
|||||||
min-height: 2.5em;
|
min-height: 2.5em;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
text-shadow: 0 1px 1px rgba(0,0,0, .75);
|
font-weight: 600;
|
||||||
|
text-shadow:
|
||||||
|
-1px -1px 0 rgba(red(@gray-dark), green(@gray-dark), blue(@gray-dark), .5),
|
||||||
|
1px -1px 0 rgba(red(@gray-dark), green(@gray-dark), blue(@gray-dark), .5),
|
||||||
|
-1px 1px 0 rgba(red(@gray-dark), green(@gray-dark), blue(@gray-dark), .5),
|
||||||
|
1px 1px 0 rgba(red(@gray-dark), green(@gray-dark), blue(@gray-dark), .5);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
.font-smoothing();
|
.font-smoothing();
|
||||||
|
|
||||||
@ -148,8 +151,8 @@
|
|||||||
|
|
||||||
// Layout
|
// Layout
|
||||||
&-sound {
|
&-sound {
|
||||||
display: inline-block;
|
display: block;
|
||||||
margin-top: @control-spacing;
|
margin: @control-spacing auto 0;
|
||||||
}
|
}
|
||||||
@media (min-width: 560px) {
|
@media (min-width: 560px) {
|
||||||
&-playback {
|
&-playback {
|
||||||
@ -350,7 +353,7 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
z-index: 999999;
|
z-index: 999999;
|
||||||
|
|
||||||
.player-video {
|
.player-video-wrapper {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
@ -407,18 +410,3 @@
|
|||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fixing display for IE10+
|
|
||||||
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
|
|
||||||
.video-controls .player-volume {
|
|
||||||
position: relative;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
.player-time {
|
|
||||||
margin-top: 4px;
|
|
||||||
}
|
|
||||||
.player-captions {
|
|
||||||
padding: 8px;
|
|
||||||
min-height: 36px;
|
|
||||||
}
|
|
||||||
}
|
|
@ -3,23 +3,23 @@
|
|||||||
<span>0</span>% played
|
<span>0</span>% played
|
||||||
</progress>
|
</progress>
|
||||||
<span class="player-controls-playback">
|
<span class="player-controls-playback">
|
||||||
<button data-player="restart">
|
<button type="button" data-player="restart">
|
||||||
<svg><use xlink:href="#icon-refresh"></use></svg>
|
<svg><use xlink:href="#icon-refresh"></use></svg>
|
||||||
<span class="sr-only">Restart</span>
|
<span class="sr-only">Restart</span>
|
||||||
</button>
|
</button>
|
||||||
<button data-player="rewind">
|
<button type="button" data-player="rewind">
|
||||||
<svg><use xlink:href="#icon-rewind"></use></svg>
|
<svg><use xlink:href="#icon-rewind"></use></svg>
|
||||||
<span class="sr-only">Rewind <span class="player-seek-time">10</span> seconds</span>
|
<span class="sr-only">Rewind <span class="player-seek-time">10</span> seconds</span>
|
||||||
</button>
|
</button>
|
||||||
<button aria-label="{aria-label}" data-player="play">
|
<button type="button" aria-label="{aria-label}" data-player="play">
|
||||||
<svg><use xlink:href="#icon-play"></use></svg>
|
<svg><use xlink:href="#icon-play"></use></svg>
|
||||||
<span class="sr-only">Play</span>
|
<span class="sr-only">Play</span>
|
||||||
</button>
|
</button>
|
||||||
<button data-player="pause">
|
<button type="button" data-player="pause">
|
||||||
<svg><use xlink:href="#icon-pause"></use></svg>
|
<svg><use xlink:href="#icon-pause"></use></svg>
|
||||||
<span class="sr-only">Pause</span>
|
<span class="sr-only">Pause</span>
|
||||||
</button>
|
</button>
|
||||||
<button data-player="fast-forward">
|
<button type="button" data-player="fast-forward">
|
||||||
<svg><use xlink:href="#icon-fast-forward"></use></svg>
|
<svg><use xlink:href="#icon-fast-forward"></use></svg>
|
||||||
<span class="sr-only">Fast forward <span class="player-seek-time">10</span> seconds</span>
|
<span class="sr-only">Fast forward <span class="player-seek-time">10</span> seconds</span>
|
||||||
</button>
|
</button>
|
||||||
@ -45,7 +45,7 @@
|
|||||||
<span class="sr-only">Captions</span>
|
<span class="sr-only">Captions</span>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<button data-player="fullscreen">
|
<button type="button" data-player="fullscreen">
|
||||||
<svg class="icon-exit-fullscreen"><use xlink:href="#icon-collapse"></use></svg>
|
<svg class="icon-exit-fullscreen"><use xlink:href="#icon-collapse"></use></svg>
|
||||||
<svg><use xlink:href="#icon-expand"></use></svg>
|
<svg><use xlink:href="#icon-expand"></use></svg>
|
||||||
<span class="sr-only">Toggle fullscreen</span>
|
<span class="sr-only">Toggle fullscreen</span>
|
||||||
|
@ -25,5 +25,5 @@
|
|||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git://github.com/selz/plyr.git"
|
"url": "git://github.com/selz/plyr.git"
|
||||||
},
|
},
|
||||||
"license": "MIT"
|
"license": "BSD"
|
||||||
}
|
}
|
2
dist/css/docs.css
vendored
2
dist/css/docs.css
vendored
@ -1 +1 @@
|
|||||||
/*! normalize.css v2.1.3 | MIT License | git.io/normalize */article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,video{display:inline-block}audio:not([controls]){display:none;height:0}[hidden],template{display:none}html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}a{background:0 0}a:focus{outline:dotted thin}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}hr{box-sizing:content-box;height:0}mark{background:#ff0;color:#000}code,kbd,pre,samp{font-family:monospace,serif;font-size:1em}pre{white-space:pre-wrap}q{quotes:"\201C" "\201D" "\2018" "\2019"}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:0}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}button,input,select,textarea{font-family:inherit;font-size:100%;margin:0}button,input{line-height:normal}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=search]{-webkit-appearance:textfield;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top}table{border-collapse:collapse;border-spacing:0}@font-face{font-family:Avenir;src:url(../../assets/fonts/AvenirLTStd-Medium.woff2) format("woff2"),url(../../assets/fonts/AvenirLTStd-Medium.woff) format("woff"),url(../../assets/fonts/AvenirLTStd-Medium.ttf) format("truetype");font-style:normal;font-weight:400}@font-face{font-family:Avenir;src:url(../../assets/fonts/AvenirLTStd-Heavy.woff2) format("woff2"),url(../../assets/fonts/AvenirLTStd-Heavy.woff) format("woff"),url(../../assets/fonts/AvenirLTStd-Heavy.ttf) format("truetype");font-style:normal;font-weight:600}*,::after,::before{box-sizing:border-box}html{font-size:62.5%}body{font-family:Avenir,"Helvetica Neue",Helvetica,Arial,sans-serif;background:#fff;font-size:16px;font-size:1.6rem;line-height:1.5;text-align:center;color:#6D797F}h1,h2{letter-spacing:-.025em;color:#2E3C44;margin:0 0 10px;line-height:1.2;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}h1{font-size:64px;font-size:6.4rem;color:#3498DB}p,small{margin:0 0 20px}small{display:block;font-size:14px;font-size:1.4rem}header{padding:60px 0;margin-bottom:20px}header p{font-size:18px;font-size:1.8rem}a{text-decoration:none;color:#3498DB;border-bottom:1px solid currentColor;transition:color .3s ease,border .3s ease}a:focus,a:hover{color:#000}section{padding-bottom:80px}.example-audio .player{max-width:480px}.example-video .player{max-width:1200px}.example-audio .player,.example-video .player{margin:0 auto 20px}.example-audio .player-fullscreen,.example-audio .player:-webkit-full-screen,.example-video .player-fullscreen,.example-video .player:-webkit-full-screen{max-width:none}.example-audio .player-fullscreen,.example-audio .player:-moz-full-screen,.example-video .player-fullscreen,.example-video .player:-moz-full-screen{max-width:none}.example-audio .player-fullscreen,.example-audio .player:-ms-fullscreen,.example-video .player-fullscreen,.example-video .player:-ms-fullscreen{max-width:none}.example-audio .player-fullscreen,.example-audio .player:fullscreen,.example-video .player-fullscreen,.example-video .player:fullscreen{max-width:none}
|
/*! normalize.css v2.1.3 | MIT License | git.io/normalize */article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,video{display:inline-block}audio:not([controls]){display:none;height:0}[hidden],template{display:none}html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}a{background:0 0}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}hr{box-sizing:content-box;height:0}mark{background:#ff0;color:#000}code,kbd,pre,samp{font-family:monospace,serif;font-size:1em}pre{white-space:pre-wrap}q{quotes:"\201C" "\201D" "\2018" "\2019"}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:0}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}button,input,select,textarea{font-family:inherit;font-size:100%;margin:0}button,input{line-height:normal}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=search]{-webkit-appearance:textfield;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top}table{border-collapse:collapse;border-spacing:0}*,::after,::before{box-sizing:border-box}html{font-size:62.5%}body{font-family:Avenir,"Helvetica Neue",Helvetica,Arial,sans-serif;background:#fff;font-size:16px;font-size:1.6rem;line-height:1.5;text-align:center;color:#6D797F}h1,h2{letter-spacing:-.025em;color:#2E3C44;margin:0 0 10px;line-height:1.2;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}h1{font-size:64px;font-size:6.4rem;color:#3498DB}p,small{margin:0 0 20px}small{display:block;padding:0 10px;font-size:14px;font-size:1.4rem}header{padding:20px;margin-bottom:20px}header p{font-size:18px;font-size:1.8rem}@media (min-width:560px){header{padding-top:60px;padding-bottom:60px}}section{padding-bottom:20px}@media (min-width:560px){section{padding-bottom:40px}}a{text-decoration:none;color:#3498db;border-bottom:1px solid currentColor;transition:all .3s ease}a:focus,a:hover{color:#000}a:focus{outline:#343f4a dotted thin;outline-offset:1px}.btn{display:inline-block;padding:10px 30px;background:#3498db;border:0;color:#fff;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-weight:600;border-radius:3px}.btn:focus,.btn:hover{color:#fff;background:#258cd1}.example-audio .player{max-width:480px}.example-video .player{max-width:1200px}.example-audio .player,.example-video .player{margin:0 auto 20px}.example-audio .player-fullscreen,.example-audio .player:-webkit-full-screen,.example-video .player-fullscreen,.example-video .player:-webkit-full-screen{max-width:none}.example-audio .player-fullscreen,.example-audio .player:-moz-full-screen,.example-video .player-fullscreen,.example-video .player:-moz-full-screen{max-width:none}.example-audio .player-fullscreen,.example-audio .player:-ms-fullscreen,.example-video .player-fullscreen,.example-video .player:-ms-fullscreen{max-width:none}.example-audio .player-fullscreen,.example-audio .player:fullscreen,.example-video .player-fullscreen,.example-video .player:fullscreen{max-width:none}@font-face{font-family:Avenir;src:url(../../assets/fonts/AvenirLTStd-Medium.woff2) format("woff2"),url(../../assets/fonts/AvenirLTStd-Medium.woff) format("woff"),url(../../assets/fonts/AvenirLTStd-Medium.ttf) format("truetype");font-style:normal;font-weight:400}@font-face{font-family:Avenir;src:url(../../assets/fonts/AvenirLTStd-Heavy.woff2) format("woff2"),url(../../assets/fonts/AvenirLTStd-Heavy.woff) format("woff"),url(../../assets/fonts/AvenirLTStd-Heavy.ttf) format("truetype");font-style:normal;font-weight:600}
|
2
dist/css/plyr.css
vendored
2
dist/css/plyr.css
vendored
File diff suppressed because one or more lines are too long
2
dist/js/docs.js
vendored
2
dist/js/docs.js
vendored
File diff suppressed because one or more lines are too long
2
dist/js/plyr.js
vendored
2
dist/js/plyr.js
vendored
File diff suppressed because one or more lines are too long
2
dist/js/templates.js
vendored
2
dist/js/templates.js
vendored
@ -1,2 +1,2 @@
|
|||||||
var templates = {};
|
var templates = {};
|
||||||
templates['controls'] = new Hogan.Template({code: function (c,p,i) { var t=this;t.b(i=i||"");t.b("<div class=\"player-controls\">");t.b("\n" + i);t.b(" <progress class=\"player-progress\" max=\"100\" value=\"0\">");t.b("\n" + i);t.b(" <span>0</span>% played");t.b("\n" + i);t.b(" </progress>");t.b("\n" + i);t.b(" <span class=\"player-controls-playback\">");t.b("\n" + i);t.b(" <button data-player=\"restart\">");t.b("\n" + i);t.b(" <svg><use xlink:href=\"#icon-refresh\"></use></svg>");t.b("\n" + i);t.b(" <span class=\"sr-only\">Restart</span>");t.b("\n" + i);t.b(" </button>");t.b("\n" + i);t.b(" <button data-player=\"rewind\">");t.b("\n" + i);t.b(" <svg><use xlink:href=\"#icon-rewind\"></use></svg>");t.b("\n" + i);t.b(" <span class=\"sr-only\">Rewind <span class=\"player-seek-time\">10</span> seconds</span>");t.b("\n" + i);t.b(" </button>");t.b("\n" + i);t.b(" <button aria-label=\"{aria-label}\" data-player=\"play\">");t.b("\n" + i);t.b(" <svg><use xlink:href=\"#icon-play\"></use></svg>");t.b("\n" + i);t.b(" <span class=\"sr-only\">Play</span>");t.b("\n" + i);t.b(" </button>");t.b("\n" + i);t.b(" <button data-player=\"pause\">");t.b("\n" + i);t.b(" <svg><use xlink:href=\"#icon-pause\"></use></svg>");t.b("\n" + i);t.b(" <span class=\"sr-only\">Pause</span>");t.b("\n" + i);t.b(" </button>");t.b("\n" + i);t.b(" <button data-player=\"fast-forward\">");t.b("\n" + i);t.b(" <svg><use xlink:href=\"#icon-fast-forward\"></use></svg>");t.b("\n" + i);t.b(" <span class=\"sr-only\">Fast forward <span class=\"player-seek-time\">10</span> seconds</span>");t.b("\n" + i);t.b(" </button>");t.b("\n" + i);t.b(" <span class=\"player-time\">");t.b("\n" + i);t.b(" <span class=\"sr-only\">Time</span>");t.b("\n" + i);t.b(" <span class=\"player-duration\">00:00</span>");t.b("\n" + i);t.b(" </span>");t.b("\n" + i);t.b(" </span>");t.b("\n" + i);t.b(" <span class=\"player-controls-sound\">");t.b("\n" + i);t.b(" <input class=\"inverted sr-only\" id=\"mute{id}\" type=\"checkbox\" data-player=\"mute\">");t.b("\n" + i);t.b(" <label id=\"mute{id}\" for=\"mute{id}\">");t.b("\n" + i);t.b(" <svg class=\"icon-muted\"><use xlink:href=\"#icon-muted\"></use></svg>");t.b("\n" + i);t.b(" <svg><use xlink:href=\"#icon-sound\"></use></svg>");t.b("\n" + i);t.b(" <span class=\"sr-only\">Mute</span>");t.b("\n" + i);t.b(" </label>");t.b("\n");t.b("\n" + i);t.b(" <label for=\"volume{id}\" class=\"sr-only\">Volume:</label>");t.b("\n" + i);t.b(" <input id=\"volume{id}\" class=\"player-volume\" type=\"range\" min=\"0\" max=\"10\" value=\"5\" data-player=\"volume\">");t.b("\n");t.b("\n" + i);t.b(" <input class=\"sr-only\" id=\"captions{id}\" type=\"checkbox\" data-player=\"captions\">");t.b("\n" + i);t.b(" <label for=\"captions{id}\">");t.b("\n" + i);t.b(" <svg><use xlink:href=\"#icon-bubble\"></use></svg>");t.b("\n" + i);t.b(" <span class=\"sr-only\">Captions</span>");t.b("\n" + i);t.b(" </label>");t.b("\n");t.b("\n" + i);t.b(" <button data-player=\"fullscreen\">");t.b("\n" + i);t.b(" <svg class=\"icon-exit-fullscreen\"><use xlink:href=\"#icon-collapse\"></use></svg>");t.b("\n" + i);t.b(" <svg><use xlink:href=\"#icon-expand\"></use></svg>");t.b("\n" + i);t.b(" <span class=\"sr-only\">Toggle fullscreen</span>");t.b("\n" + i);t.b(" </button>");t.b("\n" + i);t.b(" </span>");t.b("\n" + i);t.b("</div>");return t.fl(); },partials: {}, subs: { }});
|
templates['controls'] = new Hogan.Template({code: function (c,p,i) { var t=this;t.b(i=i||"");t.b("<div class=\"player-controls\">");t.b("\n" + i);t.b(" <progress class=\"player-progress\" max=\"100\" value=\"0\">");t.b("\n" + i);t.b(" <span>0</span>% played");t.b("\n" + i);t.b(" </progress>");t.b("\n" + i);t.b(" <span class=\"player-controls-playback\">");t.b("\n" + i);t.b(" <button type=\"button\" data-player=\"restart\">");t.b("\n" + i);t.b(" <svg><use xlink:href=\"#icon-refresh\"></use></svg>");t.b("\n" + i);t.b(" <span class=\"sr-only\">Restart</span>");t.b("\n" + i);t.b(" </button>");t.b("\n" + i);t.b(" <button type=\"button\" data-player=\"rewind\">");t.b("\n" + i);t.b(" <svg><use xlink:href=\"#icon-rewind\"></use></svg>");t.b("\n" + i);t.b(" <span class=\"sr-only\">Rewind <span class=\"player-seek-time\">10</span> seconds</span>");t.b("\n" + i);t.b(" </button>");t.b("\n" + i);t.b(" <button type=\"button\" aria-label=\"{aria-label}\" data-player=\"play\">");t.b("\n" + i);t.b(" <svg><use xlink:href=\"#icon-play\"></use></svg>");t.b("\n" + i);t.b(" <span class=\"sr-only\">Play</span>");t.b("\n" + i);t.b(" </button>");t.b("\n" + i);t.b(" <button type=\"button\" data-player=\"pause\">");t.b("\n" + i);t.b(" <svg><use xlink:href=\"#icon-pause\"></use></svg>");t.b("\n" + i);t.b(" <span class=\"sr-only\">Pause</span>");t.b("\n" + i);t.b(" </button>");t.b("\n" + i);t.b(" <button type=\"button\" data-player=\"fast-forward\">");t.b("\n" + i);t.b(" <svg><use xlink:href=\"#icon-fast-forward\"></use></svg>");t.b("\n" + i);t.b(" <span class=\"sr-only\">Fast forward <span class=\"player-seek-time\">10</span> seconds</span>");t.b("\n" + i);t.b(" </button>");t.b("\n" + i);t.b(" <span class=\"player-time\">");t.b("\n" + i);t.b(" <span class=\"sr-only\">Time</span>");t.b("\n" + i);t.b(" <span class=\"player-duration\">00:00</span>");t.b("\n" + i);t.b(" </span>");t.b("\n" + i);t.b(" </span>");t.b("\n" + i);t.b(" <span class=\"player-controls-sound\">");t.b("\n" + i);t.b(" <input class=\"inverted sr-only\" id=\"mute{id}\" type=\"checkbox\" data-player=\"mute\">");t.b("\n" + i);t.b(" <label id=\"mute{id}\" for=\"mute{id}\">");t.b("\n" + i);t.b(" <svg class=\"icon-muted\"><use xlink:href=\"#icon-muted\"></use></svg>");t.b("\n" + i);t.b(" <svg><use xlink:href=\"#icon-sound\"></use></svg>");t.b("\n" + i);t.b(" <span class=\"sr-only\">Mute</span>");t.b("\n" + i);t.b(" </label>");t.b("\n");t.b("\n" + i);t.b(" <label for=\"volume{id}\" class=\"sr-only\">Volume:</label>");t.b("\n" + i);t.b(" <input id=\"volume{id}\" class=\"player-volume\" type=\"range\" min=\"0\" max=\"10\" value=\"5\" data-player=\"volume\">");t.b("\n");t.b("\n" + i);t.b(" <input class=\"sr-only\" id=\"captions{id}\" type=\"checkbox\" data-player=\"captions\">");t.b("\n" + i);t.b(" <label for=\"captions{id}\">");t.b("\n" + i);t.b(" <svg><use xlink:href=\"#icon-bubble\"></use></svg>");t.b("\n" + i);t.b(" <span class=\"sr-only\">Captions</span>");t.b("\n" + i);t.b(" </label>");t.b("\n");t.b("\n" + i);t.b(" <button type=\"button\" data-player=\"fullscreen\">");t.b("\n" + i);t.b(" <svg class=\"icon-exit-fullscreen\"><use xlink:href=\"#icon-collapse\"></use></svg>");t.b("\n" + i);t.b(" <svg><use xlink:href=\"#icon-expand\"></use></svg>");t.b("\n" + i);t.b(" <span class=\"sr-only\">Toggle fullscreen</span>");t.b("\n" + i);t.b(" </button>");t.b("\n" + i);t.b(" </span>");t.b("\n" + i);t.b("</div>");return t.fl(); },partials: {}, subs: { }});
|
38
index.html
38
index.html
@ -3,7 +3,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<title>Plyr - A simple HTML5 media player</title>
|
<title>Plyr - A simple HTML5 media player</title>
|
||||||
<meta name="description" content="Custom HTML5 video controls and WebVTT captions.">
|
<meta name="description" content="A simple HTML5 media player with custom controls and WebVTT captions.">
|
||||||
<meta name="author" content="Sam Potts">
|
<meta name="author" content="Sam Potts">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
|
||||||
@ -14,7 +14,8 @@
|
|||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<h1>Plyr</h1>
|
<h1>Plyr</h1>
|
||||||
<p>A simple HTML5 media player</p>
|
<p>A simple HTML5 media player with custom controls and WebVTT captions.</p>
|
||||||
|
<a href="https://github.com/selz/plyr" target="_blank" class="btn">Download on Github</a>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<section class="example-video">
|
<section class="example-video">
|
||||||
@ -25,16 +26,15 @@
|
|||||||
<source src="//cdn.sampotts.me/plyr/movie.webm" type="video/webm">
|
<source src="//cdn.sampotts.me/plyr/movie.webm" type="video/webm">
|
||||||
|
|
||||||
<!-- Text track file -->
|
<!-- Text track file -->
|
||||||
<track kind="captions" label="English captions" src="//cdn.sampotts.me/plyr/movie_captions_en.vtt" srclang="en" default>
|
<track kind="captions" label="English captions" src="//cdn.sampotts.me/plyr/movie_captions.vtt" srclang="en" default>
|
||||||
|
|
||||||
<!-- Fallback for browsers that don't support the <video> element -->
|
<!-- Fallback for browsers that don't support the <video> element -->
|
||||||
<div>
|
<div>
|
||||||
<a href="//cdn.sampotts.me/plyr/movie.mp4">
|
<a href="//cdn.sampotts.me/plyr/movie.mp4">Download</a>
|
||||||
<img src="//cdn.sampotts.me/plyr/poster.jpg" alt="Download">
|
|
||||||
</a>
|
|
||||||
</div>
|
</div>
|
||||||
</video>
|
</video>
|
||||||
</div>
|
</div>
|
||||||
|
<small>Big Buck Bunny. More info can be found at <a href="https://peach.blender.org" target="_blank">peach.blender.org</a>.</small>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="example-audio">
|
<section class="example-audio">
|
||||||
@ -42,6 +42,7 @@
|
|||||||
<audio controls>
|
<audio controls>
|
||||||
<!-- Audio files -->
|
<!-- Audio files -->
|
||||||
<source src="//cdn.sampotts.me/plyr/logistics-96-sample.mp3" type="audio/mp3">
|
<source src="//cdn.sampotts.me/plyr/logistics-96-sample.mp3" type="audio/mp3">
|
||||||
|
<source src="//cdn.sampotts.me/plyr/logistics-96-sample.ogg" type="application/ogg">
|
||||||
|
|
||||||
<!-- Fallback for browsers that don't support the <audio> element -->
|
<!-- Fallback for browsers that don't support the <audio> element -->
|
||||||
<div>
|
<div>
|
||||||
@ -49,23 +50,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</audio>
|
</audio>
|
||||||
</div>
|
</div>
|
||||||
<small>"96" by Logistics. More can be purchased from <a href="https://www.hospitalrecords.com/shop/artist/logistics" target="_blank">Hospital Records</a>.</small>
|
<small>"96" by Logistics, which can be purchased from <a href="https://www.hospitalrecords.com/shop/artist/logistics" target="_blank">Hospital Records</a>.</small>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<!-- Load SVG defs -->
|
<!-- Load SVG defs -->
|
||||||
<script>
|
<script>
|
||||||
(function(d,p){
|
(function(d,p){var a=new XMLHttpRequest(),b=d.body;a.open("GET",p,!0);a.send();a.onload=function(){var c=d.createElement("div");c.style.display="none";c.innerHTML=a.responseText;b.insertBefore(c,b.childNodes[0])}})(document,"dist/svg/sprite.svg");
|
||||||
var a=new XMLHttpRequest(),
|
|
||||||
b=d.body;
|
|
||||||
a.open("GET",p,!0);
|
|
||||||
a.send();
|
|
||||||
a.onload=function(){
|
|
||||||
var c=d.createElement("div");
|
|
||||||
c.style.display="none";
|
|
||||||
c.innerHTML=a.responseText;
|
|
||||||
b.insertBefore(c,b.childNodes[0])
|
|
||||||
}
|
|
||||||
})(document,"dist/svg/sprite.svg");
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- Core player -->
|
<!-- Core player -->
|
||||||
@ -73,5 +63,15 @@
|
|||||||
|
|
||||||
<!-- Docs setup -->
|
<!-- Docs setup -->
|
||||||
<script src="dist/js/docs.js"></script>
|
<script src="dist/js/docs.js"></script>
|
||||||
|
|
||||||
|
<!-- GA -->
|
||||||
|
<script>
|
||||||
|
(function(i,s,o,g,r,a,m){i.GoogleAnalyticsObject=r;i[r]=i[r]||function(){
|
||||||
|
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||||
|
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||||
|
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
||||||
|
ga('create', 'UA-40881672-11', 'auto');
|
||||||
|
ga('send', 'pageview');
|
||||||
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
@ -33,5 +33,5 @@
|
|||||||
"authors": [
|
"authors": [
|
||||||
"Sam Potts <me@sampotts.me>"
|
"Sam Potts <me@sampotts.me>"
|
||||||
],
|
],
|
||||||
"license": "MIT"
|
"license": "BSD"
|
||||||
}
|
}
|
||||||
|
@ -22,6 +22,13 @@ We wanted a lightweight, accessible and customisable media player that just supp
|
|||||||
|
|
||||||
## Implementation
|
## Implementation
|
||||||
|
|
||||||
|
### Bower
|
||||||
|
If bower is your thang, you can grab Plyr using:
|
||||||
|
```
|
||||||
|
bower install plyr
|
||||||
|
```
|
||||||
|
More info on setting up dependencies can be found in the [Bower Docs](http://bower.io/docs/creating-packages/#maintaining-dependencies)
|
||||||
|
|
||||||
### CSS
|
### CSS
|
||||||
If you want to use the default css, add the css file from /dist into your head, or even better use the less file included in /assets in your build to save a request.
|
If you want to use the default css, add the css file from /dist into your head, or even better use the less file included in /assets in your build to save a request.
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user