-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ab88bcd
commit 51f1863
Showing
20 changed files
with
1,429 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.video-js .vjs-control.vjs-close-button { | ||
@extend .vjs-icon-cancel; | ||
cursor: pointer; | ||
height: 3em; | ||
position: absolute; | ||
right: 0; | ||
top: 0.5em; | ||
z-index: 2; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,23 @@ | ||
.vjs-error-display { | ||
display: none; | ||
} | ||
|
||
.vjs-error .vjs-error-display { | ||
display: block; | ||
position: absolute; | ||
left: 0; | ||
top: 0; | ||
width: 100%; | ||
height: 100%; | ||
.vjs-error .vjs-error-display .vjs-modal-dialog-content { | ||
font-size: 1.4em; | ||
text-align: center; | ||
} | ||
|
||
.vjs-error .vjs-error-display:before { | ||
color: #fff; | ||
content: 'X'; | ||
font-family: $text-font-family; | ||
font-size: 4em; | ||
color: #fff; | ||
/* In order to center the play icon vertically we need to set the line height | ||
to the same as the button height */ | ||
line-height: 1; | ||
text-shadow: 0.05em 0.05em 0.1em #000; | ||
text-align: center /* Needed for IE8 */; | ||
vertical-align: middle; | ||
left: 0; | ||
|
||
// In order to center the play icon vertically we need to set the line height | ||
// to the same as the button height | ||
line-height: 1; | ||
margin-top: -0.5em; | ||
position: absolute; | ||
left: 0; | ||
text-shadow: 0.05em 0.05em 0.1em #000; | ||
text-align: center; // Needed for IE8 | ||
top: 50%; | ||
margin-top: -0.5em; | ||
vertical-align: middle; | ||
width: 100%; | ||
} | ||
|
||
.vjs-error-display div { | ||
position: absolute; | ||
bottom: 1em; | ||
right: 0; | ||
left: 0; | ||
font-size: 1.4em; | ||
text-align: center; | ||
padding: 3px; | ||
|
||
@include background-color-with-alpha(#000, 0.5); | ||
} | ||
|
||
.vjs-error-display a, | ||
.vjs-error-display a:visited { | ||
color: #66A8CC; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
.video-js .vjs-modal-dialog { | ||
@extend %fill-parent; | ||
@include linear-gradient(180deg, rgba(0, 0, 0, 0.8), rgba(255, 255, 255, 0)); | ||
} | ||
|
||
.vjs-modal-dialog .vjs-modal-dialog-content { | ||
@extend %fill-parent; | ||
|
||
font-size: 1.2em; // 12px | ||
line-height: 1.5; // 18px | ||
padding: 30px; | ||
z-index: 1; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
// These functions and mixins taken from: | ||
// | ||
// "Building a linear-gradient Mixin in Sass" by Hugo Giraudel | ||
// http://www.sitepoint.com/building-linear-gradient-mixin-sass/ | ||
// http://sassmeister.com/gist/b58f6e2cc3160007c880 | ||
// | ||
|
||
/// Convert angle | ||
/// @author Chris Eppstein | ||
/// @param {Number} $value - Value to convert | ||
/// @param {String} $unit - Unit to convert to | ||
/// @return {Number} Converted angle | ||
@function convert-angle($value, $unit) { | ||
$convertable-units: deg grad turn rad; | ||
$conversion-factors: 1 (10grad/9deg) (1turn/360deg) (3.1415926rad/180deg); | ||
@if index($convertable-units, unit($value)) and index($convertable-units, $unit) { | ||
@return $value | ||
/ nth($conversion-factors, index($convertable-units, unit($value))) | ||
* nth($conversion-factors, index($convertable-units, $unit)); | ||
} | ||
|
||
@warn "Cannot convert `#{unit($value)}` to `#{$unit}`."; | ||
} | ||
|
||
/// Test if `$value` is an angle | ||
/// @param {*} $value - Value to test | ||
/// @return {Bool} | ||
@function is-direction($value) { | ||
$is-direction: index(( | ||
'to top', | ||
'to top right', | ||
'to right top', | ||
'to right', | ||
'to bottom right', | ||
'to right bottom', | ||
'to bottom', | ||
'to bottom left', | ||
'to left bottom', | ||
'to left', | ||
'to left top', | ||
'to top left' | ||
), $value); | ||
$is-angle: type-of($value) == 'number' and index('deg' 'grad' 'turn' 'rad', unit($value)); | ||
|
||
@return $is-direction or $is-angle; | ||
} | ||
|
||
/// Convert a direction to legacy syntax | ||
/// @param {Keyword | Angle} $value - Value to convert | ||
/// @require {function} is-direction | ||
/// @require {function} convert-angle | ||
@function legacy-direction($value) { | ||
@if is-direction($value) == false { | ||
@warn "Cannot convert `#{$value}` to legacy syntax because it doesn't seem to be an angle or a direction"; | ||
} | ||
|
||
$conversion-map: ( | ||
'to top' : 'bottom', | ||
'to top right' : 'bottom left', | ||
'to right top' : 'left bottom', | ||
'to right' : 'left', | ||
'to bottom right' : 'top left', | ||
'to right bottom' : 'left top', | ||
'to bottom' : 'top', | ||
'to bottom left' : 'top right', | ||
'to left bottom' : 'right top', | ||
'to left' : 'right', | ||
'to left top' : 'right bottom', | ||
'to top left' : 'bottom right' | ||
); | ||
|
||
@if map-has-key($conversion-map, $value) { | ||
@return map-get($conversion-map, $value); | ||
} | ||
|
||
@return 90deg - convert-angle($value, 'deg'); | ||
} | ||
|
||
/// Mixin printing a linear-gradient | ||
/// as well as a plain color fallback | ||
/// and the `-webkit-` prefixed declaration | ||
/// @access public | ||
/// @param {String | List | Angle} $direction - Linear gradient direction | ||
/// @param {Arglist} $color-stops - List of color-stops composing the gradient | ||
@mixin linear-gradient($direction, $color-stops...) { | ||
@if is-direction($direction) == false { | ||
$color-stops: ($direction, $color-stops); | ||
$direction: 180deg; | ||
} | ||
|
||
background: nth(nth($color-stops, 1), 1); | ||
background: -webkit-linear-gradient(legacy-direction($direction), $color-stops); | ||
background: linear-gradient($direction, $color-stops); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import Button from './button'; | ||
import Component from './component'; | ||
|
||
/** | ||
* The `CloseButton` component is a button which fires a "close" event | ||
* when it is activated. | ||
* | ||
* @extends Button | ||
* @class CloseButton | ||
*/ | ||
class CloseButton extends Button { | ||
|
||
constructor(player, options) { | ||
super(player, options); | ||
this.controlText(options && options.controlText || this.localize('Close')); | ||
} | ||
|
||
buildCSSClass() { | ||
return `vjs-close-button ${super.buildCSSClass()}`; | ||
} | ||
|
||
handleClick() { | ||
this.trigger({type: 'close', bubbles: false}); | ||
} | ||
} | ||
|
||
Component.registerComponent('CloseButton', CloseButton); | ||
export default CloseButton; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.