Comments, small tweaks

This commit is contained in:
Sam Potts 2017-10-02 13:55:03 +11:00
parent 2bba1f30e2
commit 6dd010ea34
7 changed files with 61 additions and 43 deletions

2
demo/dist/demo.css vendored

File diff suppressed because one or more lines are too long

View File

@ -13,6 +13,10 @@
<!-- Docs styles -->
<link rel="stylesheet" href="dist/demo.css">
<!-- Preload -->
<link rel="preload" as="font" crossorigin type="font/woff2" href="https://cdn.plyr.io/fonts/avenir-medium.woff2">
<link rel="preload" as="font" crossorigin type="font/woff2" href="https://cdn.plyr.io/fonts/avenir-bold.woff2">
</head>
<body>
@ -23,12 +27,17 @@
<ul>
<li>
<a href="https://github.com/sampotts/plyr" target="_blank" class="btn btn--large btn--primary" data-shr-network="github">
<svg class="icon"><use xlink:href="#icon-github"/></svg>Download on GitHub
<svg class="icon">
<use xlink:href="#icon-github" />
</svg>Download on GitHub
</a>
</li>
<li>
<a href="https://twitter.com/intent/tweet?text=A+simple+HTML5+media+player+with+custom+controls+and+WebVTT+captions.&url=http%3A%2F%2Fplyr.io&via=Sam_Potts" target="_blank" class="btn btn--large btn--twitter" data-shr-network="twitter">
<svg class="icon"><use xlink:href="#icon-twitter"/></svg>Tweet
<a href="https://twitter.com/intent/tweet?text=A+simple+HTML5+media+player+with+custom+controls+and+WebVTT+captions.&url=http%3A%2F%2Fplyr.io&via=Sam_Potts"
target="_blank" class="btn btn--large btn--twitter" data-shr-network="twitter">
<svg class="icon">
<use xlink:href="#icon-twitter" />
</svg>Tweet
</a>
</li>
</ul>
@ -53,7 +62,8 @@
</ul>
</nav>
<video controls crossorigin playsinline poster="https://cdn.selz.com/plyr/1.5/View_From_A_Blue_Moon_Trailer-HD.jpg" id="player">
<video controls crossorigin playsinline loop poster="https://cdn.selz.com/plyr/1.5/View_From_A_Blue_Moon_Trailer-HD.jpg"
id="player">
<!-- Video files -->
<source src="https://cdn.selz.com/plyr/1.5/View_From_A_Blue_Moon_Trailer-HD.mp4" type="video/mp4">

View File

@ -52,12 +52,12 @@ a {
text-decoration: none;
color: @link-color;
border-bottom: 1px dotted currentColor;
transition: background .3s ease, color .3s ease, border .3s ease;
transition: background 0.3s ease, color 0.3s ease, border 0.3s ease;
&:hover,
&:focus {
color: @gray-dark;
border-bottom-color: rgba(0,0,0,0);
border-bottom-color: rgba(0, 0, 0, 0);
}
&:focus {
.tab-focus();

View File

@ -4,16 +4,18 @@
@font-face {
font-family: "Avenir";
src: url("https://cdn.plyr.io/fonts/avenir-medium.woff2") format("woff2"),
url("https://cdn.plyr.io/fonts/avenir-medium.woff") format("woff");
font-style: normal;
font-weight: @font-weight-base;
src: url("https://cdn.plyr.io/fonts/avenir-medium.woff2") format("woff2"),
url("https://cdn.plyr.io/fonts/avenir-medium.woff") format("woff");
font-style: normal;
font-weight: @font-weight-base;
font-display: swap;
}
@font-face {
font-family: "Avenir";
src: url("https://cdn.plyr.io/fonts/avenir-bold.woff2") format("woff2"),
url("https://cdn.plyr.io/fonts/avenir-bold.woff") format("woff");
font-style: normal;
font-weight: @font-weight-bold;
}
src: url("https://cdn.plyr.io/fonts/avenir-bold.woff2") format("woff2"),
url("https://cdn.plyr.io/fonts/avenir-bold.woff") format("woff");
font-style: normal;
font-weight: @font-weight-bold;
font-display: swap;
}

View File

@ -3,46 +3,46 @@
// ==========================================================================
// Colors
@gray-dark: #343f4a;
@gray: #55646b;
@gray-light: #cbd0d3;
@gray-lighter: #dbe3e8;
@off-white: #f2f5f7;
@gray-dark: #343f4a;
@gray: #55646b;
@gray-light: #cbd0d3;
@gray-lighter: #dbe3e8;
@off-white: #f2f5f7;
@brand-primary: #3498db;
@brand-secondary: #02BD9B;
@brand-primary: #3498db;
@brand-secondary: #02bd9b;
// Brands
@color-twitter: #4BAAF4;
@color-youtube: #cc181e;
@color-vimeo: #19b7ed;
@color-twitter: #4baaf4;
@color-youtube: #cc181e;
@color-vimeo: #19b7ed;
// Base
@body-background: @off-white; //linear-gradient(to left top, @brand-secondary, @brand-primary);
@body-background: @off-white; //linear-gradient(to left top, @brand-secondary, @brand-primary);
// Type
@font-size-base: 16;
@font-size-small: 14;
@font-size-h1: 64;
@font-weight-base: 500;
@font-weight-bold: 700;
@font-size-base: 16;
@font-size-small: 14;
@font-size-h1: 64;
@font-weight-base: 500;
@font-weight-bold: 700;
// Elements
@link-color: @brand-primary;
@padding-base: 20px;
@arrow-size: 8px;
@link-color: @brand-primary;
@padding-base: 20px;
@arrow-size: 8px;
// Icons
@icon-size: 18px;
@icon-size: 18px;
// Breakpoints
@screen-sm: 480px;
@screen-md: 768px;
@screen-sm: 480px;
@screen-md: 768px;
// Radii
@border-radius-base: 4px;
@border-radius-large: 6px;
@border-radius-base: 4px;
@border-radius-large: 6px;
// Examples
@example-width-audio: 520px;
@example-width-video: 1200px;
@example-width-audio: 520px;
@example-width-video: 1200px;

2
dist/plyr.js vendored

File diff suppressed because one or more lines are too long

View File

@ -5,6 +5,7 @@
// License: The MIT License (MIT)
// ==========================================================================
// UMD-Inspired JS Module from https://gist.github.com/wilmoore/3880415
(function(name, context, definition) {
/* global define,module,require */
'use strict';
@ -4845,6 +4846,11 @@
return toggle;
};
// Get playback status
Plyr.prototype.isPlaying = function() {
return !this.media.paused;
};
// Stop
Plyr.prototype.stop = function() {
var player = this;