aboutsummaryrefslogtreecommitdiffstats
path: root/demo
diff options
context:
space:
mode:
Diffstat (limited to 'demo')
-rw-r--r--demo/dist/demo.css2
-rw-r--r--demo/dist/demo.js2
-rw-r--r--demo/index.html34
-rw-r--r--demo/src/js/main.js6
-rw-r--r--demo/src/less/components/base.less16
-rw-r--r--demo/src/less/components/buttons.less262
-rw-r--r--demo/src/less/components/examples.less12
-rw-r--r--demo/src/less/components/type.less12
-rw-r--r--demo/src/less/variables.less6
9 files changed, 182 insertions, 170 deletions
diff --git a/demo/dist/demo.css b/demo/dist/demo.css
index a9b2f5bc..a323a9a4 100644
--- a/demo/dist/demo.css
+++ b/demo/dist/demo.css
@@ -1 +1 @@
-/*! normalize.css v2.1.3 | MIT License | git.io/normalize */a.logo,img,legend{border:0}a,h1,h2{color:#3498db}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,small,summary{display:block}body,figure,li,ul{margin:0}[hidden],template{display:none}li,nav ul,ul{list-style:none;padding:0}legend,li,nav ul,ul{padding:0}.btn__bar,sub,sup{position:relative}audio,canvas,video{display:inline-block}audio:not([controls]){display:none;height:0}html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}a{background:0 0;text-decoration:none;border-bottom:1px dotted currentColor;transition:background .3s ease,color .3s ease,border .3s ease}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}.btn__bar,nav li{white-space:nowrap}q{quotes:"\201C" "\201D" "\2018" "\2019"}sub,sup{font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}svg:not(:root){overflow:hidden}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}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}@keyframes fade-in{0%{opacity:0}100%{opacity:1}}@font-face{font-family:Avenir;src:url(//cdn.plyr.io/fonts/avenir-medium.woff2) format("woff2"),url(//cdn.plyr.io/fonts/avenir-medium.woff) format("woff");font-style:normal;font-weight:500}@font-face{font-family:Avenir;src:url(//cdn.plyr.io/fonts/avenir-bold.woff2) format("woff2"),url(//cdn.plyr.io/fonts/avenir-bold.woff) format("woff");font-style:normal;font-weight:700}html{font-size:100%;height:100%;background:fixed #f2f5f7}body{font-family:Avenir,"Helvetica Neue",Helvetica,Arial,sans-serif;line-height:1.5;text-align:center;color:#55646b;font-weight:500;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;padding:10px}h1,h2{letter-spacing:-.025em;margin:0 0 10px;line-height:1.2;font-weight:700}h1{font-size:64px;font-size:4rem}p,small{margin:0 0 20px}small{padding:0 10px;font-size:14px;font-size:.875rem}a:focus,a:hover{color:#343f4a;border-bottom-color:transparent}a:focus{outline:#343f4a dotted thin;outline-offset:1px}.color--vimeo{color:#19b7ed}.color--youtube{color:#cc181e}*,::after,::before{box-sizing:border-box}.btn__bar ul,nav li{display:inline-block}header{padding:20px;margin-bottom:20px}header p{font-size:18px;font-size:1.125rem}section{max-width:1200px;margin:0 auto 20px}@media (min-width:480px){header{padding-top:60px;padding-bottom:60px}section{margin-bottom:40px}}.icon{fill:currentColor;width:18px;height:18px;vertical-align:-3px}.btn,.btn__count,.error main,video{vertical-align:middle}a svg,button svg,label svg{pointer-events:none}.btn .icon,a .icon{margin-right:10px}.btn:not(.btn-large) .icon{width:16px;height:16px}nav ul{margin:0;font-size:0}nav li{margin-top:10px;font-size:16px;font-size:1rem}nav li+li{margin-left:20px}.btn__bar{margin:0 auto 20px;max-width:1200px}.btn__bar::before{content:"";position:absolute;top:50%;left:0;right:0;height:1px;background:#dbe3e8}.btn__bar ul{position:relative;z-index:1;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn__bar li{margin:0}.btn__bar li:first-child .btn{border-radius:4px 0 0 4px}.btn__bar li:last-child .btn{border-radius:0 4px 4px 0}.btn__bar li+li .btn{margin-left:-1px}.btn__bar li.active .btn{position:relative;z-index:1}.btn__bar li.active .btn .icon{color:inherit}.btn__bar li.active+li .btn:hover{z-index:0}.btn__bar .btn{position:relative;display:block;border-radius:0}.btn__bar .btn:focus,.btn__bar .btn:hover{z-index:1}@media (min-width:560px){.btn__bar{margin-bottom:40px}}.btn,.btn__count{display:inline-block;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-weight:700}.btn{padding:10px 12px;background:linear-gradient(#f8fafb,#e9eef1);border:1px solid #cbd0d3;box-shadow:0 1px 1px rgba(0,0,0,.05);text-shadow:0 1px 1px #fff;color:#55646b;transition:background .1s ease,color .1s ease;font-size:14px;font-size:.875rem}.btn:focus,.btn:hover{border-color:#b5bcc0;color:#55646b;outline:0}.btn--large{padding:10px 20px;font-size:16px;font-size:1rem}.btn--primary,.btn__bar li.active .btn{background-image:linear-gradient(#3498db,#258cd1);background-color:#3498db;border-color:#217dbb;box-shadow:0 1px 1px rgba(0,0,0,.15);text-shadow:0 1px 1px rgba(0,0,0,.1);color:#fff}.btn--primary:focus,.btn--primary:hover{color:#fff;border-color:#196090}.btn--youtube .icon{color:#cc181e}.btn--vimeo .icon{color:#19b7ed}.btn--twitter .icon{color:#4BAAF4}.btn__count{position:relative;margin-left:10px;padding:10px 15px;background:#fff;border:1px solid #cbd0d3}.btn__count::before,.plyr__video-wrapper::after{content:"";position:absolute}.btn__count::before{display:block;width:8px;height:8px;left:1px;top:50%;margin-top:-4px;background:inherit;border:inherit;border-width:1px 0 0 1px;transform:rotate(-45deg) translate(-50%,-50%)}.error body,html.error{height:100%}.error body{width:100%;display:table;table-layout:fixed}.error main{display:table-cell;width:100%}video{max-width:100%}.plyr{margin:0 auto;border-radius:6px}.plyr--audio{max-width:520px}.plyr__video-wrapper::after{pointer-events:none;top:0;bottom:0;left:0;right:0;border:1px solid rgba(0,0,0,.15);border-radius:inherit}.plyr__cite{display:none;margin-top:20px}.plyr__cite .icon{margin-right:5px}.plyr--audio~ul .plyr__cite--audio,.plyr--video:not(.plyr--youtube):not(.plyr--vimeo)~ul .plyr__cite--video,.plyr--vimeo~ul .plyr__cite--vimeo,.plyr--youtube~ul .plyr__cite--youtube{display:block} \ No newline at end of file
+/*! normalize.css v2.1.3 | MIT License | git.io/normalize */a.logo,img,legend{border:0}a,h1,h2{color:#22b5ff}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,small,summary{display:block}figure,li,ul{margin:0}[hidden],template{display:none}header,section{margin-bottom:20px}li,nav ul,ul{list-style:none;padding:0}legend,li,nav ul,ul{padding:0}.btn__bar,sub,sup{position:relative}audio,canvas,video{display:inline-block}audio:not([controls]){display:none;height:0}html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}a{background:0 0;text-decoration:none;transition:color .3s ease}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}.btn__bar,nav li{white-space:nowrap}q{quotes:"\201C" "\201D" "\2018" "\2019"}sub,sup{font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}svg:not(:root){overflow:hidden}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}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}@keyframes fade-in{0%{opacity:0}100%{opacity:1}}@font-face{font-family:Avenir;src:url(//cdn.plyr.io/fonts/avenir-medium.woff2) format("woff2"),url(//cdn.plyr.io/fonts/avenir-medium.woff) format("woff");font-style:normal;font-weight:500}@font-face{font-family:Avenir;src:url(//cdn.plyr.io/fonts/avenir-bold.woff2) format("woff2"),url(//cdn.plyr.io/fonts/avenir-bold.woff) format("woff");font-style:normal;font-weight:700}html{font-size:100%;background:#fff}body{font-family:Avenir,"Helvetica Neue",Helvetica,Arial,sans-serif;line-height:1.5;text-align:center;color:#55646b;font-weight:500;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;max-width:800px;margin:auto;padding:10px}h1,h2{letter-spacing:-.025em;margin:0 0 10px;line-height:1.2;font-weight:700}h1{font-size:64px;font-size:4rem}p,small{margin:0 0 20px}small{padding:0 10px;font-size:14px;font-size:.875rem}a:focus,a:hover{color:#343f4a}a:focus,button:focus{outline:#343f4a dotted thin;outline-offset:1px}.color--vimeo{color:#19b7ed}.color--youtube{color:#cc181e}*,::after,::before{box-sizing:border-box}.btn__bar ul,nav li{display:inline-block}header{padding:20px}header p{font-size:18px;font-size:1.125rem}@media (min-width:480px){header{padding-top:60px;padding-bottom:60px}section{margin-bottom:40px}}.icon{fill:currentColor;width:18px;height:18px;vertical-align:-3px}.btn,.btn__count,.error main,video{vertical-align:middle}a svg,button svg,label svg{pointer-events:none}.btn .icon,a .icon{margin-right:10px}.btn:not(.btn-large) .icon{width:16px;height:16px}nav ul{margin:0;font-size:0}nav li{margin-top:10px;font-size:16px;font-size:1rem}nav li+li{margin-left:20px}.btn__bar{margin:0 auto 20px}.btn__bar::before{content:"";position:absolute;top:50%;left:0;right:0;height:1px;background:#f2f5f7}.btn__bar ul{position:relative;z-index:1}.btn__bar li{margin:0}.btn__bar li:first-child .btn{border-radius:4px 0 0 4px}.btn__bar li:last-child .btn{border-radius:0 4px 4px 0}.btn__bar li+li .btn{margin-left:-1px}.btn__bar li.active .btn{position:relative;z-index:1}.btn__bar li.active .btn .icon{color:inherit}.btn__bar li.active+li .btn:hover{z-index:0}.btn__bar .btn{position:relative;display:block;border-radius:0}.btn__bar .btn:focus,.btn__bar .btn:hover{z-index:1}@media (min-width:560px){.btn__bar{margin-bottom:40px}}.btn,.btn__count{display:inline-block;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-weight:700}.btn{padding:10px 12px;background:#fff;border:1px solid #dbe3e8;color:#55646b;transition:all .2s ease;font-size:14px;font-size:.875rem}.btn:focus,.btn:hover{border-color:#cbd0d3}.btn--large{padding:10px 20px;font-size:16px;font-size:1rem}.btn--primary,.btn__bar li.active .btn{background-image:linear-gradient(#22b5ff,#08acff);background-color:#22b5ff;border-color:#08acff;color:#fff}.btn--primary:focus,.btn--primary:hover{color:#fff;border-color:#009eee}.btn--youtube .icon{color:#cc181e}.btn--vimeo .icon{color:#19b7ed}.btn--twitter .icon{color:#4BAAF4}.btn__count{position:relative;margin-left:10px;padding:10px 15px;background:#fff;border:1px solid #dbe3e8}.btn__count::before,.plyr__video-wrapper::after{content:"";position:absolute}.btn__count::before{display:block;width:8px;height:8px;left:1px;top:50%;margin-top:-4px;background:inherit;border:inherit;border-width:1px 0 0 1px;transform:rotate(-45deg) translate(-50%,-50%)}.error body,html.error{height:100%}.error body{width:100%;display:table;table-layout:fixed}.error main{display:table-cell;width:100%}video{max-width:100%}.plyr{margin:0 auto;border-radius:6px}.plyr--audio{max-width:520px}.plyr__video-wrapper::after{pointer-events:none;top:0;bottom:0;left:0;right:0;border:1px solid rgba(0,0,0,.15);border-radius:inherit}.plyr__cite{margin-top:20px} \ No newline at end of file
diff --git a/demo/dist/demo.js b/demo/dist/demo.js
index bf26da52..dbb9dd10 100644
--- a/demo/dist/demo.js
+++ b/demo/dist/demo.js
@@ -1 +1 @@
-"document"in self&&("classList"in document.createElement("_")?!function(){"use strict";var e=document.createElement("_");if(e.classList.add("c1","c2"),!e.classList.contains("c2")){var t=function(e){var t=DOMTokenList.prototype[e];DOMTokenList.prototype[e]=function(e){var i,n=arguments.length;for(i=0;i<n;i++)e=arguments[i],t.call(this,e)}};t("add"),t("remove")}if(e.classList.toggle("c3",!1),e.classList.contains("c3")){var i=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(e,t){return 1 in arguments&&!this.contains(e)==!t?t:i.call(this,e)}}e=null}():!function(e){"use strict";if("Element"in e){var t="classList",i="prototype",n=e.Element[i],o=Object,r=String[i].trim||function(){return this.replace(/^\s+|\s+$/g,"")},s=Array[i].indexOf||function(e){for(var t=0,i=this.length;t<i;t++)if(t in this&&this[t]===e)return t;return-1},a=function(e,t){this.name=e,this.code=DOMException[e],this.message=t},c=function(e,t){if(""===t)throw new a("SYNTAX_ERR","An invalid or illegal string was specified");if(/\s/.test(t))throw new a("INVALID_CHARACTER_ERR","String contains an invalid character");return s.call(e,t)},l=function(e){for(var t=r.call(e.getAttribute("class")||""),i=t?t.split(/\s+/):[],n=0,o=i.length;n<o;n++)this.push(i[n]);this._updateClassName=function(){e.setAttribute("class",this.toString())}},u=l[i]=[],d=function(){return new l(this)};if(a[i]=Error[i],u.item=function(e){return this[e]||null},u.contains=function(e){return e+="",c(this,e)!==-1},u.add=function(){var e,t=arguments,i=0,n=t.length,o=!1;do e=t[i]+"",c(this,e)===-1&&(this.push(e),o=!0);while(++i<n);o&&this._updateClassName()},u.remove=function(){var e,t,i=arguments,n=0,o=i.length,r=!1;do for(e=i[n]+"",t=c(this,e);t!==-1;)this.splice(t,1),r=!0,t=c(this,e);while(++n<o);r&&this._updateClassName()},u.toggle=function(e,t){e+="";var i=this.contains(e),n=i?t!==!0&&"remove":t!==!1&&"add";return n&&this[n](e),t===!0||t===!1?t:!i},u.toString=function(){return this.join(" ")},o.defineProperty){var p={get:d,enumerable:!0,configurable:!0};try{o.defineProperty(n,t,p)}catch(e){e.number===-2146823252&&(p.enumerable=!1,o.defineProperty(n,t,p))}}else o[i].__defineGetter__&&n.__defineGetter__(t,d)}}(self)),function(){window.loadSprite=function(e,t){function i(e,t){e.innerHTML=t,n.insertBefore(e,n.childNodes[0])}if("string"==typeof e){var n=document.body,o="cache-",r="string"==typeof t,s=!1,a=function(){if(!r)return!1;var e="___test";try{return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(e){return!1}}();if(!r||0===document.querySelectorAll("#"+t).length){var c=document.createElement("div");if(c.setAttribute("hidden",""),r&&c.setAttribute("id",t),a){var l=localStorage.getItem(o+t);if(s=null!==l){var u=JSON.parse(l);i(c,u.content)}}var d=new XMLHttpRequest;if(!("withCredentials"in d))return;d.open("GET",e,!0),d.onload=function(){a&&localStorage.setItem(o+t,JSON.stringify({content:d.responseText})),i(c,d.responseText)},d.send()}}}}(),function(){function e(e,t,i){if(e)if(e.classList)e.classList[i?"add":"remove"](t);else{var n=(" "+e.className+" ").replace(/\s+/g," ").replace(" "+t+" ","");e.className=n+(i?" "+t:"")}}function t(t,s){if(t in o&&(s||t!==r)&&(r.length||t!==o.video)){switch(t){case o.video:i.source({type:"video",title:"View From A Blue Moon",sources:[{src:"https://cdn.selz.com/plyr/1.5/View_From_A_Blue_Moon_Trailer-HD.mp4",type:"video/mp4"}],poster:"https://cdn.selz.com/plyr/1.5/View_From_A_Blue_Moon_Trailer-HD.jpg",tracks:[{kind:"captions",label:"English",srclang:"en",src:"https://cdn.selz.com/plyr/1.5/View_From_A_Blue_Moon_Trailer-HD.en.vtt",default:!0}]});break;case o.audio:i.source({type:"audio",title:"Kishi Bashi &ndash; &ldquo;It All Began With A Burst&rdquo;",sources:[{src:"https://cdn.selz.com/plyr/1.5/Kishi_Bashi_-_It_All_Began_With_a_Burst.mp3",type:"audio/mp3"},{src:"https://cdn.selz.com/plyr/1.5/Kishi_Bashi_-_It_All_Began_With_a_Burst.ogg",type:"audio/ogg"}]});break;case o.youtube:i.source({type:"video",title:"View From A Blue Moon",sources:[{src:"https://www.youtube.com/watch?v=bTqVqk7FSmY",type:"youtube"}]});break;case o.vimeo:i.source({type:"video",title:"View From A Blue Moon",sources:[{src:"https://vimeo.com/76979871",type:"vimeo"}]})}r=t;for(var a=n.length-1;a>=0;a--)e(n[a].parentElement,"active",!1);e(document.querySelector('[data-source="'+t+'"]').parentElement,"active",!0)}}var i=new Plyr("#player",{debug:!0,title:"View From A Blue Moon",iconUrl:"../dist/plyr.svg",tooltips:{controls:!0},captions:{defaultActive:!0},controls:["play-large","play","progress","current-time","mute","volume","captions","settings","fullscreen","pip","airplay"]});window.player=i,window.loadSprite("dist/demo.svg","demo-sprite");var n=document.querySelectorAll("[data-source]"),o={video:"video",audio:"audio",youtube:"youtube",vimeo:"vimeo"},r=window.location.hash.replace("#",""),s=window.history&&window.history.pushState;if([].forEach.call(n,function(e){e.addEventListener("click",function(){var e=this.getAttribute("data-source");t(e),s&&history.pushState({type:e},"","#"+e)})}),window.addEventListener("popstate",function(e){e.state&&"type"in e.state&&t(e.state.type)}),s){var a=!r.length;a&&(r=o.video),r in o&&history.replaceState({type:r},"",a?"":"#"+r),r!==o.video&&t(r,!0)}}(),"plyr.io"===window.location.host&&(!function(e,t,i,n,o,r,s){e.GoogleAnalyticsObject=o,e[o]=e[o]||function(){(e[o].q=e[o].q||[]).push(arguments)},e[o].l=1*new Date,r=t.createElement(i),s=t.getElementsByTagName(i)[0],r.async=1,r.src=n,s.parentNode.insertBefore(r,s)}(window,document,"script","//www.google-analytics.com/analytics.js","ga"),window.ga("create","UA-40881672-11","auto"),window.ga("send","pageview")); \ No newline at end of file
+"document"in self&&("classList"in document.createElement("_")?!function(){"use strict";var e=document.createElement("_");if(e.classList.add("c1","c2"),!e.classList.contains("c2")){var t=function(e){var t=DOMTokenList.prototype[e];DOMTokenList.prototype[e]=function(e){var i,n=arguments.length;for(i=0;i<n;i++)e=arguments[i],t.call(this,e)}};t("add"),t("remove")}if(e.classList.toggle("c3",!1),e.classList.contains("c3")){var i=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(e,t){return 1 in arguments&&!this.contains(e)==!t?t:i.call(this,e)}}e=null}():!function(e){"use strict";if("Element"in e){var t="classList",i="prototype",n=e.Element[i],o=Object,r=String[i].trim||function(){return this.replace(/^\s+|\s+$/g,"")},s=Array[i].indexOf||function(e){for(var t=0,i=this.length;t<i;t++)if(t in this&&this[t]===e)return t;return-1},a=function(e,t){this.name=e,this.code=DOMException[e],this.message=t},c=function(e,t){if(""===t)throw new a("SYNTAX_ERR","An invalid or illegal string was specified");if(/\s/.test(t))throw new a("INVALID_CHARACTER_ERR","String contains an invalid character");return s.call(e,t)},l=function(e){for(var t=r.call(e.getAttribute("class")||""),i=t?t.split(/\s+/):[],n=0,o=i.length;n<o;n++)this.push(i[n]);this._updateClassName=function(){e.setAttribute("class",this.toString())}},u=l[i]=[],d=function(){return new l(this)};if(a[i]=Error[i],u.item=function(e){return this[e]||null},u.contains=function(e){return e+="",c(this,e)!==-1},u.add=function(){var e,t=arguments,i=0,n=t.length,o=!1;do e=t[i]+"",c(this,e)===-1&&(this.push(e),o=!0);while(++i<n);o&&this._updateClassName()},u.remove=function(){var e,t,i=arguments,n=0,o=i.length,r=!1;do for(e=i[n]+"",t=c(this,e);t!==-1;)this.splice(t,1),r=!0,t=c(this,e);while(++n<o);r&&this._updateClassName()},u.toggle=function(e,t){e+="";var i=this.contains(e),n=i?t!==!0&&"remove":t!==!1&&"add";return n&&this[n](e),t===!0||t===!1?t:!i},u.toString=function(){return this.join(" ")},o.defineProperty){var p={get:d,enumerable:!0,configurable:!0};try{o.defineProperty(n,t,p)}catch(e){e.number===-2146823252&&(p.enumerable=!1,o.defineProperty(n,t,p))}}else o[i].__defineGetter__&&n.__defineGetter__(t,d)}}(self)),function(){window.loadSprite=function(e,t){function i(e,t){e.innerHTML=t,n.insertBefore(e,n.childNodes[0])}if("string"==typeof e){var n=document.body,o="cache-",r="string"==typeof t,s=!1,a=function(){if(!r)return!1;var e="___test";try{return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(e){return!1}}();if(!r||0===document.querySelectorAll("#"+t).length){var c=document.createElement("div");if(c.setAttribute("hidden",""),r&&c.setAttribute("id",t),a){var l=localStorage.getItem(o+t);if(s=null!==l){var u=JSON.parse(l);i(c,u.content)}}var d=new XMLHttpRequest;if(!("withCredentials"in d))return;d.open("GET",e,!0),d.onload=function(){a&&localStorage.setItem(o+t,JSON.stringify({content:d.responseText})),i(c,d.responseText)},d.send()}}}}(),function(){function e(e,t,i){if(e)if(e.classList)e.classList[i?"add":"remove"](t);else{var n=(" "+e.className+" ").replace(/\s+/g," ").replace(" "+t+" ","");e.className=n+(i?" "+t:"")}}function t(t,s){if(t in o&&(s||t!==r)&&(r.length||t!==o.video)){switch(t){case o.video:i.source({type:"video",title:"View From A Blue Moon",sources:[{src:"https://cdn.selz.com/plyr/1.5/View_From_A_Blue_Moon_Trailer-HD.mp4",type:"video/mp4"}],poster:"https://cdn.selz.com/plyr/1.5/View_From_A_Blue_Moon_Trailer-HD.jpg",tracks:[{kind:"captions",label:"English",srclang:"en",src:"https://cdn.selz.com/plyr/1.5/View_From_A_Blue_Moon_Trailer-HD.en.vtt",default:!0}]});break;case o.audio:i.source({type:"audio",title:"Kishi Bashi &ndash; &ldquo;It All Began With A Burst&rdquo;",sources:[{src:"https://cdn.selz.com/plyr/1.5/Kishi_Bashi_-_It_All_Began_With_a_Burst.mp3",type:"audio/mp3"},{src:"https://cdn.selz.com/plyr/1.5/Kishi_Bashi_-_It_All_Began_With_a_Burst.ogg",type:"audio/ogg"}]});break;case o.youtube:i.source({type:"video",title:"View From A Blue Moon",sources:[{src:"https://www.youtube.com/watch?v=bTqVqk7FSmY",type:"youtube"}]});break;case o.vimeo:i.source({type:"video",title:"View From A Blue Moon",sources:[{src:"https://vimeo.com/76979871",type:"vimeo"}]})}r=t;for(var a=n.length-1;a>=0;a--)e(n[a].parentElement,"active",!1);e(document.querySelector('[data-source="'+t+'"]').parentElement,"active",!0),[].forEach.call(document.querySelectorAll(".plyr__cite"),function(e){e.setAttribute("hidden","")}),document.querySelector(".plyr__cite--"+t).removeAttribute("hidden")}}var i=new Plyr("#player",{debug:!0,title:"View From A Blue Moon",iconUrl:"../dist/plyr.svg",tooltips:{controls:!0},captions:{defaultActive:!0},controls:["play-large","play","progress","current-time","mute","volume","captions","settings","fullscreen","pip","airplay"]});window.player=i,window.loadSprite("dist/demo.svg","demo-sprite");var n=document.querySelectorAll("[data-source]"),o={video:"video",audio:"audio",youtube:"youtube",vimeo:"vimeo"},r=window.location.hash.replace("#",""),s=window.history&&window.history.pushState;if([].forEach.call(n,function(e){e.addEventListener("click",function(){var e=this.getAttribute("data-source");t(e),s&&history.pushState({type:e},"","#"+e)})}),window.addEventListener("popstate",function(e){e.state&&"type"in e.state&&t(e.state.type)}),s){var a=!r.length;a&&(r=o.video),r in o&&history.replaceState({type:r},"",a?"":"#"+r),r!==o.video&&t(r,!0)}}(),"plyr.io"===window.location.host&&(!function(e,t,i,n,o,r,s){e.GoogleAnalyticsObject=o,e[o]=e[o]||function(){(e[o].q=e[o].q||[]).push(arguments)},e[o].l=1*new Date,r=t.createElement(i),s=t.getElementsByTagName(i)[0],r.async=1,r.src=n,s.parentNode.insertBefore(r,s)}(window,document,"script","//www.google-analytics.com/analytics.js","ga"),window.ga("create","UA-40881672-11","auto"),window.ga("send","pageview")); \ No newline at end of file
diff --git a/demo/index.html b/demo/index.html
index c844dcd7..886679a1 100644
--- a/demo/index.html
+++ b/demo/index.html
@@ -64,10 +64,36 @@
</video>
<ul>
- <li class="plyr__cite plyr__cite--video"><small><a href="http://viewfromabluemoon.com/" target="_blank">View From A Blue Moon</a> &copy; Brainfarm</small></li>
- <li class="plyr__cite plyr__cite--audio"><small><a href="http://www.kishibashi.com/" target="_blank">Kishi Bashi &ndash; &ldquo;It All Began With A Burst&rdquo;</a> &copy; Kishi Bashi</small></li>
- <li class="plyr__cite plyr__cite--youtube"><small><a href="https://www.youtube.com/watch?v=bTqVqk7FSmY" target="_blank">View From A Blue Moon</a> on <span class="color--youtube"><svg class="icon"><use xlink:href="#icon-youtube"/></svg>YouTube</span></small></li>
- <li class="plyr__cite plyr__cite--vimeo"><small><a href="https://vimeo.com/ondemand/viewfromabluemoon4k" target="_blank">View From A Blue Moon</a> on <span class="color--vimeo"><svg class="icon"><use xlink:href="#icon-vimeo"/></svg>Vimeo</span></small></li>
+ <li class="plyr__cite plyr__cite--video" hidden>
+ <small>
+ <a href="http://viewfromabluemoon.com/" target="_blank">View From A Blue Moon</a> &copy; Brainfarm
+ </small>
+ </li>
+ <li class="plyr__cite plyr__cite--audio" hidden>
+ <small>
+ <a href="http://www.kishibashi.com/" target="_blank">Kishi Bashi &ndash; &ldquo;It All Began With A Burst&rdquo;</a> &copy; Kishi Bashi
+ </small>
+ </li>
+ <li class="plyr__cite plyr__cite--youtube" hidden>
+ <small>
+ <a href="https://www.youtube.com/watch?v=bTqVqk7FSmY" target="_blank">View From A Blue Moon</a> on
+ <span class="color--youtube">
+ <svg class="icon">
+ <use xlink:href="#icon-youtube"/>
+ </svg> YouTube
+ </span>
+ </small>
+ </li>
+ <li class="plyr__cite plyr__cite--vimeo" hidden>
+ <small>
+ <a href="https://vimeo.com/ondemand/viewfromabluemoon4k" target="_blank">View From A Blue Moon</a> on
+ <span class="color--vimeo">
+ <svg class="icon">
+ <use xlink:href="#icon-vimeo"/>
+ </svg> Vimeo
+ </span>
+ </small>
+ </li>
</ul>
</section>
</main>
diff --git a/demo/src/js/main.js b/demo/src/js/main.js
index ee45d118..3d44b94f 100644
--- a/demo/src/js/main.js
+++ b/demo/src/js/main.js
@@ -185,6 +185,12 @@
// Set active on parent
toggleClass(document.querySelector('[data-source="' + type + '"]').parentElement, 'active', true);
+
+ // Show cite
+ [].forEach.call(document.querySelectorAll('.plyr__cite'), function(cite) {
+ cite.setAttribute('hidden', '');
+ });
+ document.querySelector('.plyr__cite--' + type).removeAttribute('hidden');
}
})();
diff --git a/demo/src/less/components/base.less b/demo/src/less/components/base.less
index 502196cf..7f71dbb4 100644
--- a/demo/src/less/components/base.less
+++ b/demo/src/less/components/base.less
@@ -2,10 +2,10 @@
// Base layout
// ==========================================================================
-// BORDER-BOX ALL THE THINGS!
+// BORDER-BOX ALL THE THINGS!
// http://paulirish.com/2012/box-sizing-border-box-ftw/
-*, *::after, *::before {
- box-sizing: border-box;
+*, *::after, *::before {
+ box-sizing: border-box;
}
// Hidden
@@ -15,11 +15,11 @@
// Base
html {
- height: 100%;
- background: @body-background fixed;
+ background: @body-background;
}
body {
- margin: 0;
+ max-width: @container-width;
+ margin: auto;
padding: (@padding-base / 2);
}
@@ -31,6 +31,7 @@ header {
p {
.font-size(18);
}
+
@media (min-width: @screen-sm) {
padding-top: (@padding-base * 3);
padding-bottom: (@padding-base * 3);
@@ -39,8 +40,7 @@ header {
// Sections
section {
- max-width: @example-width-video;
- margin: 0 auto @padding-base;
+ margin-bottom: @padding-base;
@media (min-width: @screen-sm) {
margin-bottom: (@padding-base * 2);
diff --git a/demo/src/less/components/buttons.less b/demo/src/less/components/buttons.less
index c99a0836..23cc3e7f 100644
--- a/demo/src/less/components/buttons.less
+++ b/demo/src/less/components/buttons.less
@@ -3,170 +3,162 @@
// ==========================================================================
nav {
- ul {
- list-style: none;
- margin: 0;
- padding: 0;
- font-size: 0;
- }
- li {
- display: inline-block;
- margin-top: (@padding-base / 2);
- .font-size();
- white-space: nowrap;
- }
- li + li {
- margin-left: @padding-base;
- }
+ ul {
+ list-style: none;
+ margin: 0;
+ padding: 0;
+ font-size: 0;
+ }
+ li {
+ display: inline-block;
+ margin-top: (@padding-base / 2);
+ .font-size();
+ white-space: nowrap;
+ }
+ li + li {
+ margin-left: @padding-base;
+ }
}
// Tabs
.btn__bar {
- position: relative;
- margin: 0 auto @padding-base;
- max-width: @example-width-video;
- white-space: nowrap;
-
- &::before {
- content: "";
- position: absolute;
- top: 50%;
- left: 0;
- right: 0;
- height: 1px;
- background: @gray-lighter;
- }
-
- ul {
- position: relative;
- z-index: 1;
- display: inline-block;
- user-select: none;
- }
- li {
- margin: 0;
-
- &:first-child .btn {
- border-radius: 4px 0 0 4px;
- }
- &:last-child .btn {
- border-radius: 0 4px 4px 0;
- }
- & + li .btn {
- margin-left: -1px;
- }
-
- &.active .btn {
- &:extend(.btn--primary);
- box-shadow: inset 0 1px 1px rgba(0,0,0, .2);
- position: relative;
- z-index: 1;
-
- .icon {
- color: inherit;
- }
- }
- &.active + li .btn:hover {
- z-index: 0;
- }
- }
- .btn {
- position: relative;
- display: block;
- border-radius: 0;
-
- &:hover,
- &:focus {
- z-index: 1;
- }
- }
-
- @media (min-width: 560px) {
- margin-bottom: (@padding-base * 2);
- }
+ position: relative;
+ margin: 0 auto @padding-base;
+ white-space: nowrap;
+
+ &::before {
+ content: "";
+ position: absolute;
+ top: 50%;
+ left: 0;
+ right: 0;
+ height: 1px;
+ background: @off-white;
+ }
+
+ ul {
+ position: relative;
+ z-index: 1;
+ display: inline-block;
+ }
+ li {
+ margin: 0;
+
+ &:first-child .btn {
+ border-radius: 4px 0 0 4px;
+ }
+ &:last-child .btn {
+ border-radius: 0 4px 4px 0;
+ }
+ & + li .btn {
+ margin-left: -1px;
+ }
+
+ &.active .btn {
+ &:extend(.btn--primary);
+ position: relative;
+ z-index: 1;
+
+ .icon {
+ color: inherit;
+ }
+ }
+ &.active + li .btn:hover {
+ z-index: 0;
+ }
+ }
+ .btn {
+ position: relative;
+ display: block;
+ border-radius: 0;
+
+ &:hover,
+ &:focus {
+ z-index: 1;
+ }
+ }
+
+ @media (min-width: 560px) {
+ margin-bottom: (@padding-base * 2);
+ }
}
// Shared
.btn,
.btn__count {
- display: inline-block;
- vertical-align: middle;
- border-radius: @border-radius-base;
- user-select: none;
- font-weight: @font-weight-bold;
+ display: inline-block;
+ vertical-align: middle;
+ border-radius: @border-radius-base;
+ user-select: none;
+ font-weight: @font-weight-bold;
}
// Buttons
.btn {
- padding: (@padding-base / 2) ((@padding-base / 2) + 2);
- background: linear-gradient(lighten(@off-white, 2%), darken(@off-white, 3%));
- border: 1px solid @gray-light;
- box-shadow: 0 1px 1px rgba(0,0,0, .05);
- text-shadow: 0 1px 1px #fff;
- color: @gray;
- transition: background .1s ease, color .1s ease;
- .font-size(@font-size-small);
-
- &:hover,
- &:focus {
- border-color: darken(@gray-light, 8%);
- color: @gray;
- outline: 0;
- }
+ padding: (@padding-base / 2) ((@padding-base / 2) + 2);
+ background: #fff;
+ border: 1px solid @gray-lighter;
+ color: @gray;
+ transition: all .2s ease;
+ .font-size(@font-size-small);
+
+ &:hover,
+ &:focus {
+ border-color: @gray-light;
+ }
}
// Sizes
.btn--large {
- padding: (@padding-base / 2) @padding-base;
- .font-size();
+ padding: (@padding-base / 2) @padding-base;
+ .font-size();
}
// Styles
.btn--primary {
- background-image: linear-gradient(@link-color, darken(@link-color, 5%));
- background-color: @link-color;
- border-color: darken(@link-color, 10%);
- box-shadow: 0 1px 1px rgba(0,0,0, .15);
- text-shadow: 0 1px 1px rgba(0,0,0, .1);
- color: #fff;
-
- &:hover,
- &:focus {
- color: #fff;
- border-color: darken(@link-color, 20%);
- }
+ @border-color: darken(@link-color, 5%);
+ background-image: linear-gradient(@link-color, @border-color);
+ background-color: @link-color;
+ border-color: @border-color;
+ color: #fff;
+
+ &:hover,
+ &:focus {
+ color: #fff;
+ border-color: darken(@border-color, 5%);
+ }
}
.btn--youtube .icon {
- color: @color-youtube;
+ color: @color-youtube;
}
.btn--vimeo .icon {
- color: @color-vimeo;
+ color: @color-vimeo;
}
.btn--twitter .icon {
- color: @color-twitter;
+ color: @color-twitter;
}
// Count bubble
.btn__count {
- position: relative;
- margin-left: (@padding-base / 2);
- padding: (@padding-base / 2) (@padding-base * .75);
- background: #fff;
- border: 1px solid @gray-light;
-
- &::before {
- content: "";
- position: absolute;
- display: block;
- width: @arrow-size;
- height: @arrow-size;
- left: 1px;
- top: 50%;
- margin-top: -(@arrow-size / 2);
-
- background: inherit;
- border: inherit;
- border-width: 1px 0 0 1px;
- transform: rotate(-45deg) translate(-50%, -50%);
- }
+ position: relative;
+ margin-left: (@padding-base / 2);
+ padding: (@padding-base / 2) (@padding-base * .75);
+ background: #fff;
+ border: 1px solid @gray-lighter;
+
+ &::before {
+ content: "";
+ position: absolute;
+ display: block;
+ width: @arrow-size;
+ height: @arrow-size;
+ left: 1px;
+ top: 50%;
+ margin-top: -(@arrow-size / 2);
+
+ background: inherit;
+ border: inherit;
+ border-width: 1px 0 0 1px;
+ transform: rotate(-45deg) translate(-50%, -50%);
+ }
}
diff --git a/demo/src/less/components/examples.less b/demo/src/less/components/examples.less
index a9e72d21..ff22e37b 100644
--- a/demo/src/less/components/examples.less
+++ b/demo/src/less/components/examples.less
@@ -30,17 +30,5 @@ video {
// Style full supported player
.plyr__cite {
- display: none;
margin-top: @padding-base;
-
- .icon {
- margin-right: (@padding-base / 4);
- }
-}
-
-.plyr--video:not(.plyr--youtube):not(.plyr--vimeo) ~ ul .plyr__cite--video,
-.plyr--audio ~ ul .plyr__cite--audio,
-.plyr--youtube ~ ul .plyr__cite--youtube,
-.plyr--vimeo ~ ul .plyr__cite--vimeo {
- display: block;
}
diff --git a/demo/src/less/components/type.less b/demo/src/less/components/type.less
index 951be36d..1f16161a 100644
--- a/demo/src/less/components/type.less
+++ b/demo/src/less/components/type.less
@@ -51,22 +51,22 @@ li {
a {
text-decoration: none;
color: @link-color;
- border-bottom: 1px dotted currentColor;
- transition: background .3s ease, color .3s ease, border .3s ease;
+ transition: color .3s ease;
&:hover,
&:focus {
color: @gray-dark;
- border-bottom-color: rgba(0,0,0,0);
- }
- &:focus {
- .tab-focus();
}
&.logo {
border: 0;
}
}
+a:focus,
+button:focus {
+ .tab-focus();
+}
+
.color--vimeo {
color: @color-vimeo;
}
diff --git a/demo/src/less/variables.less b/demo/src/less/variables.less
index 4768cdd6..7f684ba1 100644
--- a/demo/src/less/variables.less
+++ b/demo/src/less/variables.less
@@ -9,7 +9,7 @@
@gray-lighter: #dbe3e8;
@off-white: #f2f5f7;
-@brand-primary: #3498db;
+@brand-primary: #22b5ff;
@brand-secondary: #02BD9B;
// Brands
@@ -18,7 +18,7 @@
@color-vimeo: #19b7ed;
// Base
-@body-background: @off-white; //linear-gradient(to left top, @brand-secondary, @brand-primary);
+@body-background: #fff;
// Type
@font-size-base: 16;
@@ -45,4 +45,4 @@
// Examples
@example-width-audio: 520px;
-@example-width-video: 1200px;
+@container-width: 800px;