Compare commits
36 Commits
Author | SHA1 | Date | |
---|---|---|---|
d7cc29f2fb | |||
0505e49038 | |||
6ff1e47341 | |||
e72a91de6e | |||
52ec4c012d | |||
ae89c92ab6 | |||
57ad124ce8 | |||
a85d45d2e5 | |||
a6f57fc034 | |||
04c9653b86 | |||
b8cdc71001 | |||
277ebf0fd1 | |||
7682d998e7 | |||
05b9b9a831 | |||
eee699cec6 | |||
3c9e9862d8 | |||
39dc651a9d | |||
4effda125a | |||
bf9de231d8 | |||
ef12332505 | |||
1b735f1727 | |||
7f7ecf852e | |||
931672895f | |||
0952bc8239 | |||
7e7508ca82 | |||
095d100ba4 | |||
c61fad51c1 | |||
7b11c6803d | |||
9b75436380 | |||
be19b72719 | |||
2fdcc18356 | |||
cb591dac0c | |||
4c1cdea56e | |||
80cfabbaf9 | |||
c7d28b09c0 | |||
161dd48312 |
51
changelog.md
51
changelog.md
@ -1,5 +1,56 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## v1.8.12
|
||||||
|
- Vimeo keyboard focus fix (Fixes #317)
|
||||||
|
- Fix for Vimeo on basic support devices
|
||||||
|
|
||||||
|
## v1.8.11
|
||||||
|
- Fix for keyboard navigation on Vimeo (Fixes #317)
|
||||||
|
- Fix for bug introduced in v1.8.9 related to additional controls
|
||||||
|
- Vimeo API upgrade
|
||||||
|
- Fix for YouTube bug introduced in v1.8.9
|
||||||
|
- Added support for passing array to .setup() (Fixes #319)
|
||||||
|
|
||||||
|
## v1.8.10
|
||||||
|
- Fix for seek issues introduced in v1.8.9
|
||||||
|
|
||||||
|
## v1.8.9
|
||||||
|
- Fix for fullscreen not being defined (Fixes #295)
|
||||||
|
- Fix for multiline captions (Fixes #314)
|
||||||
|
- Clean up of type checks and fix for `restart()` (Fixes #315)
|
||||||
|
- Fix for `MEDIA_ERR_SRC_NOT_SUPPORTED` when calling `.source()` API method
|
||||||
|
|
||||||
|
## v1.8.8
|
||||||
|
- Added getCurrentTime API method (fixes #292)
|
||||||
|
- Fix for !hideControls on touch devices (fixes #303)
|
||||||
|
|
||||||
|
## v1.8.7
|
||||||
|
- Line height fix
|
||||||
|
|
||||||
|
## v1.8.6
|
||||||
|
- Reverted font size change
|
||||||
|
|
||||||
|
## v1.8.5
|
||||||
|
- Fixed overflow issues (fixes #286)
|
||||||
|
|
||||||
|
## v1.8.4
|
||||||
|
- Fix for large play button on small videos
|
||||||
|
|
||||||
|
## v1.8.3
|
||||||
|
- Disabled iPad support for YouTube and Vimeo due to iOS limitations with iFrame playback
|
||||||
|
- Fixed IE11 icon loading (fixes #269)
|
||||||
|
- Updated screenshot (fixes #281)
|
||||||
|
- Added WordPress plugin (fixes #239)
|
||||||
|
- Added Neos plugin
|
||||||
|
- Added HLS, Shaka and dash.js examples (see #235 for more)
|
||||||
|
- Improvements for controls hiding and showing on touch devices
|
||||||
|
|
||||||
|
## v1.8.2
|
||||||
|
- Fixed event bubbling
|
||||||
|
|
||||||
|
## v1.8.1
|
||||||
|
- Fixed inaccurate log message
|
||||||
|
|
||||||
# v1.8.0
|
# v1.8.0
|
||||||
- ***(Important)*** `setup()` now returns the element Plyr was setup on rather than the `plyr` object. This means `var player = plyr.setup()[0];` would now be `var player = plyr.setup()[0].plyr;`. This improves support for React and other virtual dom frameworks as mentioned in #254
|
- ***(Important)*** `setup()` now returns the element Plyr was setup on rather than the `plyr` object. This means `var player = plyr.setup()[0];` would now be `var player = plyr.setup()[0].plyr;`. This improves support for React and other virtual dom frameworks as mentioned in #254
|
||||||
- Fixed using a relative URL for `iconUrl` in IE (fixes #269)
|
- Fixed using a relative URL for `iconUrl` in IE (fixes #269)
|
||||||
|
2
demo/dist/demo.css
vendored
2
demo/dist/demo.css
vendored
File diff suppressed because one or more lines are too long
2
demo/dist/demo.js
vendored
2
demo/dist/demo.js
vendored
@ -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,s=arguments.length;for(i=0;s>i;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",s=e.Element[i],o=Object,n=String[i].trim||function(){return this.replace(/^\s+|\s+$/g,"")},r=Array[i].indexOf||function(e){for(var t=0,i=this.length;i>t;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 r.call(e,t)},l=function(e){for(var t=n.call(e.getAttribute("class")||""),i=t?t.split(/\s+/):[],s=0,o=i.length;o>s;s++)this.push(i[s]);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+="",-1!==c(this,e)},u.add=function(){var e,t=arguments,i=0,s=t.length,o=!1;do e=t[i]+"",-1===c(this,e)&&(this.push(e),o=!0);while(++i<s);o&&this._updateClassName()},u.remove=function(){var e,t,i=arguments,s=0,o=i.length,n=!1;do for(e=i[s]+"",t=c(this,e);-1!==t;)this.splice(t,1),n=!0,t=c(this,e);while(++s<o);n&&this._updateClassName()},u.toggle=function(e,t){e+="";var i=this.contains(e),s=i?t!==!0&&"remove":t!==!1&&"add";return s&&this[s](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(s,t,p)}catch(h){-2146823252===h.number&&(p.enumerable=!1,o.defineProperty(s,t,p))}}else o[i].__defineGetter__&&s.__defineGetter__(t,d)}}(self)),function(){function e(e,t,i){if(e)if(e.classList)e.classList[i?"add":"remove"](t);else{var s=(" "+e.className+" ").replace(/\s+/g," ").replace(" "+t+" ","");e.className=s+(i?" "+t:"")}}function t(t,i){if(t in n&&(i||t!=r)&&(r.length||t!=n.video)){switch(t){case n.video:s.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"},{src:"https://cdn.selz.com/plyr/1.5/View_From_A_Blue_Moon_Trailer-HD.webm",type:"video/webm"}],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 n.audio:s.source({type:"audio",title:"Kishi Bashi – “It All Began With A Burst”",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 n.youtube:s.source({type:"video",title:"View From A Blue Moon",sources:[{src:"bTqVqk7FSmY",type:"youtube"}]});break;case n.vimeo:s.source({type:"video",title:"View From A Blue Moon",sources:[{src:"143418951",type:"vimeo"}]})}r=t;for(var a=o.length-1;a>=0;a--)e(o[a].parentElement,"active",!1);e(document.querySelector('[data-source="'+t+'"]').parentElement,"active",!0)}}var i=plyr.setup({debug:!0,title:"Video demo",iconUrl:"../dist/plyr.svg",tooltips:{controls:!0},captions:{defaultActive:!0}});plyr.loadSprite("dist/demo.svg");for(var s=i[0].plyr,o=document.querySelectorAll("[data-source]"),n={video:"video",audio:"audio",youtube:"youtube",vimeo:"vimeo"},r=window.location.hash.replace("#",""),a=window.history&&window.history.pushState,c=o.length-1;c>=0;c--)o[c].addEventListener("click",function(){var e=this.getAttribute("data-source");t(e),a&&history.pushState({type:e},"","#"+e)});if(window.addEventListener("popstate",function(e){e.state&&"type"in e.state&&t(e.state.type)}),a){var l=!r.length;l&&(r=n.video),r in n&&history.replaceState({type:r},"",l?"":"#"+r),r!==n.video&&t(r,!0)}}(),document.domain.indexOf("plyr.io")>-1&&(!function(e,t,i,s,o,n,r){e.GoogleAnalyticsObject=o,e[o]=e[o]||function(){(e[o].q=e[o].q||[]).push(arguments)},e[o].l=1*new Date,n=t.createElement(i),r=t.getElementsByTagName(i)[0],n.async=1,n.src=s,r.parentNode.insertBefore(n,r)}(window,document,"script","//www.google-analytics.com/analytics.js","ga"),ga("create","UA-40881672-11","auto"),ga("send","pageview"));
|
"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,o=arguments.length;for(i=0;o>i;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",o=e.Element[i],n=Object,s=String[i].trim||function(){return this.replace(/^\s+|\s+$/g,"")},r=Array[i].indexOf||function(e){for(var t=0,i=this.length;i>t;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 r.call(e,t)},l=function(e){for(var t=s.call(e.getAttribute("class")||""),i=t?t.split(/\s+/):[],o=0,n=i.length;n>o;o++)this.push(i[o]);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+="",-1!==c(this,e)},u.add=function(){var e,t=arguments,i=0,o=t.length,n=!1;do e=t[i]+"",-1===c(this,e)&&(this.push(e),n=!0);while(++i<o);n&&this._updateClassName()},u.remove=function(){var e,t,i=arguments,o=0,n=i.length,s=!1;do for(e=i[o]+"",t=c(this,e);-1!==t;)this.splice(t,1),s=!0,t=c(this,e);while(++o<n);s&&this._updateClassName()},u.toggle=function(e,t){e+="";var i=this.contains(e),o=i?t!==!0&&"remove":t!==!1&&"add";return o&&this[o](e),t===!0||t===!1?t:!i},u.toString=function(){return this.join(" ")},n.defineProperty){var p={get:d,enumerable:!0,configurable:!0};try{n.defineProperty(o,t,p)}catch(h){-2146823252===h.number&&(p.enumerable=!1,n.defineProperty(o,t,p))}}else n[i].__defineGetter__&&o.__defineGetter__(t,d)}}(self)),function(){function e(e,t,i){if(e)if(e.classList)e.classList[i?"add":"remove"](t);else{var o=(" "+e.className+" ").replace(/\s+/g," ").replace(" "+t+" ","");e.className=o+(i?" "+t:"")}}function t(t,i){if(t in s&&(i||t!=r)&&(r.length||t!=s.video)){switch(t){case s.video:o.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"},{src:"https://cdn.selz.com/plyr/1.5/View_From_A_Blue_Moon_Trailer-HD.webm",type:"video/webm"}],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 s.audio:o.source({type:"audio",title:"Kishi Bashi – “It All Began With A Burst”",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 s.youtube:o.source({type:"video",title:"View From A Blue Moon",sources:[{src:"bTqVqk7FSmY",type:"youtube"}]});break;case s.vimeo:o.source({type:"video",title:"View From A Blue Moon",sources:[{src:"143418951",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)}}document.body.addEventListener("ready",function(e){console.log(e)});var i=plyr.setup({debug:!0,title:"Video demo",iconUrl:"../dist/plyr.svg",tooltips:{controls:!0},captions:{defaultActive:!0}});plyr.loadSprite("dist/demo.svg");for(var o=i[0].plyr,n=document.querySelectorAll("[data-source]"),s={video:"video",audio:"audio",youtube:"youtube",vimeo:"vimeo"},r=window.location.hash.replace("#",""),a=window.history&&window.history.pushState,c=n.length-1;c>=0;c--)n[c].addEventListener("click",function(){var e=this.getAttribute("data-source");t(e),a&&history.pushState({type:e},"","#"+e)});if(window.addEventListener("popstate",function(e){e.state&&"type"in e.state&&t(e.state.type)}),a){var l=!r.length;l&&(r=s.video),r in s&&history.replaceState({type:r},"",l?"":"#"+r),r!==s.video&&t(r,!0)}}(),document.domain.indexOf("plyr.io")>-1&&(!function(e,t,i,o,n,s,r){e.GoogleAnalyticsObject=n,e[n]=e[n]||function(){(e[n].q=e[n].q||[]).push(arguments)},e[n].l=1*new Date,s=t.createElement(i),r=t.getElementsByTagName(i)[0],s.async=1,s.src=o,r.parentNode.insertBefore(s,r)}(window,document,"script","//www.google-analytics.com/analytics.js","ga"),ga("create","UA-40881672-11","auto"),ga("send","pageview"));
|
@ -79,7 +79,7 @@
|
|||||||
<script src="dist/demo.js"></script>
|
<script src="dist/demo.js"></script>
|
||||||
|
|
||||||
<!-- Rangetouch to fix <input type="range"> on touch devices (see https://rangetouch.com) -->
|
<!-- Rangetouch to fix <input type="range"> on touch devices (see https://rangetouch.com) -->
|
||||||
<script src="https://cdn.rangetouch.com/0.0.9/rangetouch.js"></script>
|
<script src="https://cdn.rangetouch.com/0.0.9/rangetouch.js" async></script>
|
||||||
|
|
||||||
<!-- Sharing libary (https://shr.one) -->
|
<!-- Sharing libary (https://shr.one) -->
|
||||||
<script src="https://cdn.shr.one/0.1.9/shr.js"></script>
|
<script src="https://cdn.shr.one/0.1.9/shr.js"></script>
|
||||||
|
@ -8,76 +8,78 @@
|
|||||||
|
|
||||||
// General functions
|
// General functions
|
||||||
;(function() {
|
;(function() {
|
||||||
// Setup the player
|
document.body.addEventListener('ready', function(event) { console.log(event); });
|
||||||
var instances = plyr.setup({
|
|
||||||
debug: true,
|
// Setup the player
|
||||||
title: 'Video demo',
|
var instances = plyr.setup({
|
||||||
iconUrl: '../dist/plyr.svg',
|
debug: true,
|
||||||
tooltips: {
|
title: 'Video demo',
|
||||||
controls: true
|
iconUrl: '../dist/plyr.svg',
|
||||||
},
|
tooltips: {
|
||||||
captions: {
|
controls: true
|
||||||
defaultActive: true
|
},
|
||||||
}
|
captions: {
|
||||||
});
|
defaultActive: true
|
||||||
plyr.loadSprite('dist/demo.svg');
|
}
|
||||||
|
});
|
||||||
|
plyr.loadSprite('dist/demo.svg');
|
||||||
|
|
||||||
// Plyr returns an array regardless
|
// Plyr returns an array regardless
|
||||||
var player = instances[0].plyr;
|
var player = instances[0].plyr;
|
||||||
|
|
||||||
// Setup type toggle
|
// Setup type toggle
|
||||||
var buttons = document.querySelectorAll('[data-source]'),
|
var buttons = document.querySelectorAll('[data-source]'),
|
||||||
types = {
|
types = {
|
||||||
video: 'video',
|
video: 'video',
|
||||||
audio: 'audio',
|
audio: 'audio',
|
||||||
youtube: 'youtube',
|
youtube: 'youtube',
|
||||||
vimeo: 'vimeo'
|
vimeo: 'vimeo'
|
||||||
},
|
},
|
||||||
currentType = window.location.hash.replace('#', ''),
|
currentType = window.location.hash.replace('#', ''),
|
||||||
historySupport = (window.history && window.history.pushState);
|
historySupport = (window.history && window.history.pushState);
|
||||||
|
|
||||||
// Bind to each button
|
// Bind to each button
|
||||||
for (var i = buttons.length - 1; i >= 0; i--) {
|
for (var i = buttons.length - 1; i >= 0; i--) {
|
||||||
buttons[i].addEventListener('click', function() {
|
buttons[i].addEventListener('click', function() {
|
||||||
var type = this.getAttribute('data-source');
|
var type = this.getAttribute('data-source');
|
||||||
|
|
||||||
newSource(type);
|
newSource(type);
|
||||||
|
|
||||||
if (historySupport) {
|
if (historySupport) {
|
||||||
history.pushState({ 'type': type }, '', '#' + type);
|
history.pushState({ 'type': type }, '', '#' + type);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// List for backwards/forwards
|
// List for backwards/forwards
|
||||||
window.addEventListener('popstate', function(event) {
|
window.addEventListener('popstate', function(event) {
|
||||||
if(event.state && 'type' in event.state) {
|
if(event.state && 'type' in event.state) {
|
||||||
newSource(event.state.type);
|
newSource(event.state.type);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// On load
|
// On load
|
||||||
if(historySupport) {
|
if(historySupport) {
|
||||||
var video = !currentType.length;
|
var video = !currentType.length;
|
||||||
|
|
||||||
// If there's no current type set, assume video
|
// If there's no current type set, assume video
|
||||||
if(video) {
|
if(video) {
|
||||||
currentType = types.video;
|
currentType = types.video;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Replace current history state
|
// Replace current history state
|
||||||
if(currentType in types) {
|
if(currentType in types) {
|
||||||
history.replaceState({ 'type': currentType }, '', (video ? '' : '#' + currentType));
|
history.replaceState({ 'type': currentType }, '', (video ? '' : '#' + currentType));
|
||||||
}
|
}
|
||||||
|
|
||||||
// If it's not video, load the source
|
// If it's not video, load the source
|
||||||
if(currentType !== types.video) {
|
if(currentType !== types.video) {
|
||||||
newSource(currentType, true);
|
newSource(currentType, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Toggle class on an element
|
// Toggle class on an element
|
||||||
function toggleClass(element, className, state) {
|
function toggleClass(element, className, state) {
|
||||||
if (element) {
|
if (element) {
|
||||||
if (element.classList) {
|
if (element.classList) {
|
||||||
element.classList[state ? 'add' : 'remove'](className);
|
element.classList[state ? 'add' : 'remove'](className);
|
||||||
@ -89,95 +91,95 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set a new source
|
// Set a new source
|
||||||
function newSource(type, init) {
|
function newSource(type, init) {
|
||||||
// Bail if new type isn't known, it's the current type, or current type is empty (video is default) and new type is video
|
// Bail if new type isn't known, it's the current type, or current type is empty (video is default) and new type is video
|
||||||
if(!(type in types) || (!init && type == currentType) || (!currentType.length && type == types.video)) {
|
if(!(type in types) || (!init && type == currentType) || (!currentType.length && type == types.video)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch(type) {
|
switch(type) {
|
||||||
case types.video:
|
case types.video:
|
||||||
player.source({
|
player.source({
|
||||||
type: 'video',
|
type: 'video',
|
||||||
title: 'View From A Blue Moon',
|
title: 'View From A Blue Moon',
|
||||||
sources: [{
|
sources: [{
|
||||||
src: 'https://cdn.selz.com/plyr/1.5/View_From_A_Blue_Moon_Trailer-HD.mp4',
|
src: 'https://cdn.selz.com/plyr/1.5/View_From_A_Blue_Moon_Trailer-HD.mp4',
|
||||||
type: 'video/mp4'
|
type: 'video/mp4'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
src: 'https://cdn.selz.com/plyr/1.5/View_From_A_Blue_Moon_Trailer-HD.webm',
|
src: 'https://cdn.selz.com/plyr/1.5/View_From_A_Blue_Moon_Trailer-HD.webm',
|
||||||
type: 'video/webm'
|
type: 'video/webm'
|
||||||
}],
|
}],
|
||||||
poster: 'https://cdn.selz.com/plyr/1.5/View_From_A_Blue_Moon_Trailer-HD.jpg',
|
poster: 'https://cdn.selz.com/plyr/1.5/View_From_A_Blue_Moon_Trailer-HD.jpg',
|
||||||
tracks: [{
|
tracks: [{
|
||||||
kind: 'captions',
|
kind: 'captions',
|
||||||
label: 'English',
|
label: 'English',
|
||||||
srclang:'en',
|
srclang:'en',
|
||||||
src: 'https://cdn.selz.com/plyr/1.5/View_From_A_Blue_Moon_Trailer-HD.en.vtt',
|
src: 'https://cdn.selz.com/plyr/1.5/View_From_A_Blue_Moon_Trailer-HD.en.vtt',
|
||||||
default: true
|
default: true
|
||||||
}]
|
}]
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case types.audio:
|
case types.audio:
|
||||||
player.source({
|
player.source({
|
||||||
type: 'audio',
|
type: 'audio',
|
||||||
title: 'Kishi Bashi – “It All Began With A Burst”',
|
title: 'Kishi Bashi – “It All Began With A Burst”',
|
||||||
sources: [{
|
sources: [{
|
||||||
src: 'https://cdn.selz.com/plyr/1.5/Kishi_Bashi_-_It_All_Began_With_a_Burst.mp3',
|
src: 'https://cdn.selz.com/plyr/1.5/Kishi_Bashi_-_It_All_Began_With_a_Burst.mp3',
|
||||||
type: 'audio/mp3'
|
type: 'audio/mp3'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
src: 'https://cdn.selz.com/plyr/1.5/Kishi_Bashi_-_It_All_Began_With_a_Burst.ogg',
|
src: 'https://cdn.selz.com/plyr/1.5/Kishi_Bashi_-_It_All_Began_With_a_Burst.ogg',
|
||||||
type: 'audio/ogg'
|
type: 'audio/ogg'
|
||||||
}]
|
}]
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case types.youtube:
|
case types.youtube:
|
||||||
player.source({
|
player.source({
|
||||||
type: 'video',
|
type: 'video',
|
||||||
title: 'View From A Blue Moon',
|
title: 'View From A Blue Moon',
|
||||||
sources: [{
|
sources: [{
|
||||||
src: 'bTqVqk7FSmY',
|
src: 'bTqVqk7FSmY',
|
||||||
type: 'youtube'
|
type: 'youtube'
|
||||||
}]
|
}]
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case types.vimeo:
|
case types.vimeo:
|
||||||
player.source({
|
player.source({
|
||||||
type: 'video',
|
type: 'video',
|
||||||
title: 'View From A Blue Moon',
|
title: 'View From A Blue Moon',
|
||||||
sources: [{
|
sources: [{
|
||||||
src: '143418951',
|
src: '143418951',
|
||||||
type: 'vimeo'
|
type: 'vimeo'
|
||||||
}]
|
}]
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the current type for next time
|
// Set the current type for next time
|
||||||
currentType = type;
|
currentType = type;
|
||||||
|
|
||||||
// Remove active classes
|
// Remove active classes
|
||||||
for (var x = buttons.length - 1; x >= 0; x--) {
|
for (var x = buttons.length - 1; x >= 0; x--) {
|
||||||
toggleClass(buttons[x].parentElement, 'active', false);
|
toggleClass(buttons[x].parentElement, 'active', false);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set active on parent
|
// Set active on parent
|
||||||
toggleClass(document.querySelector('[data-source="'+ type +'"]').parentElement, 'active', true);
|
toggleClass(document.querySelector('[data-source="'+ type +'"]').parentElement, 'active', true);
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
|
|
||||||
// Google analytics
|
// Google analytics
|
||||||
// For demo site (http://[www.]plyr.io) only
|
// For demo site (http://[www.]plyr.io) only
|
||||||
if(document.domain.indexOf('plyr.io') > -1) {
|
if(document.domain.indexOf('plyr.io') > -1) {
|
||||||
(function(i,s,o,g,r,a,m){i.GoogleAnalyticsObject=r;i[r]=i[r]||function(){
|
(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),
|
(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)
|
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');
|
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
||||||
ga('create', 'UA-40881672-11', 'auto');
|
ga('create', 'UA-40881672-11', 'auto');
|
||||||
ga('send', 'pageview');
|
ga('send', 'pageview');
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@ video {
|
|||||||
.plyr--audio {
|
.plyr--audio {
|
||||||
max-width: @example-width-audio;
|
max-width: @example-width-audio;
|
||||||
}
|
}
|
||||||
.plyr--video::after {
|
.plyr__video-wrapper::after {
|
||||||
content: "";
|
content: "";
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
2
dist/plyr.css
vendored
2
dist/plyr.css
vendored
File diff suppressed because one or more lines are too long
4
dist/plyr.js
vendored
4
dist/plyr.js
vendored
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "plyr",
|
"name": "plyr",
|
||||||
"version": "1.8.0",
|
"version": "1.8.12",
|
||||||
"description": "A simple, accessible and customizable HTML5, YouTube and Vimeo media player",
|
"description": "A simple, accessible and customizable HTML5, YouTube and Vimeo media player",
|
||||||
"homepage": "http://plyr.io",
|
"homepage": "http://plyr.io",
|
||||||
"main": "src/js/plyr.js",
|
"main": "src/js/plyr.js",
|
||||||
@ -27,7 +27,11 @@
|
|||||||
"keywords": [
|
"keywords": [
|
||||||
"HTML5 Video",
|
"HTML5 Video",
|
||||||
"HTML5 Audio",
|
"HTML5 Audio",
|
||||||
"Media Player"
|
"Media Player",
|
||||||
|
"DASH",
|
||||||
|
"Shaka",
|
||||||
|
"WordPress",
|
||||||
|
"HLS"
|
||||||
],
|
],
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
378
readme.md
378
readme.md
@ -3,7 +3,7 @@ A simple, accessible and customizable HTML5, YouTube and Vimeo media player.
|
|||||||
|
|
||||||
[Checkout the demo](https://plyr.io)
|
[Checkout the demo](https://plyr.io)
|
||||||
|
|
||||||
[](https://plyr.io)
|
[](https://plyr.io)
|
||||||
|
|
||||||
## Why?
|
## Why?
|
||||||
We wanted a lightweight, accessible and customizable media player that supports [*modern*](#browser-support) browsers. Sure, there are many other players out there but we wanted to keep things simple, using the right elements for the job.
|
We wanted a lightweight, accessible and customizable media player that supports [*modern*](#browser-support) browsers. Sure, there are many other players out there but we wanted to keep things simple, using the right elements for the job.
|
||||||
@ -21,7 +21,8 @@ We wanted a lightweight, accessible and customizable media player that supports
|
|||||||
- **[Fullscreen](#fullscreen)** - supports native fullscreen with fallback to "full window" modes
|
- **[Fullscreen](#fullscreen)** - supports native fullscreen with fallback to "full window" modes
|
||||||
- **i18n support** - support for internationalization of controls
|
- **i18n support** - support for internationalization of controls
|
||||||
- **No dependencies** - written in "vanilla" JavaScript, no jQuery required
|
- **No dependencies** - written in "vanilla" JavaScript, no jQuery required
|
||||||
- **SASS and LESS provided** - If you like _these_ over plain CSS
|
- **SASS and LESS source** - to include in your build process
|
||||||
|
- **[Streaming](#streaming)** - support for hls.js, Shaka and dash.js streaming playback
|
||||||
|
|
||||||
Oh and yes, it works with Bootstrap.
|
Oh and yes, it works with Bootstrap.
|
||||||
|
|
||||||
@ -38,7 +39,19 @@ Check out the [changelog](changelog.md) to see what's new with Plyr.
|
|||||||
|
|
||||||
If you have any cool ideas or features, please let me know by [creating an issue](https://github.com/Selz/plyr/issues/new) or, of course, forking and sending a pull request.
|
If you have any cool ideas or features, please let me know by [creating an issue](https://github.com/Selz/plyr/issues/new) or, of course, forking and sending a pull request.
|
||||||
|
|
||||||
|
## CMS plugins
|
||||||
|
|
||||||
|
### [WordPress](https://wordpress.org/plugins/plyr/)
|
||||||
|
Created and maintained by Ryan Anthony Drake ([@iamryandrake](https://github.com/iamryandrake))
|
||||||
|
|
||||||
|
### [Neos](https://packagist.org/packages/jonnitto/plyr)
|
||||||
|
Created and maintained by Jon Uhlmann ([@jonnitto](https://github.com/jonnitto))
|
||||||
|
|
||||||
|
### [Kirby](https://github.com/dpschen/kirby-plyrtag)
|
||||||
|
Created and maintained by Dominik Pschenitschni ([@dpschen](https://github.com/dpschen))
|
||||||
|
|
||||||
## Using package managers
|
## Using package managers
|
||||||
|
You can grab the source using one of the following package managers.
|
||||||
|
|
||||||
### npm
|
### npm
|
||||||
```
|
```
|
||||||
@ -61,7 +74,6 @@ ember addon:install ember-cli-plyr
|
|||||||
```
|
```
|
||||||
More info is on [npm](https://www.npmjs.com/package/ember-cli-plyr) and [GitHub](https://github.com/louisrudner/ember-cli-plyr)
|
More info is on [npm](https://www.npmjs.com/package/ember-cli-plyr) and [GitHub](https://github.com/louisrudner/ember-cli-plyr)
|
||||||
|
|
||||||
|
|
||||||
## Quick setup
|
## Quick setup
|
||||||
Here's a quick run through on getting up and running.
|
Here's a quick run through on getting up and running.
|
||||||
|
|
||||||
@ -69,7 +81,6 @@ Here's a quick run through on getting up and running.
|
|||||||
Plyr extends upon the standard HTML5 markup so that's all you need for those types.
|
Plyr extends upon the standard HTML5 markup so that's all you need for those types.
|
||||||
|
|
||||||
#### HTML5 Video
|
#### HTML5 Video
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<video poster="/path/to/poster.jpg" controls>
|
<video poster="/path/to/poster.jpg" controls>
|
||||||
<source src="/path/to/video.mp4" type="video/mp4">
|
<source src="/path/to/video.mp4" type="video/mp4">
|
||||||
@ -80,7 +91,6 @@ Plyr extends upon the standard HTML5 markup so that's all you need for those typ
|
|||||||
```
|
```
|
||||||
|
|
||||||
#### HTML5 Audio
|
#### HTML5 Audio
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<audio controls>
|
<audio controls>
|
||||||
<source src="/path/to/audio.mp3" type="audio/mp3">
|
<source src="/path/to/audio.mp3" type="audio/mp3">
|
||||||
@ -91,13 +101,11 @@ Plyr extends upon the standard HTML5 markup so that's all you need for those typ
|
|||||||
For YouTube and Vimeo, Plyr uses the standard YouTube API markup (an empty `<div>`):
|
For YouTube and Vimeo, Plyr uses the standard YouTube API markup (an empty `<div>`):
|
||||||
|
|
||||||
#### YouTube embed
|
#### YouTube embed
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<div data-type="youtube" data-video-id="bTqVqk7FSmY"></div>
|
<div data-type="youtube" data-video-id="bTqVqk7FSmY"></div>
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Vimeo embed
|
#### Vimeo embed
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<div data-type="vimeo" data-video-id="143418951"></div>
|
<div data-type="vimeo" data-video-id="143418951"></div>
|
||||||
```
|
```
|
||||||
@ -113,7 +121,7 @@ Include the `plyr.js` script before the closing `</body>` tag and then call `ply
|
|||||||
If you want to use our CDN for the JavaScript, you can use the following:
|
If you want to use our CDN for the JavaScript, you can use the following:
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<script src="https://cdn.plyr.io/1.8.0/plyr.js"></script>
|
<script src="https://cdn.plyr.io/1.8.12/plyr.js"></script>
|
||||||
```
|
```
|
||||||
|
|
||||||
### CSS
|
### CSS
|
||||||
@ -126,16 +134,18 @@ Include the `plyr.css` stylsheet into your `<head>`
|
|||||||
If you want to use our CDN for the default CSS, you can use the following:
|
If you want to use our CDN for the default CSS, you can use the following:
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<link rel="stylesheet" href="https://cdn.plyr.io/1.8.0/plyr.css">
|
<link rel="stylesheet" href="https://cdn.plyr.io/1.8.12/plyr.css">
|
||||||
```
|
```
|
||||||
|
|
||||||
### SVG Sprite
|
### SVG Sprite
|
||||||
The SVG sprite is loaded automatically from our CDN. To change this, see the [#options](Options) below. For reference, the CDN hosted SVG sprite can be found at `https://cdn.plyr.io/1.8.0/plyr.svg`.
|
The SVG sprite is loaded automatically from our CDN. To change this, see the [#options](Options) below. For reference, the CDN hosted SVG sprite can be found at `https://cdn.plyr.io/1.8.12/plyr.svg`.
|
||||||
|
|
||||||
## Advanced
|
## Advanced
|
||||||
|
|
||||||
### LESS & SASS/SCSS
|
### LESS & SASS/SCSS
|
||||||
You can use `plyr.less` or `plyr.scss` file included in `/src` as part of your build and change variables to suit your design. The HTML markup uses the BEM methodology with `plyr` as the block, e.g. `.plyr__controls`. You can change the class hooks in the options to match any custom CSS you write. Check out the JavaScript source for more on this.
|
You can use `plyr.less` or `plyr.scss` file included in `/src` as part of your build and change variables to suit your design. The LESS and SASS require you to use the [autoprefixer](https://www.npmjs.com/package/gulp-autoprefixer) plugin (you should already) as all declerations use the W3C definitions - e.g. `appearance: none;` will be prefixed to `-webkit-appearance: none;` by autoprefixer.
|
||||||
|
|
||||||
|
The HTML markup uses the BEM methodology with `plyr` as the block, e.g. `.plyr__controls`. You can change the class hooks in the options to match any custom CSS you write. Check out the JavaScript source for more on this.
|
||||||
|
|
||||||
### SVG
|
### SVG
|
||||||
The icons used in the Plyr controls are loaded in an SVG sprite. The sprite is automatically loaded from our CDN by default. If you already have an icon build system in place, you can include the source plyr icons (see `/src/sprite` for source icons).
|
The icons used in the Plyr controls are loaded in an SVG sprite. The sprite is automatically loaded from our CDN by default. If you already have an icon build system in place, you can include the source plyr icons (see `/src/sprite` for source icons).
|
||||||
@ -192,7 +202,6 @@ plyr.setup(options);
|
|||||||
Some touch browsers (particularly Mobile Safari on iOS) seem to have issues with `<input type="range">` elements whereby touching the track to set the value doesn't work and sliding the thumb can be tricky. To combat this, I've created [RangeTouch](https://rangetouch.com) which I'd recommend including in your solution. It's a tiny script with a nice benefit for users on touch devices.
|
Some touch browsers (particularly Mobile Safari on iOS) seem to have issues with `<input type="range">` elements whereby touching the track to set the value doesn't work and sliding the thumb can be tricky. To combat this, I've created [RangeTouch](https://rangetouch.com) which I'd recommend including in your solution. It's a tiny script with a nice benefit for users on touch devices.
|
||||||
|
|
||||||
#### Options
|
#### Options
|
||||||
|
|
||||||
Options must be passed as an object to the `setup()` method as above or as JSON in `data-plyr` attribute on each of your target elements:
|
Options must be passed as an object to the `setup()` method as above or as JSON in `data-plyr` attribute on each of your target elements:
|
||||||
|
|
||||||
```html
|
```html
|
||||||
@ -202,176 +211,176 @@ Options must be passed as an object to the `setup()` method as above or as JSON
|
|||||||
Note the single quotes encapsulating the JSON and double quotes on the object keys.
|
Note the single quotes encapsulating the JSON and double quotes on the object keys.
|
||||||
|
|
||||||
<table class="table" width="100%">
|
<table class="table" width="100%">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th width="20%">Option</th>
|
<th width="20%">Option</th>
|
||||||
<th width="15%">Type</th>
|
<th width="15%">Type</th>
|
||||||
<th width="15%">Default</th>
|
<th width="15%">Default</th>
|
||||||
<th width="50%">Description</th>
|
<th width="50%">Description</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>enabled</code></td>
|
<td><code>enabled</code></td>
|
||||||
<td>Boolean</td>
|
<td>Boolean</td>
|
||||||
<td><code>true</code></td>
|
<td><code>true</code></td>
|
||||||
<td>Completely disable Plyr. This would allow you to do a User Agent check or similar to programmatically enable or disable Plyr for a certain UA. Example below.</td>
|
<td>Completely disable Plyr. This would allow you to do a User Agent check or similar to programmatically enable or disable Plyr for a certain UA. Example below.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>html</code></td>
|
<td><code>html</code></td>
|
||||||
<td>String</td>
|
<td>String</td>
|
||||||
<td><code><a href="controls.md">See controls.md</a></code></td>
|
<td><code><a href="controls.md">See controls.md</a></code></td>
|
||||||
<td>See <a href="controls.md">controls.md</a> for more info on how the html needs to be structured.</td>
|
<td>See <a href="controls.md">controls.md</a> for more info on how the html needs to be structured.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>controls</code></td>
|
<td><code>controls</code></td>
|
||||||
<td>Array</td>
|
<td>Array</td>
|
||||||
<td><code>['play-large', 'play', 'progress', 'current-time', 'mute', 'volume', 'captions', 'fullscreen']</code></td>
|
<td><code>['play-large', 'play', 'progress', 'current-time', 'mute', 'volume', 'captions', 'fullscreen']</code></td>
|
||||||
<td>Toggle which control elements you would like to display when using the default controls html. If you specify a <code>html</code> option, this is redundant. The default value is to display everything.</td>
|
<td>Toggle which control elements you would like to display when using the default controls html. If you specify a <code>html</code> option, this is redundant. The default value is to display everything.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>i18n</code></td>
|
<td><code>i18n</code></td>
|
||||||
<td>Object</td>
|
<td>Object</td>
|
||||||
<td><code><a href="controls.md">See controls.md</a></code></td>
|
<td><code><a href="controls.md">See controls.md</a></code></td>
|
||||||
<td>Used for internationalization (i18n) of the tooltips/labels within the buttons.</td>
|
<td>Used for internationalization (i18n) of the tooltips/labels within the buttons.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>loadSprite</code></td>
|
<td><code>loadSprite</code></td>
|
||||||
<td>Boolean</td>
|
<td>Boolean</td>
|
||||||
<td><code>true</code></td>
|
<td><code>true</code></td>
|
||||||
<td>Load the SVG sprite specified as the <code>iconUrl</code> option (if a URL). If <code>false</code>, it is assumed you are handling sprite loading yourself.</td>
|
<td>Load the SVG sprite specified as the <code>iconUrl</code> option (if a URL). If <code>false</code>, it is assumed you are handling sprite loading yourself.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>iconUrl</code></td>
|
<td><code>iconUrl</code></td>
|
||||||
<td>String</td>
|
<td>String</td>
|
||||||
<td><code>null</code></td>
|
<td><code>null</code></td>
|
||||||
<td>Specify a URL or path to the SVG sprite. See the <a href="#svg">SVG section</a> for more info.</td>
|
<td>Specify a URL or path to the SVG sprite. See the <a href="#svg">SVG section</a> for more info.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>iconPrefix</code></td>
|
<td><code>iconPrefix</code></td>
|
||||||
<td>String</td>
|
<td>String</td>
|
||||||
<td><code>plyr</code></td>
|
<td><code>plyr</code></td>
|
||||||
<td>Specify the id prefix for the icons used in the default controls (e.g. "plyr-play" would be "plyr"). This is to prevent clashes if you're using your own SVG sprite but with the default controls. Most people can ignore this option.</td>
|
<td>Specify the id prefix for the icons used in the default controls (e.g. "plyr-play" would be "plyr"). This is to prevent clashes if you're using your own SVG sprite but with the default controls. Most people can ignore this option.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>debug</code></td>
|
<td><code>debug</code></td>
|
||||||
<td>Boolean</td>
|
<td>Boolean</td>
|
||||||
<td><code>false</code></td>
|
<td><code>false</code></td>
|
||||||
<td>Display debugging information on what Plyr is doing.</td>
|
<td>Display debugging information on what Plyr is doing.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>autoplay</code></td>
|
<td><code>autoplay</code></td>
|
||||||
<td>Boolean</td>
|
<td>Boolean</td>
|
||||||
<td><code>false</code></td>
|
<td><code>false</code></td>
|
||||||
<td>Autoplay the media on load. This is generally advised against on UX grounds. It is also disabled on iOS (an Apple limitation).</td>
|
<td>Autoplay the media on load. This is generally advised against on UX grounds. It is also disabled on iOS (an Apple limitation).</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>seekTime</code></td>
|
<td><code>seekTime</code></td>
|
||||||
<td>Number</td>
|
<td>Number</td>
|
||||||
<td><code>10</code></td>
|
<td><code>10</code></td>
|
||||||
<td>The time, in seconds, to seek when a user hits fast forward or rewind.</td>
|
<td>The time, in seconds, to seek when a user hits fast forward or rewind.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>volume</code></td>
|
<td><code>volume</code></td>
|
||||||
<td>Number</td>
|
<td>Number</td>
|
||||||
<td><code>5</code></td>
|
<td><code>5</code></td>
|
||||||
<td>A number, between 1 and 10, representing the initial volume of the player.</td>
|
<td>A number, between 1 and 10, representing the initial volume of the player.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>clickToPlay</code></td>
|
<td><code>clickToPlay</code></td>
|
||||||
<td>Boolean</td>
|
<td>Boolean</td>
|
||||||
<td><code>true</code></td>
|
<td><code>true</code></td>
|
||||||
<td>Click (or tap) of the video container will toggle pause/play.</td>
|
<td>Click (or tap) of the video container will toggle pause/play.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>disableContextMenu</code></td>
|
<td><code>disableContextMenu</code></td>
|
||||||
<td>Boolean</td>
|
<td>Boolean</td>
|
||||||
<td><code>true</code></td>
|
<td><code>true</code></td>
|
||||||
<td>Disable right click menu on video to <em>help</em> as very primitive obfuscation to prevent downloads of content.</td>
|
<td>Disable right click menu on video to <em>help</em> as very primitive obfuscation to prevent downloads of content.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>hideControls</code></td>
|
<td><code>hideControls</code></td>
|
||||||
<td>Boolean</td>
|
<td>Boolean</td>
|
||||||
<td><code>true</code></td>
|
<td><code>true</code></td>
|
||||||
<td>Hide video controls automatically after 2s of no mouse or focus movement, on control element blur (tab out), on playback start or entering fullscreen. As soon as the mouse is moved, a control element is focused or playback is paused, the controls reappear instantly.</td>
|
<td>Hide video controls automatically after 2s of no mouse or focus movement, on control element blur (tab out), on playback start or entering fullscreen. As soon as the mouse is moved, a control element is focused or playback is paused, the controls reappear instantly.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>showPosterOnEnd</code></td>
|
<td><code>showPosterOnEnd</code></td>
|
||||||
<td>Boolean</td>
|
<td>Boolean</td>
|
||||||
<td><code>false</code></td>
|
<td><code>false</code></td>
|
||||||
<td>This will restore and *reload* HTML5 video once playback is complete. Note: depending on the browser caching, this may result in the video downloading again (or parts of it). Use with caution.</td>
|
<td>This will restore and *reload* HTML5 video once playback is complete. Note: depending on the browser caching, this may result in the video downloading again (or parts of it). Use with caution.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>tooltips</code></td>
|
<td><code>tooltips</code></td>
|
||||||
<td>Object</td>
|
<td>Object</td>
|
||||||
<td><code>{ controls: false, seek: true }</code></td>
|
<td><code>{ controls: false, seek: true }</code></td>
|
||||||
<td>
|
<td>
|
||||||
<strong>controls</strong>: Display control labels as tooltips on :hover & :focus (by default, the labels are screen reader only).
|
<strong>controls</strong>: Display control labels as tooltips on :hover & :focus (by default, the labels are screen reader only).
|
||||||
<br><br>
|
<br><br>
|
||||||
<strong>seek</strong>: Display a seek tooltip to indicate on click where the media would seek to.
|
<strong>seek</strong>: Display a seek tooltip to indicate on click where the media would seek to.
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>duration</code></td>
|
<td><code>duration</code></td>
|
||||||
<td>Number</td>
|
<td>Number</td>
|
||||||
<td><code>null</code></td>
|
<td><code>null</code></td>
|
||||||
<td>Specify a custom duration.</td>
|
<td>Specify a custom duration.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>displayDuration</code></td>
|
<td><code>displayDuration</code></td>
|
||||||
<td>Boolean</td>
|
<td>Boolean</td>
|
||||||
<td><code>true</code></td>
|
<td><code>true</code></td>
|
||||||
<td>Displays the duration of the media on the "metadataloaded" event (on startup) in the current time display. This will only work if the `preload` attribute is not set to `none` (or is not set at all) and you choose not to display the duration (see <code>controls</code> option).</td>
|
<td>Displays the duration of the media on the "metadataloaded" event (on startup) in the current time display. This will only work if the `preload` attribute is not set to `none` (or is not set at all) and you choose not to display the duration (see <code>controls</code> option).</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>selectors</code></td>
|
<td><code>selectors</code></td>
|
||||||
<td>Object</td>
|
<td>Object</td>
|
||||||
<td>—</td>
|
<td>—</td>
|
||||||
<td>See <code>plyr.js</code> in <code>/src</code> for more info. You probably don't need to change any of these.</td>
|
<td>See <code>plyr.js</code> in <code>/src</code> for more info. You probably don't need to change any of these.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>listeners</code></td>
|
<td><code>listeners</code></td>
|
||||||
<td>Object</td>
|
<td>Object</td>
|
||||||
<td>—</td>
|
<td>—</td>
|
||||||
<td>Allows early binding of event listeners to the controls. See <code>controls</code> above for list of controls and see <code>plyr.js</code> in <code>/src</code> for more info.</td>
|
<td>Allows early binding of event listeners to the controls. See <code>controls</code> above for list of controls and see <code>plyr.js</code> in <code>/src</code> for more info.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>classes</code></td>
|
<td><code>classes</code></td>
|
||||||
<td>Object</td>
|
<td>Object</td>
|
||||||
<td>—</td>
|
<td>—</td>
|
||||||
<td>Similar to above, these are the classes added to the player when state changes occur.</td>
|
<td>Similar to above, these are the classes added to the player when state changes occur.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>captions</code></td>
|
<td><code>captions</code></td>
|
||||||
<td>Object</td>
|
<td>Object</td>
|
||||||
<td>—</td>
|
<td>—</td>
|
||||||
<td>One property <code>defaultActive</code> which toggles if captions should be on by default. The default value is <code>false</code>.</td>
|
<td>One property <code>defaultActive</code> which toggles if captions should be on by default. The default value is <code>false</code>.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>fullscreen</code></td>
|
<td><code>fullscreen</code></td>
|
||||||
<td>Object</td>
|
<td>Object</td>
|
||||||
<td>—</td>
|
<td>—</td>
|
||||||
<td>See <a href="#fullscreen-options">below</a></td>
|
<td>See <a href="#fullscreen-options">below</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>storage</code></td>
|
<td><code>storage</code></td>
|
||||||
<td>Object</td>
|
<td>Object</td>
|
||||||
<td>—</td>
|
<td>—</td>
|
||||||
<td>Two properties; <code>enabled</code> which toggles if local storage should be enabled (if the browser supports it). The default value is `true`. This enables storing user settings, currently it only stores volume but more will be added later. The second property <code>key</code> is the key used for the local storage. The default is <code>plyr_volume</code> until more settings are stored.</td>
|
<td>Two properties; <code>enabled</code> which toggles if local storage should be enabled (if the browser supports it). The default value is `true`. This enables storing user settings, currently it only stores volume but more will be added later. The second property <code>key</code> is the key used for the local storage. The default is <code>plyr_volume</code> until more settings are stored.</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
#### Fullscreen options
|
#### Fullscreen options
|
||||||
|
|
||||||
<table class="table" width="100%" id="fullscreen-options">
|
<table class="table" width="100%" id="fullscreen-options">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th width="20%">Option</th>
|
<th width="20%">Option</th>
|
||||||
<th width="15%">Type</th>
|
<th width="15%">Type</th>
|
||||||
<th width="15%">Default</th>
|
<th width="15%">Default</th>
|
||||||
<th width="50%">Description</th>
|
<th width="50%">Description</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
@ -529,11 +538,15 @@ Here's a list of the methods supported:
|
|||||||
<td>—</td>
|
<td>—</td>
|
||||||
<td>Reverses the effects of the <code>destroy()</code> method, restoring the UI and listeners.</td>
|
<td>Reverses the effects of the <code>destroy()</code> method, restoring the UI and listeners.</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>getCurrentTime()</code></td>
|
||||||
|
<td>—</td>
|
||||||
|
<td>Will return a float with the current time in seconds.</td>
|
||||||
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
#### .source() method
|
#### .source() method
|
||||||
|
|
||||||
This allows changing the plyr source and type on the fly.
|
This allows changing the plyr source and type on the fly.
|
||||||
|
|
||||||
Video example:
|
Video example:
|
||||||
@ -643,9 +656,7 @@ Some more details on the object parameters
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
||||||
## Events
|
## Events
|
||||||
|
|
||||||
You can listen for events on the target element you setup Plyr on (see example under the table). Some events only apply to HTML5 audio and video.
|
You can listen for events on the target element you setup Plyr on (see example under the table). Some events only apply to HTML5 audio and video.
|
||||||
|
|
||||||
<table class="table" width="100%">
|
<table class="table" width="100%">
|
||||||
@ -785,8 +796,9 @@ document.querySelector('.js-plyr').addEventListener('ready', function(event) {
|
|||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
## Embeds
|
These events also bubble up the DOM.
|
||||||
|
|
||||||
|
## Embeds
|
||||||
YouTube and Vimeo are currently supported and function much like a HTML5 video. Check the relevant documentation sections for any differences.
|
YouTube and Vimeo are currently supported and function much like a HTML5 video. Check the relevant documentation sections for any differences.
|
||||||
|
|
||||||
Plyr references a custom version of the Vimeo Froogaloop API as Vimeo have neglected to maintain the library and there were bugs with their version. You don't need to worry about including your own versions of the Vimeo or YouTube JavaScript APIs.
|
Plyr references a custom version of the Vimeo Froogaloop API as Vimeo have neglected to maintain the library and there were bugs with their version. You don't need to worry about including your own versions of the Vimeo or YouTube JavaScript APIs.
|
||||||
@ -811,8 +823,14 @@ More info on the respective API's here:
|
|||||||
|
|
||||||
*Please note*: not all API methods may work 100%. Your mileage may vary. It's better to use the universal plyr API where possible.
|
*Please note*: not all API methods may work 100%. Your mileage may vary. It's better to use the universal plyr API where possible.
|
||||||
|
|
||||||
## Fullscreen
|
## Streaming
|
||||||
|
Because Plyr is an extension of the standard HTML5 video and audio elements, third party streaming plugins can be used with Plyr. Massive thanks to Matias Russitto ([@russitto](https://github.com/russitto)) for working on this. Here's a few examples:
|
||||||
|
|
||||||
|
- Using [hls.js](https://github.com/dailymotion/hls.js) - [Demo](http://codepen.io/sampotts/pen/JKEMqB)
|
||||||
|
- Using [Shaka](https://github.com/google/shaka-player) - [Demo](http://codepen.io/sampotts/pen/zBNpVR)
|
||||||
|
- Using [dash.js](https://github.com/Dash-Industry-Forum/dash.js) - [Demo](http://codepen.io/sampotts/pen/BzpJXN)
|
||||||
|
|
||||||
|
## Fullscreen
|
||||||
Fullscreen in Plyr is supported by all browsers that [currently support it](http://caniuse.com/#feat=fullscreen). If you're using the default CSS, you can also use a "full browser" mode which will use the full browser window by adding the `plyr-fullscreen` class to your container.
|
Fullscreen in Plyr is supported by all browsers that [currently support it](http://caniuse.com/#feat=fullscreen). If you're using the default CSS, you can also use a "full browser" mode which will use the full browser window by adding the `plyr-fullscreen` class to your container.
|
||||||
|
|
||||||
## Browser support
|
## Browser support
|
||||||
|
469
src/js/plyr.js
469
src/js/plyr.js
File diff suppressed because it is too large
Load Diff
@ -19,7 +19,7 @@
|
|||||||
position: relative;
|
position: relative;
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
min-width: 200px;
|
min-width: 200px;
|
||||||
font-family: Avenir, "Avenir Next", "Helvetica Neue", "Segoe UI", Helvetica, Arial, sans-serif;
|
font-family: @plyr-font-family;
|
||||||
direction: ltr;
|
direction: ltr;
|
||||||
|
|
||||||
& when (@plyr-border-box = true) {
|
& when (@plyr-border-box = true) {
|
||||||
@ -225,6 +225,8 @@
|
|||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
padding: floor(@plyr-control-spacing / 3) @plyr-control-spacing;
|
padding: floor(@plyr-control-spacing / 3) @plyr-control-spacing;
|
||||||
background: @plyr-captions-bg;
|
background: @plyr-captions-bg;
|
||||||
|
box-decoration-break: clone;
|
||||||
|
line-height: 150%;
|
||||||
}
|
}
|
||||||
span:empty {
|
span:empty {
|
||||||
display: none;
|
display: none;
|
||||||
@ -255,12 +257,9 @@
|
|||||||
.plyr__controls {
|
.plyr__controls {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
transition: opacity .3s ease;
|
|
||||||
|
|
||||||
// Spacing
|
// Spacing
|
||||||
> button,
|
> button,
|
||||||
.plyr__progress,
|
.plyr__progress,
|
||||||
@ -324,6 +323,7 @@
|
|||||||
// Hide controls
|
// Hide controls
|
||||||
.plyr--hide-controls .plyr__controls {
|
.plyr--hide-controls .plyr__controls {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Video controls
|
// Video controls
|
||||||
@ -337,6 +337,7 @@
|
|||||||
border-bottom-left-radius: inherit;
|
border-bottom-left-radius: inherit;
|
||||||
border-bottom-right-radius: inherit;
|
border-bottom-right-radius: inherit;
|
||||||
color: @plyr-video-control-color;
|
color: @plyr-video-control-color;
|
||||||
|
transition: opacity .3s ease;
|
||||||
|
|
||||||
button {
|
button {
|
||||||
// Hover and tab focus
|
// Hover and tab focus
|
||||||
@ -354,7 +355,6 @@
|
|||||||
border-radius: inherit;
|
border-radius: inherit;
|
||||||
background: @plyr-audio-controls-bg;
|
background: @plyr-audio-controls-bg;
|
||||||
border: @plyr-audio-controls-border;
|
border: @plyr-audio-controls-border;
|
||||||
box-shadow: @plyr-audio-controls-box-shadow;
|
|
||||||
color: @plyr-audio-control-color;
|
color: @plyr-audio-control-color;
|
||||||
|
|
||||||
button {
|
button {
|
||||||
@ -371,6 +371,7 @@
|
|||||||
.plyr__play-large {
|
.plyr__play-large {
|
||||||
display: none;
|
display: none;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
z-index: 1;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
transform: translate(-50%, -50%);
|
transform: translate(-50%, -50%);
|
||||||
@ -378,7 +379,7 @@
|
|||||||
background: @plyr-video-control-bg-hover;
|
background: @plyr-video-control-bg-hover;
|
||||||
border: 4px solid currentColor;
|
border: 4px solid currentColor;
|
||||||
border-radius: 100%;
|
border-radius: 100%;
|
||||||
box-shadow: 0 1px 1px fade(@plyr-video-controls-bg, 15%);
|
box-shadow: 0 1px 1px fade(#000, 15%);
|
||||||
color: @plyr-video-control-color;
|
color: @plyr-video-control-color;
|
||||||
transition: all .3s ease;
|
transition: all .3s ease;
|
||||||
|
|
||||||
@ -663,7 +664,6 @@
|
|||||||
display: inline-block;
|
display: inline-block;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
font-size: @plyr-font-size-small;
|
font-size: @plyr-font-size-small;
|
||||||
line-height: .95;
|
|
||||||
}
|
}
|
||||||
// Media duration hidden on small screens
|
// Media duration hidden on small screens
|
||||||
.plyr__time + .plyr__time {
|
.plyr__time + .plyr__time {
|
||||||
|
@ -11,7 +11,8 @@
|
|||||||
// Colors
|
// Colors
|
||||||
@plyr-color-main: #3498db;
|
@plyr-color-main: #3498db;
|
||||||
|
|
||||||
// Font sizes
|
// Font
|
||||||
|
@plyr-font-family: 'San Francisco', -apple-system, BlinkMacSystemFont, '.SFNSText-Regular', Avenir, 'Avenir Next', 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, sans-serif;
|
||||||
@plyr-font-size-small: 14px;
|
@plyr-font-size-small: 14px;
|
||||||
@plyr-font-size-base: 16px;
|
@plyr-font-size-base: 16px;
|
||||||
|
|
||||||
@ -32,7 +33,6 @@
|
|||||||
@plyr-video-control-bg-hover: @plyr-color-main;
|
@plyr-video-control-bg-hover: @plyr-color-main;
|
||||||
@plyr-audio-controls-bg: #fff;
|
@plyr-audio-controls-bg: #fff;
|
||||||
@plyr-audio-controls-border: 1px solid #dbe3e8;
|
@plyr-audio-controls-border: 1px solid #dbe3e8;
|
||||||
@plyr-audio-controls-box-shadow: 0 1px 1px fade(#000, 5%);
|
|
||||||
@plyr-audio-control-color: #565D64;
|
@plyr-audio-control-color: #565D64;
|
||||||
@plyr-audio-control-color-hover: #fff;
|
@plyr-audio-control-color-hover: #fff;
|
||||||
@plyr-audio-control-bg-hover: @plyr-color-main;
|
@plyr-audio-control-bg-hover: @plyr-color-main;
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
position: relative;
|
position: relative;
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
min-width: 200px;
|
min-width: 200px;
|
||||||
font-family: Avenir, "Avenir Next", "Helvetica Neue", "Segoe UI", Helvetica, Arial, sans-serif;
|
font-family: $plyr-font-family;
|
||||||
direction: ltr;
|
direction: ltr;
|
||||||
|
|
||||||
@if $plyr-border-box == true {
|
@if $plyr-border-box == true {
|
||||||
@ -225,6 +225,8 @@
|
|||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
padding: floor($plyr-control-spacing / 3) $plyr-control-spacing;
|
padding: floor($plyr-control-spacing / 3) $plyr-control-spacing;
|
||||||
background: $plyr-captions-bg;
|
background: $plyr-captions-bg;
|
||||||
|
box-decoration-break: clone;
|
||||||
|
line-height: 150%;
|
||||||
}
|
}
|
||||||
span:empty {
|
span:empty {
|
||||||
display: none;
|
display: none;
|
||||||
@ -255,12 +257,9 @@
|
|||||||
.plyr__controls {
|
.plyr__controls {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
transition: opacity .3s ease;
|
|
||||||
|
|
||||||
// Spacing
|
// Spacing
|
||||||
> button,
|
> button,
|
||||||
.plyr__progress,
|
.plyr__progress,
|
||||||
@ -324,6 +323,7 @@
|
|||||||
// Hide controls
|
// Hide controls
|
||||||
.plyr--hide-controls .plyr__controls {
|
.plyr--hide-controls .plyr__controls {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Video controls
|
// Video controls
|
||||||
@ -337,6 +337,7 @@
|
|||||||
border-bottom-left-radius: inherit;
|
border-bottom-left-radius: inherit;
|
||||||
border-bottom-right-radius: inherit;
|
border-bottom-right-radius: inherit;
|
||||||
color: $plyr-video-control-color;
|
color: $plyr-video-control-color;
|
||||||
|
transition: opacity .3s ease;
|
||||||
|
|
||||||
button {
|
button {
|
||||||
// Hover and tab focus
|
// Hover and tab focus
|
||||||
@ -354,7 +355,6 @@
|
|||||||
border-radius: inherit;
|
border-radius: inherit;
|
||||||
background: $plyr-audio-controls-bg;
|
background: $plyr-audio-controls-bg;
|
||||||
border: $plyr-audio-controls-border;
|
border: $plyr-audio-controls-border;
|
||||||
box-shadow: $plyr-audio-controls-box-shadow;
|
|
||||||
color: $plyr-audio-control-color;
|
color: $plyr-audio-control-color;
|
||||||
|
|
||||||
button {
|
button {
|
||||||
@ -371,6 +371,7 @@
|
|||||||
.plyr__play-large {
|
.plyr__play-large {
|
||||||
display: none;
|
display: none;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
z-index: 1;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
transform: translate(-50%, -50%);
|
transform: translate(-50%, -50%);
|
||||||
@ -378,7 +379,7 @@
|
|||||||
background: $plyr-video-control-bg-hover;
|
background: $plyr-video-control-bg-hover;
|
||||||
border: 4px solid currentColor;
|
border: 4px solid currentColor;
|
||||||
border-radius: 100%;
|
border-radius: 100%;
|
||||||
box-shadow: 0 1px 1px transparentize($plyr-video-controls-bg, .85);
|
box-shadow: 0 1px 1px transparentize(#000, .85);
|
||||||
color: $plyr-video-control-color;
|
color: $plyr-video-control-color;
|
||||||
transition: all .3s ease;
|
transition: all .3s ease;
|
||||||
|
|
||||||
@ -662,7 +663,6 @@
|
|||||||
display: inline-block;
|
display: inline-block;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
font-size: $plyr-font-size-small;
|
font-size: $plyr-font-size-small;
|
||||||
line-height: .95;
|
|
||||||
}
|
}
|
||||||
// Media duration hidden on small screens
|
// Media duration hidden on small screens
|
||||||
.plyr__time + .plyr__time {
|
.plyr__time + .plyr__time {
|
||||||
|
@ -13,6 +13,7 @@ $plyr-sr-only-important: true !default;
|
|||||||
$plyr-color-main: #3498db !default;
|
$plyr-color-main: #3498db !default;
|
||||||
|
|
||||||
// Font sizes
|
// Font sizes
|
||||||
|
$plyr-font-family: 'San Francisco', -apple-system, BlinkMacSystemFont, '.SFNSText-Regular', Avenir, 'Avenir Next', 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, sans-serif;
|
||||||
$plyr-font-size-small: 14px !default;
|
$plyr-font-size-small: 14px !default;
|
||||||
$plyr-font-size-base: 16px !default;
|
$plyr-font-size-base: 16px !default;
|
||||||
|
|
||||||
@ -33,7 +34,6 @@ $plyr-video-control-color-hover: #fff !default;
|
|||||||
$plyr-video-control-bg-hover: $plyr-color-main !default;
|
$plyr-video-control-bg-hover: $plyr-color-main !default;
|
||||||
$plyr-audio-controls-bg: #fff !default;
|
$plyr-audio-controls-bg: #fff !default;
|
||||||
$plyr-audio-controls-border: 1px solid #dbe3e8 !default;
|
$plyr-audio-controls-border: 1px solid #dbe3e8 !default;
|
||||||
$plyr-audio-controls-box-shadow: 0 1px 1px transparentize(#000, .95) !default;
|
|
||||||
$plyr-audio-control-color: #565D64 !default;
|
$plyr-audio-control-color: #565D64 !default;
|
||||||
$plyr-audio-control-color-hover: #fff !default;
|
$plyr-audio-control-color-hover: #fff !default;
|
||||||
$plyr-audio-control-bg-hover: $plyr-color-main;
|
$plyr-audio-control-bg-hover: $plyr-color-main;
|
||||||
|
Reference in New Issue
Block a user