More Edge fixes and small UI bugs

This commit is contained in:
Sam Potts 2017-12-08 15:54:08 +00:00
parent c8990bd379
commit 82f81f4f73
15 changed files with 76 additions and 58 deletions

View File

@ -19,7 +19,18 @@
"semi": [2, "always"],
"eqeqeq": [2, "always"],
"one-var": [2, "never"],
"comma-dangle": [2, "always-multiline"]
"comma-dangle": [2, "always-multiline"],
"no-restricted-globals": [
"error",
{
"name": "event",
"message": "Use local parameter instead."
},
{
"name": "error",
"message": "Use local parameter instead."
}
]
},
"parserOptions": {
"sourceType": "module"

2
demo/dist/demo.css vendored

File diff suppressed because one or more lines are too long

2
demo/dist/error.css vendored

File diff suppressed because one or more lines are too long

View File

@ -65,7 +65,12 @@
</svg>Vimeo</button>
</p>
<span class="action">
<p>Monetization options provided by
<a href="https://vi.ai" target="_blank">vi.ai</a>
</p>
<div class="call-to-action">
<span class="button--with-count">
<a href="https://github.com/sampotts/plyr" target="_blank" class="button" data-shr-network="github">
<svg class="icon" role="presentation">
<title>GitHub</title>
@ -79,6 +84,7 @@
Download on GitHub
</a>
</span>
</div>
</header>
<main>

View File

@ -29,16 +29,38 @@
&:hover,
&:focus {
color: @gray-dark;
outline: 0;
// Remove the underline/border
&::after {
display: none;
}
}
&:hover {
transform: translateY(-1px);
box-shadow: 0 2px 2px fade(#000, 10%);
}
&:focus {
outline: 0;
}
&.tab-focus {
.tab-focus();
}
&:active {
transform: translateY(1px);
}
}
// Button group
.button--with-count {
display: inline-flex;
.button .icon {
flex-shrink: 0;
}
}
// Count bubble

View File

@ -6,16 +6,8 @@ header {
padding-bottom: @spacing-base;
text-align: center;
p {
margin-bottom: (@spacing-base * 1.5);
}
.action {
display: inline-flex;
.button .icon {
flex-shrink: 0;
}
.call-to-action {
margin-top: (@spacing-base * 1.5);
}
@media @mq-md {

2
dist/plyr.css vendored

File diff suppressed because one or more lines are too long

2
dist/plyr.js vendored

File diff suppressed because one or more lines are too long

2
dist/plyr.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -29,22 +29,22 @@ const utils = {
return !this.nullOrUndefined(input) && Array.isArray(input);
},
weakMap(input) {
return this.instanceof(input, WeakMap);
return this.instanceof(input, window.WeakMap);
},
nodeList(input) {
return this.instanceof(input, NodeList);
return this.instanceof(input, window.NodeList);
},
element(input) {
return this.instanceof(input, Element);
return this.instanceof(input, window.Element);
},
textNode(input) {
return this.getConstructor(input) === Text;
},
event(input) {
return this.instanceof(input, Event);
return this.instanceof(input, window.Event);
},
cue(input) {
return this.instanceof(input, TextTrackCue) || this.instanceof(input, VTTCue);
return this.instanceof(input, window.TextTrackCue) || this.instanceof(input, window.VTTCue);
},
track(input) {
return this.instanceof(input, TextTrack) || (!this.nullOrUndefined(input) && this.string(input.kind));

View File

@ -3,6 +3,7 @@
// --------------------------------------------------------------
.plyr__menu {
display: flex; // Edge fix
position: relative;
// Animate the icon
@ -11,7 +12,7 @@
}
.plyr__control[aria-expanded='true'] {
svg {
transform: rotate(45deg);
transform: rotate(90deg);
}
// Hide tooltip

View File

@ -4,7 +4,7 @@
.plyr__progress {
position: relative;
display: none;
display: flex;
flex: 1;
input[type='range'] {
@ -19,10 +19,6 @@
}
}
.plyr .plyr__progress {
display: inline-block;
}
.plyr__progress--buffer {
position: absolute;
left: 0;
@ -40,6 +36,7 @@
&::-webkit-progress-bar {
background: transparent;
transition: width 0.2s ease;
}
&::-webkit-progress-value {
@ -53,24 +50,12 @@
background: currentColor;
border-radius: 100px;
min-width: @plyr-range-track-height;
transition: width 0.2s ease;
}
// Microsoft
&::-ms-fill {
border-radius: 100px;
}
}
.plyr__progress--buffer {
&::-webkit-progress-value {
transition: width 0.2s ease;
}
&::-moz-progress-bar {
transition: width 0.2s ease;
}
&::-ms-fill {
transition: width 0.2s ease;
}
}

View File

@ -5,7 +5,7 @@
// Specificity is for bootstrap compatibility
.plyr--full-ui input[type='range'] {
display: block;
height: (@plyr-range-thumb-height * @plyr-range-thumb-active-scale);
height: @plyr-range-thumb-active-height;
width: 100%;
margin: 0;
padding: 0;
@ -16,7 +16,7 @@
border-radius: (@plyr-range-thumb-height * 2);
// Used in JS to populate lower fill for WebKit
color: @plyr-range-selected-bg;
color: @plyr-range-fill-bg;
// WebKit
-webkit-appearance: none;

View File

@ -35,7 +35,7 @@
.plyr-range-thumb() {
position: relative;
height: @plyr-range-thumb-height;
width: @plyr-range-thumb-width;
width: @plyr-range-thumb-height;
background: @plyr-range-thumb-bg;
border: @plyr-range-thumb-border;
border-radius: 100%;
@ -47,7 +47,7 @@
.plyr-range-thumb-active() {
background: @plyr-range-thumb-active-bg;
border-color: @plyr-range-thumb-active-border-color;
transform: scale(@plyr-range-thumb-active-scale);
transform: scale(unit(@plyr-range-thumb-active-height / @plyr-range-thumb-height));
}
// Fullscreen styles

View File

@ -78,17 +78,18 @@
// Range sliders
@plyr-range-track-height: 6px;
@plyr-range-thumb-height: ceil(@plyr-range-track-height * 2.3);
@plyr-range-thumb-width: ceil(@plyr-range-track-height * 2.3);
@plyr-range-thumb-height: 14px;
@plyr-range-thumb-bg: #fff;
@plyr-range-thumb-border: 2px solid transparent;
@plyr-range-thumb-shadow: 0 1px 1px fade(@plyr-video-controls-bg, 15%), 0 0 0 1px fade(@plyr-color-gunmetal, 20%);
@plyr-range-fill-bg: @plyr-color-main;
@plyr-range-thumb-active-border-color: #fff;
@plyr-range-thumb-active-bg: @plyr-video-control-bg-hover;
@plyr-range-thumb-active-scale: 1.5;
@plyr-range-thumb-active-height: 20px;
@plyr-video-range-track-bg: @plyr-video-progress-buffered-bg;
@plyr-audio-range-track-bg: @plyr-audio-progress-buffered-bg;
@plyr-range-selected-bg: @plyr-color-main;
// Breakpoints
@plyr-bp-sm: 480px;