Docs tweaks

This commit is contained in:
Sam Potts 2015-10-05 01:39:55 +11:00
parent daec1baebc
commit 2c4c8c58d5
8 changed files with 18 additions and 28 deletions

2
dist/plyr.js vendored

File diff suppressed because one or more lines are too long

2
docs/dist/docs.css vendored

File diff suppressed because one or more lines are too long

2
docs/dist/docs.js vendored

File diff suppressed because one or more lines are too long

View File

@ -21,7 +21,7 @@
<ul> <ul>
<li> <li>
<a href="https://github.com/selz/plyr" target="_blank" class="btn btn-primary" data-shr-network="github"> <a href="https://github.com/selz/plyr" target="_blank" class="btn btn-primary" data-shr-network="github">
<svg class="icon"><use xlink:href="#icon-github"/></svg>Get it on GitHub <svg class="icon"><use xlink:href="#icon-github"/></svg>Download on GitHub
</a> </a>
</li> </li>
<li> <li>

View File

@ -57,6 +57,7 @@ shr.setup({
case 'video': case 'video':
player.source({ player.source({
type: 'video', type: 'video',
title: 'Bug Buck Bunny',
sources: [{ sources: [{
src: 'https://cdn.selz.com/plyr/1.0/movie.mp4', src: 'https://cdn.selz.com/plyr/1.0/movie.mp4',
type: 'video/mp4' type: 'video/mp4'
@ -79,6 +80,7 @@ shr.setup({
case 'audio': case 'audio':
player.source({ player.source({
type: 'audio', type: 'audio',
title: '96 by Logistics',
sources: [{ sources: [{
src: 'https://cdn.selz.com/plyr/1.0/logistics-96-sample.mp3', src: 'https://cdn.selz.com/plyr/1.0/logistics-96-sample.mp3',
type: 'audio/mp3' type: 'audio/mp3'
@ -93,6 +95,7 @@ shr.setup({
case 'youtube': case 'youtube':
player.source({ player.source({
type: 'youtube', type: 'youtube',
title: 'Introducing Apple Pencil',
sources: 'iicnVez5U7M' sources: 'iicnVez5U7M'
}); });
break; break;
@ -100,6 +103,7 @@ shr.setup({
case 'vimeo': case 'vimeo':
player.source({ player.source({
type: 'vimeo', type: 'vimeo',
title: 'The Beaten Track',
sources: '125220818' sources: '125220818'
}); });
break; break;

View File

@ -96,13 +96,12 @@ nav {
box-shadow: inset 0 1px 0 #fff, 0 1px 1px rgba(0,0,0, .05); box-shadow: inset 0 1px 0 #fff, 0 1px 1px rgba(0,0,0, .05);
text-shadow: 0 1px 1px #fff; text-shadow: 0 1px 1px #fff;
color: @gray; color: @gray;
transition: all .3s ease; transition: background .3s ease, border .3s ease, color .3s ease;
&:hover, &:hover,
&:focus { &:focus {
background-color: #fff; border-color: darken(@gray-light, 8%);
border-color: darken(@gray-light, 5%); color: @gray;
color: @link-color;
outline: 0; outline: 0;
} }
&-youtube .icon { &-youtube .icon {

View File

@ -5,6 +5,7 @@
// Example players // Example players
.player { .player {
margin: 0 auto @padding-base; margin: 0 auto @padding-base;
max-width: @example-width-video;
&-controls { &-controls {
border-radius: 0 0 @border-radius-base @border-radius-base; border-radius: 0 0 @border-radius-base @border-radius-base;
@ -21,11 +22,6 @@
overflow: hidden; overflow: hidden;
} }
} }
.player-video,
.player-youtube,
.player-vimeo {
max-width: @example-width-video;
}
video, video,
.player-video-embed { .player-video-embed {
border-radius: @border-radius-base; border-radius: @border-radius-base;

View File

@ -1790,20 +1790,6 @@
_updateProgress(event); _updateProgress(event);
} }
// Remove <source> children and src attribute
/*function _removeSources() {
// Find child <source> elements
var sources = player.media.querySelectorAll('source');
// Remove each
for (var i = sources.length - 1; i >= 0; i--) {
_remove(sources[i]);
}
// Remove src attribute
player.media.removeAttribute('src');
}*/
// Add a source element // Add a source element
function _addSource(attributes) { function _addSource(attributes) {
_insertElement('source', player.media, attributes); _insertElement('source', player.media, attributes);
@ -1949,7 +1935,12 @@
if (config.autoplay) { if (config.autoplay) {
_play(); _play();
} }
} }
if('title' in source) {
config.title = source.title;
_setupPlayAria();
}
} }
// Update poster // Update poster